Skip to content

Commit 3561f73

Browse files
committed
[CUSPARSE] Add a method convert for the type cusparseSpSMUpdate_t
1 parent c30ede9 commit 3561f73

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/cusparse/types.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,13 @@ function Base.convert(::Type{cusparseSpSVUpdate_t}, update::SparseChar)
147147
throw(ArgumentError("Unknown update $update"))
148148
end
149149
end
150+
151+
function Base.convert(::Type{cusparseSpSMUpdate_t}, update::SparseChar)
152+
if update == 'G'
153+
CUSPARSE_SPSM_UPDATE_GENERAL
154+
elseif update == 'D'
155+
CUSPARSE_SPSM_UPDATE_DIAGONAL
156+
else
157+
throw(ArgumentError("Unknown update $update"))
158+
end
159+
end

0 commit comments

Comments
 (0)