Polly 19.0.0git
isl_multi_un_op_templ.c
Go to the documentation of this file.
1/*
2 * Copyright 2014 Ecole Normale Superieure
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege,
7 * Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
8 */
9
10#include <isl_multi_macro.h>
11
12/* Apply "fn" to each of the base expressions of "multi".
13 */
15 __isl_take MULTI(BASE) *multi, __isl_give EL *(*fn)(__isl_take EL *el))
16{
17 int i;
18 isl_size n;
19
20 n = FN(MULTI(BASE),size)(multi);
21 if (n < 0)
22 return FN(MULTI(BASE),free)(multi);
23
24 for (i = 0; i < n; ++i) {
25 EL *el;
26
27 el = FN(MULTI(BASE),take_at)(multi, i);
28 el = fn(el);
29 multi = FN(MULTI(BASE),restore_at)(multi, i, el);
30 }
31
32 return multi;
33}
#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 BASE
Definition: flow_cmp.c:49
isl_stat isl_stat(* fn)(__isl_take ISL_KEY *key, __isl_take ISL_VAL *val, void *user)
Definition: hmap.h:37
#define EL
#define MULTI(BASE)
const char * size
Definition: isl_test.c:1570
static std::vector< Signature > un_op
n
Definition: youcefn.c:8