Reputation: 242
I need a function that performs operation y = y + s*A*x
on CUDA.
Where y
is complex vector (cuDoubleComplex
, for instance), x
is double vector, A
is double sparse matrix (csr format) and s
is complex scalar.
Question: Is there any library to perform that operation?
I would like to skip transformation everything to complex, unless you convince me that it can be done efficiently.
P.S.
Unfortunately, it can't be done by cusparse functioncusparseCsrmvEx()
Upvotes: 0
Views: 146
Reputation: 72343
Is there any library to perform that operation?
Almost certainly not. The type promotion you need to do pretty much rules that out. What you could to is something like:
cusparseDcsrmv
to yield z0 = A*xZaxpy
to calculate y = y + s * z1Even better would be to write a custom kernel to fuse (2) and (3) together. Your choice.
Upvotes: 1