Closed ninegua closed 6 years ago
All tests pass for python 3.6. There is some fusion issue with python 2.7 where some statement gets in between two parfors (in test_fusion_argmin
). I think a minor fix will do, but I probably won't have time for it.
It looks good to me overall. We can fix the 2.7 issue later. I think more comments would help with maintenance moving forward.
Add
pndindex
as another parallel iterator in addition toprange
, mirroring the sequential counter partndindex
.So function
_convert_prange
is now called_convert_loop
, processes loops from inner to outer, and is no longer nested.Simplify the implementation of reduction implementation by directly giving parallel implementations as Python functions using either
pndindex
orprange
, which are inlined in preparfor stage.Also pass return type as the argument to the parallel function implementors, which helps type inference.
Translate
reduce(A[M])
to a single loop whenM
is a boolean array. The case where the actual reduction is being implemented aspndindex
loop is also handled.