Polly 20.0.0git
isl_pw_un_op_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/* Apply "fn" to each of the base expressions of "pw".
14 * The function is assumed to have no effect on the default value
15 * (i.e., zero for those objects with a default value).
16 */
18 __isl_give EL *(*fn)(__isl_take EL *el))
19{
20 isl_size n;
21 int i;
22
23 n = FN(PW,n_piece)(pw);
24 if (n < 0)
25 return FN(PW,free)(pw);
26
27 for (i = 0; i < n; ++i) {
28 EL *el;
29
30 el = FN(PW,take_base_at)(pw, i);
31 el = fn(el);
32 pw = FN(PW,restore_base_at)(pw, i, el);
33 }
34
35 return pw;
36}
#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
isl_stat isl_stat(* fn)(__isl_take ISL_KEY *key, __isl_take ISL_VAL *val, void *user)
Definition: hmap.h:37
#define PW
Definition: isl_aff.c:4582
#define EL
static std::vector< Signature > un_op
n
Definition: youcefn.c:8