We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d39f830 commit 0656a12Copy full SHA for 0656a12
src/systems/codegen_utils.jl
@@ -79,8 +79,8 @@ function array_variable_assignments(args...; argument_name = generated_argument_
79
# to help reduce allocations
80
if first(idxs) < last(idxs) && vec(idxs) == first(idxs):last(idxs)
81
idxs = first(idxs):last(idxs)
82
- elseif vec(idxs) == last(idxs):-1:first(idxs)
83
- idxs = last(idxs):-1:first(idxs)
+ elseif vec(idxs) == first(idxs):-1:last(idxs)
+ idxs = first(idxs):-1:last(idxs)
84
else
85
# Otherwise, turn the indexes into an `SArray` so they're stack-allocated
86
idxs = SArray{Tuple{size(idxs)...}}(idxs)
0 commit comments