Open edubois opened 6 years ago
Just a change in syntax and formatting, but I usually write it as:
out(x, y, c) = select(c == 0, selection[0],
c == 1, selection[1],
c == 2, selection[2],
selection[3]);
Ok, but this implies a if that has a cost, isn't it?
I would normally couple this with out.reorder(c, x, y).bound(c, 0, 4).unroll(c) to make the select go away.
Ok, I see. Last question: is the auto scheduler doing that automatically?
No, the autoscheduler doesn't know that trick.
Ok, thanks, good to know.
I just remembered something bad that I saw, and is somehow related to this last fact: the autoscheduler vs bounds of the channels: I saw that it is adding a parallelization on the channel dimension, which is not making sense. What do you think?
Hi, As I cannot write this:
Is there a better way to write this?
out(x, y, c) = select(c == 0, selection[0], select(c == 1, selection[1], select(c == 2, selection[2], selection[3])));