Skip to content

Commit

Permalink
Add storage_type for Sparse CuArrays
Browse files Browse the repository at this point in the history
  • Loading branch information
nHackel authored and dpo committed Oct 9, 2024
1 parent d1b2c6c commit eb5d957
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/LinearOperatorsCUDAExt.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module LinearOperatorsCUDAExt

using LinearOperators
isdefined(Base, :get_extension) ? (using CUDA) : (using ..CUDA)
isdefined(Base, :get_extension) ? (using CUDA; using CUDA.CUSPARSE) : (using ..CUDA; using ..CUDA.CUSPARSE)

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

end # module

0 comments on commit eb5d957

Please sign in to comment.