| 1 | /* |
| 2 | * Copyright 2018 Sven Verdoolaege |
| 3 | * Copyright 2019 Cerebras Systems |
| 4 | * |
| 5 | * Use of this software is governed by the MIT license |
| 6 | * |
| 7 | * Written by Sven Verdoolaege, |
| 8 | * Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA |
| 9 | */ |
| 10 | |
| 11 | /* Does the (range) tuple of "pw" have an identifier? |
| 12 | * |
| 13 | * Technically, the implementation should use isl_dim_set if "pw" |
| 14 | * lives in a set space and isl_dim_out if it lives in a map space. |
| 15 | * Internally, however, it can be assumed that isl_dim_set is equal |
| 16 | * to isl_dim_out. |
| 17 | */ |
| 18 | isl_bool FN(PW,has_range_tuple_id)(__isl_keep PW *pw) |
| 19 | { |
| 20 | return FN(PW,has_tuple_id)(pw, type: isl_dim_out); |
| 21 | } |
| 22 | |
| 23 | /* Return the identifier of the (range) tuple of "pw", assuming it has one. |
| 24 | * |
| 25 | * Technically, the implementation should use isl_dim_set if "pw" |
| 26 | * lives in a set space and isl_dim_out if it lives in a map space. |
| 27 | * Internally, however, it can be assumed that isl_dim_set is equal |
| 28 | * to isl_dim_out. |
| 29 | */ |
| 30 | __isl_give isl_id *FN(PW,get_range_tuple_id)(__isl_keep PW *pw) |
| 31 | { |
| 32 | return FN(PW,get_tuple_id)(pw, type: isl_dim_out); |
| 33 | } |
| 34 | |
| 35 | /* Replace the identifier of the (range) tuple of "pw" by "id". |
| 36 | * |
| 37 | * Technically, the implementation should use isl_dim_set if "pw" |
| 38 | * lives in a set space and isl_dim_out if it lives in a map space. |
| 39 | * Internally, however, it can be assumed that isl_dim_set is equal |
| 40 | * to isl_dim_out. |
| 41 | */ |
| 42 | __isl_give PW *FN(PW,set_range_tuple_id)(__isl_take PW *pw, |
| 43 | __isl_take isl_id *id) |
| 44 | { |
| 45 | return FN(PW,set_tuple_id)(pw, type: isl_dim_out, id); |
| 46 | } |
| 47 | |