Skip to content

Commit c47aeef

Browse files
committed
Remove buffer in gemv
1 parent 2b1bb15 commit c47aeef

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/mkl/wrappers_sparse.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,14 @@ for (fname, elty) in ((:onemklSsparse_gemv, :Float32),
158158
# conj(y_new) = conj(alpha) * (A^T) * conj(x) + conj(beta) * conj(y)
159159
# Since S=A^T and op='N' computes S*x = A^T*x, we can realize this with one call.
160160
y .= conj.(y)
161-
x_conj = similar(x)
162-
x_conj .= conj.(x)
161+
x .= conj.(x)
163162

164163
queue = global_queue(context(x), device())
165-
$fname(sycl_queue(queue), 'N', conj(alpha), A.handle, x_conj, conj(beta), y)
164+
$fname(sycl_queue(queue), 'N', conj(alpha), A.handle, x, conj(beta), y)
166165

167166
y .= conj.(y)
167+
# Restore x
168+
x .= conj.(x)
168169
return y
169170
else
170171
# real eltype: A^H == A^T

0 commit comments

Comments
 (0)