@@ -16,7 +16,7 @@ unknown to the compiler (the element type may optionally also be specified).
16
16
"""
17
17
const SMatrix{S1, S2, T, L} = SArray{Tuple{S1, S2}, T, 2 , L}
18
18
19
- @generated function ( :: Type{ SMatrix{S1}} ) (x:: NTuple{L,Any} ) where {S1,L}
19
+ @generated function SMatrix {S1} (x:: NTuple{L,Any} ) where {S1,L}
20
20
S2 = div (L, S1)
21
21
if S1* S2 != L
22
22
throw (DimensionMismatch (" Incorrect matrix sizes. $S1 does not divide $L elements" ))
@@ -29,23 +29,23 @@ const SMatrix{S1, S2, T, L} = SArray{Tuple{S1, S2}, T, 2, L}
29
29
end
30
30
end
31
31
32
- @generated function ( :: Type{ SMatrix{S1,S2}} ) (x:: NTuple{L,Any} ) where {S1,S2,L}
32
+ @generated function SMatrix {S1,S2} (x:: NTuple{L,Any} ) where {S1,S2,L}
33
33
return quote
34
34
$ (Expr (:meta , :inline ))
35
35
T = promote_tuple_eltype (typeof (x))
36
36
SMatrix {S1, S2, T, L} (x)
37
37
end
38
38
end
39
39
SMatrixNoType{S1, S2, L, T} = SMatrix{S1, S2, T, L}
40
- @generated function ( :: Type{ SMatrixNoType{S1, S2, L}} ) (x:: NTuple{L,Any} ) where {S1,S2,L}
40
+ @generated function SMatrixNoType {S1, S2, L} (x:: NTuple{L,Any} ) where {S1,S2,L}
41
41
return quote
42
42
$ (Expr (:meta , :inline ))
43
43
T = promote_tuple_eltype (typeof (x))
44
44
SMatrix {S1, S2, T, L} (x)
45
45
end
46
46
end
47
47
48
- @generated function ( :: Type{ SMatrix{S1,S2,T}} ) (x:: NTuple{L,Any} ) where {S1,S2,T,L}
48
+ @generated function SMatrix {S1,S2,T} (x:: NTuple{L,Any} ) where {S1,S2,T,L}
49
49
return quote
50
50
$ (Expr (:meta , :inline ))
51
51
SMatrix {S1, S2, T, L} (x)
0 commit comments