@@ -24,9 +24,10 @@ struct 🦋workspace{T}
24
24
U:: Matrix{T}
25
25
V:: Matrix{T}
26
26
out:: Vector{T}
27
+ n:: Int
27
28
function 🦋workspace (A, b, :: Val{SEED} = Val (888 )) where {SEED}
28
- M = size (A, 1 )
29
- out = similar (b, M )
29
+ N = size (A, 1 )
30
+ out = similar (b, N )
30
31
if (M % 4 != 0 )
31
32
A = pad! (A)
32
33
xn = 4 - M % 4
@@ -35,20 +36,20 @@ struct 🦋workspace{T}
35
36
U, V = (similar (A), similar (A))
36
37
ws = 🦋generate_random! (A)
37
38
materializeUV (U, V, ws)
38
- new {eltype(A)} (A, b, ws, U, V, out)
39
+ new {eltype(A)} (A, b, ws, U, V, out, N )
39
40
end
40
41
end
41
42
42
- function 🦋solve! (workspace: :🦋workspace, M, thread)
43
- (;A, b, ws, U, V, out) = workspace
43
+ function 🦋solve! (workspace: :🦋workspace, thread)
44
+ (;A, b, ws, U, V, out, N ) = workspace
44
45
🦋mul! (A, ws)
45
46
F = RecursiveFactorization. lu! (A, Val (false ), thread)
46
47
47
48
mul! (b, U' , b)
48
49
ldiv! (b, UnitLowerTriangular (F. factors), b, thread)
49
50
ldiv! (b, UpperTriangular (F. factors), b, thread)
50
51
mul! (b, V, b)
51
- out .= @view b[1 : M]
52
+ out .= @view b[1 : N]
52
53
out
53
54
end
54
55
0 commit comments