{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/comments/37535518","id":37535518,"diff_hunk":"@@ -2,73 +2,81 @@ for (mv, sv, mm, sm, T) in ((:mkl_scscmv_, :mkl_scscsv_, :mkl_scscmm_, :mkl_scsc\n                             (:mkl_dcscmv_, :mkl_dcscsv_, :mkl_dcscmm_, :mkl_dcscsm_, :Float64),\n                             (:mkl_ccscmv_, :mkl_ccscsv_, :mkl_ccscmm_, :mkl_ccscsm_, :Complex64),\n                             (:mkl_zcscmv_, :mkl_zcscsv_, :mkl_zcscmm_, :mkl_zcscsm_, :Complex128))\n-    @eval begin\n-        function cscmv!(transa::Char, α::$T, matdescra::ASCIIString, A::SparseMatrixCSC{$T, BlasInt}, x::StridedVector{$T}, β::$T, y::StridedVector{$T})\n-            trns = uppercase(transa)\n-            in(trns,['N','T']) || error(\"uppercase(transa) is '$trns', must be 'N' or 'T'\")\n-            length(x) == (trns == 'T' ? A.m : A.n) ||\n-                throw(DimensionMismatch(\"Matrix with $(A.n) columns multiplied with vector of length $(length(x))\"))\n-            length(y) == (trns == 'T' ? A.n : A.m) ||\n-                throw(DimensionMismatch(\"Vector of length $(A.m) added to vector of length $(length(y))\"))\n-            ccall(($(string(mv)), :libmkl_rt), Void,\n-                (Ptr{Uint8}, Ptr{BlasInt}, Ptr{BlasInt}, Ptr{$T},\n-                 Ptr{Uint8}, Ptr{$T}, Ptr{BlasInt}, Ptr{BlasInt},\n-                 Ptr{BlasInt}, Ptr{$T}, Ptr{$T}, Ptr{$T}),\n-                &transa, &A.m, &A.n, &α,\n-                matdescra, A.nzval, A.rowval, pointer(A.colptr, 1),\n-                pointer(A.colptr, 2), x, &β, y)\n-            return y\n-        end\n+@eval begin\n+function cscmv!(transa::Char, α::$T, matdescra::ASCIIString,\n+                A::SparseMatrixCSC{$T, BlasInt}, x::StridedVector{$T},\n+                β::$T, y::StridedVector{$T})\n+    trns = uppercase(transa)\n+    in(trns,['N','T']) || error(\"uppercase(transa) is '$trns', must be 'N' or 'T'\")","path":"src/generator.jl","position":26,"original_position":26,"commit_id":"66518f4d7e1c85d65c67f8986d607ddb9a2ceccf","original_commit_id":"66518f4d7e1c85d65c67f8986d607ddb9a2ceccf","user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"body":"I haven't really looked at this code (I didnt write it) but your comment is valid regardless. Will fix it.","created_at":"2015-08-20T14:31:35Z","updated_at":"2015-08-20T14:31:35Z","html_url":"https://github.com/JuliaSparse/MKLSparse.jl/pull/6#discussion_r37535518","pull_request_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/comments/37535518"},"html":{"href":"https://github.com/JuliaSparse/MKLSparse.jl/pull/6#discussion_r37535518"},"pull_request":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6","id":42726020,"html_url":"https://github.com/JuliaSparse/MKLSparse.jl/pull/6","diff_url":"https://github.com/JuliaSparse/MKLSparse.jl/pull/6.diff","patch_url":"https://github.com/JuliaSparse/MKLSparse.jl/pull/6.patch","issue_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues/6","number":6,"state":"open","locked":false,"title":"Overload * and \\ among a few things","user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"body":"As it is right now when `A*B` is used and `A` is sparse it is not actually the MKL routines that are running but the julia ones:\r\n\r\n```julia\r\njulia> @which sprand(1000,100,0.01) * rand(100)\r\n*{TA,S,Tx}(A::Base.SparseMatrix.SparseMatrixCSC{TA,S}, \r\nx::Union{DenseArray{Tx,1},SubArray{Tx,1,A<:DenseArray{T,N},\r\nI<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at sparse/linalg.jl:58\r\n```\r\n\r\nThis means that the tests weren't testing the MKL routines. This PR adds method for `*` and `\\` so when these are used the MKL routines are called instead of julia ones.\r\n\r\nAlso updated the README a little.","created_at":"2015-08-18T17:32:41Z","updated_at":"2015-08-20T14:31:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15b555f96fcc64ccc78df725a6e0f337fa12c51a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6/commits","review_comments_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6/comments","review_comment_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues/6/comments","statuses_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/statuses/66518f4d7e1c85d65c67f8986d607ddb9a2ceccf","head":{"label":"KristofferC:kc/overload","ref":"kc/overload","sha":"66518f4d7e1c85d65c67f8986d607ddb9a2ceccf","user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"repo":{"id":38211266,"name":"MKLSparse.jl","full_name":"KristofferC/MKLSparse.jl","owner":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KristofferC/MKLSparse.jl","description":"Override sparse-dense operations when MKL is available.","fork":true,"url":"https://api.github.com/repos/KristofferC/MKLSparse.jl","forks_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/forks","keys_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/teams","hooks_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/hooks","issue_events_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/issues/events{/number}","events_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/events","assignees_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/assignees{/user}","branches_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/branches{/branch}","tags_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/tags","blobs_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/languages","stargazers_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/stargazers","contributors_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/contributors","subscribers_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/subscribers","subscription_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/subscription","commits_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/contents/{+path}","compare_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/merges","archive_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/downloads","issues_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/issues{/number}","pulls_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/labels{/name}","releases_url":"https://api.github.com/repos/KristofferC/MKLSparse.jl/releases{/id}","created_at":"2015-06-28T19:29:03Z","updated_at":"2015-06-28T19:29:03Z","pushed_at":"2015-08-18T17:29:14Z","git_url":"git://github.com/KristofferC/MKLSparse.jl.git","ssh_url":"git@github.com:KristofferC/MKLSparse.jl.git","clone_url":"https://github.com/KristofferC/MKLSparse.jl.git","svn_url":"https://github.com/KristofferC/MKLSparse.jl","homepage":null,"size":141,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaSparse:master","ref":"master","sha":"f751193ecb47c0bff8b518d22fa05a095eb3cb71","user":{"login":"JuliaSparse","id":8093449,"avatar_url":"https://avatars.githubusercontent.com/u/8093449?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaSparse","html_url":"https://github.com/JuliaSparse","followers_url":"https://api.github.com/users/JuliaSparse/followers","following_url":"https://api.github.com/users/JuliaSparse/following{/other_user}","gists_url":"https://api.github.com/users/JuliaSparse/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaSparse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaSparse/subscriptions","organizations_url":"https://api.github.com/users/JuliaSparse/orgs","repos_url":"https://api.github.com/users/JuliaSparse/repos","events_url":"https://api.github.com/users/JuliaSparse/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaSparse/received_events","type":"Organization","site_admin":false},"repo":{"id":38201269,"name":"MKLSparse.jl","full_name":"JuliaSparse/MKLSparse.jl","owner":{"login":"JuliaSparse","id":8093449,"avatar_url":"https://avatars.githubusercontent.com/u/8093449?v=3","gravatar_id":"","url":"https://api.github.com/users/JuliaSparse","html_url":"https://github.com/JuliaSparse","followers_url":"https://api.github.com/users/JuliaSparse/followers","following_url":"https://api.github.com/users/JuliaSparse/following{/other_user}","gists_url":"https://api.github.com/users/JuliaSparse/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaSparse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaSparse/subscriptions","organizations_url":"https://api.github.com/users/JuliaSparse/orgs","repos_url":"https://api.github.com/users/JuliaSparse/repos","events_url":"https://api.github.com/users/JuliaSparse/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaSparse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaSparse/MKLSparse.jl","description":"Override sparse-dense operations when MKL is available.","fork":false,"url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl","forks_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/forks","keys_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/teams","hooks_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/events","assignees_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/tags","blobs_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/subscription","commits_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/merges","archive_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/downloads","issues_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/releases{/id}","created_at":"2015-06-28T14:14:41Z","updated_at":"2015-08-06T13:38:42Z","pushed_at":"2015-08-18T17:32:41Z","git_url":"git://github.com/JuliaSparse/MKLSparse.jl.git","ssh_url":"git@github.com:JuliaSparse/MKLSparse.jl.git","clone_url":"https://github.com/JuliaSparse/MKLSparse.jl.git","svn_url":"https://github.com/JuliaSparse/MKLSparse.jl","homepage":null,"size":181,"stargazers_count":1,"watchers_count":1,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6"},"html":{"href":"https://github.com/JuliaSparse/MKLSparse.jl/pull/6"},"issue":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues/6"},"comments":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaSparse/MKLSparse.jl/statuses/66518f4d7e1c85d65c67f8986d607ddb9a2ceccf"}}}}