madeleineudell / ParallelSparseMatMul.jl

A Julia library for parallel sparse matrix multiplication using shared memory
Other
43 stars 13 forks source link

Multiplication between SharedSparseMatrixCSC is not implemented. #4

Open ingenieroariel opened 10 years ago

ingenieroariel commented 10 years ago

@madeleineudell is the multiplication only implemented against shared arrays? Not sure if I am doing the wrong thing here:

using ParallelSparseMatMul

dimensions, components, samples = 180, 100, 1500

dictionary = shsprandn(dimensions, components, 0.1)
original_code = shsprandn(components, samples, 0.1)

data = dictionary * original_code

Returned error is:

julia> data = dictionary * original_code
ERROR: no method *(SharedSparseMatrixCSC{Float64,Int64}, SharedSparseMatrixCSC{Float64,Int64})
madeleineudell commented 10 years ago

Yes, multiplication is only implemented against shared one-dimensional arrays (or other vectors, by casting then to 1-D shared arrays). It wouldn't be hard to extend to higher dimensional shared arrays, though. Or you can just loop over columns of the matrix you want to multiply by the SharedMatrix.

Madeleine

Madeleine Udell PhD Candidate in Computational and Mathematical Engineering Stanford University www.stanford.edu/~udell On Feb 21, 2014 5:53 AM, "Ariel Núñez" notifications@github.com wrote:

@madeleineudell https://github.com/madeleineudell is the multiplication only implemented against shared arrays? Not sure if I am doing the wrong thing here:

using ParallelSparseMatMul

dimensions, components, samples = 180, 100, 1500

dictionary = shsprandn(dimensions, components, 0.1) original_code = shsprandn(components, samples, 0.1)

data = dictionary * original_code

Returned error is:

julia> data = dictionary * original_code ERROR: no method *(SharedSparseMatrixCSC{Float64,Int64}, SharedSparseMatrixCSC{Float64,Int64})

Reply to this email directly or view it on GitHubhttps://github.com/madeleineudell/ParallelSparseMatMul.jl/issues/4 .