cuda - cusparse sparse plus dense matrix addition -


is possible add sparse matrix , dense matrix using cusparse? in cublas, i'd treat matrices vectors , use axpy. cusparse have axpy sparse/dense vectors, cannot used matrices because sparse vectors , matrices have different memory structure.

cusparse has dense-to-sparse , sparse-to-dense conversion routines. could:

  1. convert sparse matrix dense (e.g. cusparse<t>csr2dense), add 2 cublas<t>geam, producing dense matrix result
  2. convert dense matrix sparse (e.g. cusparse<t>dense2csr), use cusparse<t>csrgeam produce sparse result

note using cusparse<t>geam little bit more involved single function call, usage methodology given in the documentation. also, when using cusparse<t>dense2csr, want use cusparse<t>nnz storage allocations needed.


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -