File tree 1 file changed +15
-15
lines changed
1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,21 @@ _totally_linear(inds::Type{Int}...) = true
35
35
_totally_linear (inds:: Type{Colon} ...) = true
36
36
_totally_linear (i1:: Type{Colon} , inds... ) = _totally_linear (inds... )
37
37
38
+ function new_out_size_nongen (:: Type{Size} , inds... ) where Size
39
+ os = []
40
+ map (Size. parameters, inds) do s, i
41
+ if i == Int
42
+ elseif i <: StaticVector
43
+ push! (os, i. parameters[1 ]. parameters[1 ])
44
+ elseif i == Colon
45
+ push! (os, s)
46
+ else
47
+ error (" Unknown index type: $i " )
48
+ end
49
+ end
50
+ return tuple (os... )
51
+ end
52
+
38
53
"""
39
54
_get_linear_inds(S, inds...)
40
55
122
137
end
123
138
end
124
139
125
- function new_out_size_nongen (:: Type{Size} , inds... ) where Size
126
- os = []
127
- map (Size. parameters, inds) do s, i
128
- if i == Int
129
- elseif i <: StaticVector
130
- push! (os, i. parameters[1 ]. parameters[1 ])
131
- elseif i == Colon
132
- push! (os, s)
133
- else
134
- error (" Unknown index type: $i " )
135
- end
136
- end
137
- return tuple (os... )
138
- end
139
-
140
140
function new_out_size (S:: Type{Size} , inds:: StaticArrays.StaticIndexing... ) where Size
141
141
return new_out_size (S, map (StaticArrays. unwrap, inds)... )
142
142
end
You can’t perform that action at this time.
0 commit comments