brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 37392f5 Raw
47 lines · c
1/*2 * Copyright 2018      Sven Verdoolaege3 * Copyright 2019      Cerebras Systems4 *5 * Use of this software is governed by the MIT license6 *7 * Written by Sven Verdoolaege,8 * Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA9 */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 equal16 * to isl_dim_out.17 */18isl_bool FN(PW,has_range_tuple_id)(__isl_keep PW *pw)19{20	return FN(PW,has_tuple_id)(pw, 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 equal28 * 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, 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 equal40 * 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, isl_dim_out, id);46}47