@@ -44,6 +44,10 @@ blockdim = 5
4444 @test size (d_x) == (m, 1 )
4545 x = sprand (m,n,0.2 )
4646 d_x = CuSparseMatrixCSC (x)
47+ d_tx = CuSparseMatrixCSC (transpose (x))
48+ d_ax = CuSparseMatrixCSC (adjoint (x))
49+ @test size (d_tx) == (n,m)
50+ @test size (d_ax) == (n,m)
4751 @test CuSparseMatrixCSC (d_x) === d_x
4852 @test length (d_x) == m* n
4953 @test size (d_x) == (m,n)
@@ -55,6 +59,8 @@ blockdim = 5
5559 @test sprint (show, MIME " text/plain" (), d_x) == replace (sprint (show, MIME " text/plain" (), x), " SparseMatrixCSC{Float64, Int64}" => " CuSparseMatrixCSC{Float64, Int32}" )
5660 @test Array (d_x[:]) == x[:]
5761 @test d_x[:, :] == x[:, :]
62+ @test d_tx[:, :] == transpose (x)[:, :]
63+ @test d_ax[:, :] == adjoint (x)[:, :]
5864 @test d_x[(1 , 1 )] == x[1 , 1 ]
5965 @test d_x[firstindex (d_x)] == x[firstindex (x)]
6066 @test d_x[div (end , 2 )] == x[div (end , 2 )]
@@ -91,6 +97,8 @@ blockdim = 5
9197 @test_throws ArgumentError copyto! (d_y,d_x)
9298 x = sprand (m,n,0.2 )
9399 d_x = CuSparseMatrixCOO (x)
100+ d_tx = CuSparseMatrixCOO (transpose (x))
101+ d_ax = CuSparseMatrixCOO (adjoint (x))
94102 @test CuSparseMatrixCOO (d_x) === d_x
95103 @test length (d_x) == m* n
96104 @test size (d_x) == (m,n)
@@ -107,6 +115,8 @@ blockdim = 5
107115 @test d_x[firstindex (d_x)] == x[firstindex (x)]
108116 @test d_x[div (end , 2 )] == x[div (end , 2 )]
109117 @test d_x[end ] == x[end ]
118+ @test d_tx[:, 1 ] == transpose (x)[:, 1 ]
119+ @test d_ax[1 , :] == adjoint (x)[1 , :]
110120 @test d_x[firstindex (d_x), firstindex (d_x)] == x[firstindex (x), firstindex (x)]
111121 @test d_x[div (end , 2 ), div (end , 2 )] == x[div (end , 2 ), div (end , 2 )]
112122 @test d_x[end , end ] == x[end , end ]
0 commit comments