File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ using LinearAlgebra
4
4
using Test
5
5
6
6
@testset " ThreadedSparseArrays.jl" begin
7
- M, N = 5000 , 4000
7
+ N = 4000
8
8
n = 200
9
9
T = ComplexF64
10
10
11
11
C = sprand (T, N, n, 0.05 )
12
- @testset " $(Mat) " for Mat in [ThreadedSparseMatrixCSC, ThreadedColumnizedSparseMatrix]
12
+ @testset " $(Mat) _R " for Mat in [ThreadedSparseMatrixCSC, ThreadedColumnizedSparseMatrix]
13
13
Ct = Mat (C)
14
14
15
15
eye = Matrix (one (T)* I, N, N)
@@ -18,4 +18,25 @@ using Test
18
18
ref = eye* C
19
19
@test norm (ref- out) == 0
20
20
end
21
+
22
+ @testset " $(Mat) _L" for Mat in [ThreadedSparseMatrixCSC]
23
+ Ct = Mat (C)
24
+
25
+ eye = Matrix (one (T)* I, n, n)
26
+ out = zeros (T, N, n)
27
+ LinearAlgebra. mul! (out, Ct, eye)
28
+ ref = C* eye
29
+ @test norm (ref- out) == 0
30
+ end
31
+
32
+ @testset " $(Mat) _L_$(op) " for op in [adjoint,transpose], Mat in [ThreadedSparseMatrixCSC]
33
+ Ct = Mat (C)
34
+
35
+ eye = Matrix (one (T)* I, N, N)
36
+ out = zeros (T, n, N)
37
+ LinearAlgebra. mul! (out, op (Ct), eye)
38
+ ref = op (C)* eye
39
+ @test norm (ref- out) == 0
40
+ end
41
+
21
42
end
You can’t perform that action at this time.
0 commit comments