Polly
23.0.0git
llvm-project
polly
lib
External
isl
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
/* Data structure that specifies how isl_multi_*_un_op should
13
* modify its input.
14
*
15
* If "fn_space" is set, then it is applied to the space.
16
*
17
* "fn_el" is applied to each base expression.
18
*/
19
S
(
MULTI
(
BASE
),un_op_control) {
20
__isl_give
isl_space
*(*fn_space)(
__isl_take
isl_space
*space);
21
__isl_give
EL
*(*fn_el)(
__isl_take
EL
*el);
22
};
23
24
/* Modify "multi" based on "control".
25
*/
26
static
__isl_give
MULTI
(
BASE
) *
FN
(
MULTI
(
BASE
),
un_op
)(
27
__isl_take
MULTI
(
BASE
) *multi,
S
(
MULTI
(
BASE
),un_op_control) *control)
28
{
29
int
i;
30
isl_size
n
;
31
isl_space
*space;
32
33
n
=
FN
(
MULTI
(
BASE
),
size
)(multi);
34
if
(
n
< 0)
35
return
FN
(
MULTI
(
BASE
),free)(multi);
36
37
for
(i = 0; i <
n
; ++i) {
38
EL
*el;
39
40
el =
FN
(
MULTI
(
BASE
),take_at)(multi, i);
41
el = control->fn_el(el);
42
multi =
FN
(
MULTI
(
BASE
),restore_at)(multi, i, el);
43
}
44
45
if
(!control->fn_space)
46
return
multi;
47
48
space =
FN
(
MULTI
(
BASE
),take_space)(multi);
49
space = control->fn_space(space);
50
multi =
FN
(
MULTI
(
BASE
),restore_space)(multi, space);
51
52
return
multi;
53
}
FN
#define FN(TYPE, NAME)
Definition
check_parse_fail_test_templ.c:15
__isl_take
#define __isl_take
Definition
ctx.h:22
__isl_give
#define __isl_give
Definition
ctx.h:19
isl_size
int isl_size
Definition
ctx.h:97
BASE
#define BASE
Definition
flow_cmp.c:49
EL
#define EL
Definition
isl_aff_private.h:25
S
#define S(TYPE, NAME)
Definition
isl_list_templ.c:23
isl_multi_macro.h
MULTI
#define MULTI(BASE)
Definition
isl_multi_macro.h:6
size
const char * size
Definition
isl_test.c:1578
isl_space
Definition
isl_space_private.h:10
un_op
static std::vector< Signature > un_op
Definition
template_cpp.cc:412
n
n
Definition
youcefn.c:8
Generated on
for Polly by
1.14.0