Polly 19.0.0git
isl_pw_split_dims_templ.c
Go to the documentation of this file.
1/*
2 * Copyright 2010 INRIA Saclay
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
8 * 91893 Orsay, France
9 */
10
11#include <isl_pw_macro.h>
12
13__isl_give PW *FN(PW,split_dims)(__isl_take PW *pw,
14 enum isl_dim_type type, unsigned first, unsigned n)
15{
16 int i;
17 isl_size n_piece;
18
19 n_piece = FN(PW,n_piece)(pw);
20 if (n_piece < 0)
21 return FN(PW,free)(pw);
22 if (n == 0)
23 return pw;
24
25 if (type == isl_dim_in)
27
28 for (i = 0; i < n; ++i) {
30
31 domain = FN(PW,take_domain_at)(pw, i);
33 pw = FN(PW,restore_domain_at)(pw, i, domain);
34 }
35
36 return pw;
37}
#define FN(TYPE, NAME)
#define __isl_take
Definition: ctx.h:22
#define __isl_give
Definition: ctx.h:19
int isl_size
Definition: ctx.h:96
#define PW
Definition: isl_aff.c:4582
enum isl_fold type
Definition: isl_test.c:4017
struct isl_set isl_set
Definition: map_type.h:26
__isl_give isl_set * isl_set_split_dims(__isl_take isl_set *set, enum isl_dim_type type, unsigned first, unsigned n)
Definition: isl_map.c:8990
isl_dim_type
Definition: space_type.h:13
@ isl_dim_in
Definition: space_type.h:16
@ isl_dim_set
Definition: space_type.h:18
static Signature domain
n
Definition: youcefn.c:8