@@ -24,9 +24,10 @@ struct 🦋workspace{T}
2424 U:: Matrix{T}
2525 V:: Matrix{T}
2626 out:: Vector{T}
27+ n:: Int
2728 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 )
3031 if (M % 4 != 0 )
3132 A = pad! (A)
3233 xn = 4 - M % 4
@@ -35,20 +36,20 @@ struct 🦋workspace{T}
3536 U, V = (similar (A), similar (A))
3637 ws = 🦋generate_random! (A)
3738 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 )
3940 end
4041end
4142
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
4445 🦋mul! (A, ws)
4546 F = RecursiveFactorization. lu! (A, Val (false ), thread)
4647
4748 mul! (b, U' , b)
4849 ldiv! (b, UnitLowerTriangular (F. factors), b, thread)
4950 ldiv! (b, UpperTriangular (F. factors), b, thread)
5051 mul! (b, V, b)
51- out .= @view b[1 : M]
52+ out .= @view b[1 : N]
5253 out
5354end
5455
0 commit comments