5

I work on converting a large Matlab code to C++ and CUDA. I have problems converting some sparse matrix operations like:

1. full_Matrix    *  sparse_Matrix
2. sparse_Matrix  *  full_Matrix
3. sparse_Matrix  *  sparse_Matrix    (SOLVED WITH CUSP)
4. full_Matrix   .*  sparse_Matrix    (elementwise multiplication)
5. sparse_Matrix  *  full_Matrix      (elementwise multiplication)
6. sparse_Matrix .*  sparse_Matrix    (elementwise multiplication)

I was able to solve 2 using CUSPARSE and 3 using CUSP, however I wasn't able to use CUSP (or CUSPARSE) for elementwise matrix multiplication or for problem 1.

I'm interested if there is a CUDA library that implements all the above operations (preferably an open source one).

talonmies
  • 70,661
  • 34
  • 192
  • 269
mmisu
  • 393
  • 2
  • 8
  • @Anycorn While theoretically correct, you are doing 3 transpositions which can be overkill (depends on your arrays size of course). – mmisu Mar 29 '12 at 04:51
  • you should be able to specify transpose flags, hence only 1 transpose. – Anycorn Mar 29 '12 at 04:53
  • I stand corrected only 2 transpose. If you use Cusparse you can specify the transpose flag only for the left array. – mmisu Mar 29 '12 at 05:04

0 Answers0