Skip to content

Commit 1a913a0

Browse files
author
Julian
committed
Turn Sa to tuple
1 parent 26a57e1 commit 1a913a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/solve.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ end
2626
(a[1,1]*a[2,2] - a[1,2]*a[2,1])*b[3]) / d )
2727
end
2828

29-
for Sa in 2:3 # not needed for Sa = 1;
29+
for Sa in [(2,2), (3,3)] # not needed for Sa = 1;
3030
@eval begin
31-
@inline function solve(::Size{($Sa,$Sa)}, ::Size{Sb}, a::StaticMatrix{<:Any, <:Any, Ta}, b::StaticMatrix{<:Any, <:Any, Tb}) where {Sb, Ta, Tb}
31+
@inline function solve(::Size{$Sa}, ::Size{Sb}, a::StaticMatrix{<:Any, <:Any, Ta}, b::StaticMatrix{<:Any, <:Any, Tb}) where {Sb, Ta, Tb}
3232
d = det(a)
3333
T = typeof((one(Ta)*zero(Tb) + one(Ta)*zero(Tb))/d)
3434
c = similar(b, T)
3535
for col = 1:Sb[2]
36-
@inbounds c[:, col] = solve(Size($Sa,$Sa), Size($Sa,), a, b[:, col])
36+
@inbounds c[:, col] = solve(Size($Sa), Size($Sa[1],), a, b[:, col])
3737
end
3838
return similar_type(b, T)(c)
3939
end

0 commit comments

Comments
 (0)