2 * Copyright 2010 INRIA Saclay
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
11 __isl_give PW
*FN(PW
,insert_dims
)(__isl_take PW
*pw
, enum isl_dim_type type
,
12 unsigned first
, unsigned n
)
15 enum isl_dim_type set_type
;
19 if (n
== 0 && !isl_space_is_named_or_nested(pw
->dim
, type
))
22 set_type
= type
== isl_dim_in
? isl_dim_set
: type
;
28 pw
->dim
= isl_space_insert_dims(pw
->dim
, type
, first
, n
);
32 for (i
= 0; i
< pw
->n
; ++i
) {
33 pw
->p
[i
].set
= isl_set_insert_dims(pw
->p
[i
].set
,
37 pw
->p
[i
].FIELD
= FN(EL
,insert_dims
)(pw
->p
[i
].FIELD
,
49 __isl_give PW
*FN(PW
,add_dims
)(__isl_take PW
*pw
, enum isl_dim_type type
,
54 pos
= FN(PW
,dim
)(pw
, type
);
56 return FN(PW
,free
)(pw
);
58 return FN(PW
,insert_dims
)(pw
, type
, pos
, n
);