Skip to content

Commit

Permalink
Have convert call CuSparseArray's constructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Sep 28, 2020
1 parent b529985 commit b32cff9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cusparse/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ abstract type AbstractCuSparseArray{Tv, N} <: AbstractSparseArray{Tv, Cint, N} e
const AbstractCuSparseVector{Tv} = AbstractCuSparseArray{Tv,1}
const AbstractCuSparseMatrix{Tv} = AbstractCuSparseArray{Tv,2}

Base.convert(T::Type{<:AbstractCuSparseArray}, m::AbstractArray) = m isa T ? m : T(m)

mutable struct CuSparseVector{Tv} <: AbstractCuSparseVector{Tv}
iPtr::CuVector{Cint}
nzVal::CuVector{Tv}
Expand Down

0 comments on commit b32cff9

Please sign in to comment.