This repository was archived by the owner on Mar 12, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ function size(g::CuSparseMatrix, d::Integer)
166
166
end
167
167
end
168
168
169
- issymmetric (M:: Union{CuSparseMatrixCSC,CuSparseMatrixCSR} )= false
170
- ishermitian (M:: Union{CuSparseMatrixCSC,CuSparseMatrixCSR} ) where T = false
171
- issymmetric (M:: Symmetric{CuSparseMatrixCSC} )= true
169
+ issymmetric (M:: Union{CuSparseMatrixCSC,CuSparseMatrixCSR} ) = false
170
+ ishermitian (M:: Union{CuSparseMatrixCSC,CuSparseMatrixCSR} ) = false
171
+ issymmetric (M:: Symmetric{CuSparseMatrixCSC} ) = true
172
172
ishermitian (M:: Hermitian{CuSparseMatrixCSC} ) = true
173
173
174
174
istriu (M:: UpperTriangular{T,S} ) where {T<: BlasFloat , S<: AbstractCuSparseMatrix } = true
Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ blockdim = 5
47
47
y = sprand (n,0.2 )
48
48
d_y = CuSparseVector (y)
49
49
@test_throws ArgumentError copyto! (d_y,d_x)
50
+ x = sprand (m,m,0.2 )
51
+ d_x = Symmetric (CuSparseMatrixCSC (x + transpose (x)))
52
+ @test issymmetric (d_x)
53
+ x = sprand (ComplexF64, m, m, 0.2 )
54
+ d_x = Hermitian (CuSparseMatrixCSC (x + x' ))
55
+ @test ishermitian (d_x)
56
+ x = sprand (m,m,0.2 )
57
+ d_x = UpperTriangular (CuSparseMatrixCSC (x))
58
+ @test istriu (d_x)
59
+ @test ! istril (d_x)
60
+ d_x = LowerTriangular (CuSparseMatrixCSC (x))
61
+ @test ! istriu (d_x)
62
+ @test istril (d_x)
50
63
end
51
64
52
65
@testset " char" begin
You can’t perform that action at this time.
0 commit comments