I tried to go through an array in reversed order using for_range_opt, however that led to an overflow error.
The problem seems to be the calculation of n_loops in for_range_opt.
Example that leads to overflow in the second loop:
In the example, the current calculation leeds to nloops=5 in for_range_opt(3-1, -1, -1) instead of the expected nloops=3.
I was able to quickfix by replacing the n_loops calculation with
Hi,
I tried to go through an array in reversed order using for_range_opt, however that led to an overflow error. The problem seems to be the calculation of n_loops in for_range_opt.
Example that leads to overflow in the second loop:
In the example, the current calculation leeds to nloops=5 in
for_range_opt(3-1, -1, -1)
instead of the expected nloops=3. I was able to quickfix by replacing the n_loops calculation withAnother issue I noticed in the process is that for e.g
for_range_opt(0, 0, -3)
the number of loops is 1 even though it should loop 0 times.