{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/9930","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/9930/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/9930/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/9930/events","html_url":"https://github.com/JuliaLang/julia/issues/9930","id":55511187,"number":9930,"title":"At_mul_B! has different methods for sparse and dense matrices","user":{"login":"hofmannmartin","id":7510025,"avatar_url":"https://avatars.githubusercontent.com/u/7510025?v=3","gravatar_id":"","url":"https://api.github.com/users/hofmannmartin","html_url":"https://github.com/hofmannmartin","followers_url":"https://api.github.com/users/hofmannmartin/followers","following_url":"https://api.github.com/users/hofmannmartin/following{/other_user}","gists_url":"https://api.github.com/users/hofmannmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/hofmannmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hofmannmartin/subscriptions","organizations_url":"https://api.github.com/users/hofmannmartin/orgs","repos_url":"https://api.github.com/users/hofmannmartin/repos","events_url":"https://api.github.com/users/hofmannmartin/events{/privacy}","received_events_url":"https://api.github.com/users/hofmannmartin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/linear%20algebra","name":"linear algebra","color":"aa8800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-26T17:26:21Z","updated_at":"2015-01-26T20:15:47Z","closed_at":null,"body":"Just recently I wanted to implement an algorithm. I used the method `At_mul_B!(α::Number,A::SparseMatrixCSC{Tv,Ti<:Integer},x::AbstractArray{T,1},β::Number,\r\ny::AbstractArray{T,1})`, which works fine with sparse matrices but has no counterpart for dense matrices. Its dense counterpart `BLAS.gemv!` does not work with sparse matrices. As workaround I dispatched the `At_mul_b!` function.\r\n\r\nIs this behaviour intended (using 0.3.6), or did I got terribly lost?\r\n\r\nIn my opinion it would be great to have basic linear algebra working on dense and sparse matrices with the same syntax."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/71529739","html_url":"https://github.com/JuliaLang/julia/issues/9930#issuecomment-71529739","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/9930","id":71529739,"user":{"login":"jiahao","id":1732,"avatar_url":"https://avatars.githubusercontent.com/u/1732?v=3","gravatar_id":"","url":"https://api.github.com/users/jiahao","html_url":"https://github.com/jiahao","followers_url":"https://api.github.com/users/jiahao/followers","following_url":"https://api.github.com/users/jiahao/following{/other_user}","gists_url":"https://api.github.com/users/jiahao/gists{/gist_id}","starred_url":"https://api.github.com/users/jiahao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiahao/subscriptions","organizations_url":"https://api.github.com/users/jiahao/orgs","repos_url":"https://api.github.com/users/jiahao/repos","events_url":"https://api.github.com/users/jiahao/events{/privacy}","received_events_url":"https://api.github.com/users/jiahao/received_events","type":"User","site_admin":false},"created_at":"2015-01-26T20:15:47Z","updated_at":"2015-01-26T20:15:47Z","body":"Related: #5332\r\n\r\nI believe that for dense matrices and vectors (and `BigFloats` and `BigInts` for that matter), the question of how to reuse intermediaries is equivalent to a register allocation problem. In principle one could write an abstract interpreter to do both shape analysis (to infer dimensions of arrays) and liveness analysis, and then one would have all the information needed to reuse allocated arrays aggressively. I think to some extent an algorithm for solving the reuse problem for dense matrices can be reused for sparse, but computing the resulting shapes due to fill-in would be more complicated (and hence a more interesting research problem :) )."}}