gpu: mimic wrap option in schedule tree
commit0d587fe99cdbc7e2d3674e11b116cd5148d51b89
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 2 Oct 2013 19:54:23 +0000 (2 21:54 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 3 Apr 2015 07:37:23 +0000 (3 09:37 +0200)
tree853ccbd38203e0ab30de0bd955671220d97d9d8e
parent1d9790a239e82f322bf7b8bc7dc7987729998f82
gpu: mimic wrap option in schedule tree

Or rather, mimic --no-wrap in the schedule tree.
If the wrap option is not set then in the flat schedule representation
the schedule dimensions that are mapped to block/thread identifiers
are first tiled by the grid/block sizes and then the tile dimensions
are optionally scaled by those sizes again.
For backward compatibility, we need to mimic this behavior in the schedule
tree representation.  If the wrap is not set, we therefore need to
perform the same changes to the bands that are mapped to block/thread
identifiers.

If the wrap option is set, then the original schedule dimensions
are left untouched and this is also what happens in the schedule
tree representation.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
gpu.c