|
36 | 36 | mutable struct CuDenseVectorDescriptor
|
37 | 37 | handle::cusparseDnVecDescr_t
|
38 | 38 |
|
39 |
| - function CuDenseVectorDescriptor(T::DataType, n::Integer) |
40 |
| - desc_ref = Ref{cusparseDnVecDescr_t}() |
41 |
| - cusparseCreateDnVec(desc_ref, n, CU_NULL, T) |
42 |
| - obj = new(desc_ref[]) |
43 |
| - finalizer(cusparseDestroyDnVec, obj) |
44 |
| - obj |
45 |
| - end |
46 |
| - |
47 | 39 | function CuDenseVectorDescriptor(x::DenseCuVector)
|
48 | 40 | desc_ref = Ref{cusparseDnVecDescr_t}()
|
49 | 41 | cusparseCreateDnVec(desc_ref, length(x), x, eltype(x))
|
@@ -79,18 +71,6 @@ Base.unsafe_convert(::Type{cusparseSpVecDescr_t}, desc::CuSparseVectorDescriptor
|
79 | 71 | mutable struct CuDenseMatrixDescriptor
|
80 | 72 | handle::cusparseDnMatDescr_t
|
81 | 73 |
|
82 |
| - function CuDenseMatrixDescriptor(T::DataType, m::Integer, n::Integer; transposed::Bool=false) |
83 |
| - desc_ref = Ref{cusparseDnMatDescr_t}() |
84 |
| - if transposed |
85 |
| - cusparseCreateDnMat(desc_ref, n, m, m, CU_NULL, T, 'R') |
86 |
| - else |
87 |
| - cusparseCreateDnMat(desc_ref, m, n, m, CU_NULL, T, 'C') |
88 |
| - end |
89 |
| - obj = new(desc_ref[]) |
90 |
| - finalizer(cusparseDestroyDnMat, obj) |
91 |
| - obj |
92 |
| - end |
93 |
| - |
94 | 74 | function CuDenseMatrixDescriptor(A::DenseCuMatrix; transposed::Bool=false)
|
95 | 75 | desc_ref = Ref{cusparseDnMatDescr_t}()
|
96 | 76 | if transposed
|
|
0 commit comments