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 #include <isl_pw_macro.h>
13 __isl_give PW
*FN(PW
,split_dims
)(__isl_take PW
*pw
,
14 enum isl_dim_type type
, unsigned first
, unsigned n
)
19 n_piece
= FN(PW
,n_piece
)(pw
);
21 return FN(PW
,free
)(pw
);
25 if (type
== isl_dim_in
)
28 for (i
= 0; i
< n
; ++i
) {
31 domain
= FN(PW
,take_domain_at
)(pw
, i
);
32 domain
= isl_set_split_dims(domain
, type
, first
, n
);
33 pw
= FN(PW
,restore_domain_at
)(pw
, i
, domain
);