Skip to content

Commit eb5d957

Browse files
nHackeldpo
authored andcommitted
Add storage_type for Sparse CuArrays
1 parent d1b2c6c commit eb5d957

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/LinearOperatorsCUDAExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
module LinearOperatorsCUDAExt
22

33
using LinearOperators
4-
isdefined(Base, :get_extension) ? (using CUDA) : (using ..CUDA)
4+
isdefined(Base, :get_extension) ? (using CUDA; using CUDA.CUSPARSE) : (using ..CUDA; using ..CUDA.CUSPARSE)
55

66
LinearOperators.storage_type(::CuArray{T, 2, D}) where {T, D} = CuArray{T, 1, D}
7+
LinearOperators.storage_type(::AbstractCuSparseMatrix{T}) where {T} = CuArray{T, 1, CUDA.DeviceMemory}
78

89
end # module

0 commit comments

Comments
 (0)