Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Commit 713422b

Browse files
committed
Fix A' * x products for complex CuSparseMatrixCSC
1 parent c0a73bc commit 713422b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/sparse/wrappers.jl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,17 +567,22 @@ for (fname,elty) in ((:cusparseScsrmv, :Float32),
567567
ctransa = 'T'
568568
end
569569
cutransa = cusparseop(ctransa)
570-
cuind = cusparseindex(index)
571-
cudesc = getDescr(A,index)
572570
n,m = Mat.dims
573571
if ctransa == 'N'
574-
chkmvdims(X,n,Y,m)
572+
chkmvdims(X, n, Y, m)
575573
end
576574
if ctransa == 'T' || ctransa == 'C'
577-
chkmvdims(X,m,Y,n)
575+
chkmvdims(X, m, Y, n)
576+
end
577+
cudesc = getDescr(A,index)
578+
nzVal = Mat.nzVal
579+
if transa == 'C' && $elty <: Complex
580+
nzVal = conj(Mat.nzVal)
578581
end
579-
$fname(handle(), cutransa, m, n, Mat.nnz, [alpha], Ref(cudesc),
580-
Mat.nzVal, Mat.colPtr, Mat.rowVal, X, [beta], Y)
582+
583+
$fname(handle(),
584+
cutransa, m, n, Mat.nnz, [alpha], Ref(cudesc), nzVal,
585+
Mat.colPtr, Mat.rowVal, X, [beta], Y)
581586
Y
582587
end
583588
end

0 commit comments

Comments
 (0)