File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
Expand file tree Collapse file tree 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
3535_totally_linear (inds:: Type{Colon} ...) = true
3636_totally_linear (i1:: Type{Colon} , inds... ) = _totally_linear (inds... )
3737
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+
3853"""
3954 _get_linear_inds(S, inds...)
4055
122137 end
123138end
124139
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-
140140function new_out_size (S:: Type{Size} , inds:: StaticArrays.StaticIndexing... ) where Size
141141 return new_out_size (S, map (StaticArrays. unwrap, inds)... )
142142end
You can’t perform that action at this time.
0 commit comments