Skip to content

Commit 2a19fd9

Browse files
authored
make _strides type stable for tuple
1 parent 671fae8 commit 2a19fd9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/operators_dense.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ function _strides(shape)
274274
return S
275275
end
276276

277+
function _strides(shape::Ty)::Ty where Ty <: Tuple
278+
accumulate(*, (1,Base.front(shape)...))
279+
end
280+
277281
# Dense operator version
278282
@generated function _ptrace(::Type{Val{RANK}}, a,
279283
shape_l, shape_r,

0 commit comments

Comments
 (0)