Open ellishg opened 5 years ago
It's complaining because you're accessing the region values
inside the loop itself (i.e. values[i]
). This is probably something the optimizer could accept because you're only accessing values
, not passing it into the task.
In the mean time, you could pass values
(or a subregion of values
, if you're worried about that getting big) into the task instead of an individual element of the region.
@elliottslaughter what's the plan here?
I'm actually think it's better to discourage this since even if we support it, it would defeat the constant-time launch optimization which is important for scalability to extreme node counts. Since it hasn't come up recently I'm inclined to close this.
My understanding is that
__demand(__parallel)
should work for loops over independent tasks, but I've been getting errors when I try to use it with reductions.And the error message