Polly
23.0.0git
llvm-project
polly
lib
External
isl
isl_multi_apply_explicit_domain_templ.c
Go to the documentation of this file.
1
/*
2
* Copyright 2017 Sven Verdoolaege
3
*
4
* Use of this software is governed by the MIT license
5
*
6
* Written by Sven Verdoolaege.
7
*/
8
9
/* Transform the explicit domain of "multi" by applying "fn_domain" or
10
* "fn_params" to it with extra argument "domain".
11
* In particular, if the explicit domain is a parameter set,
12
* then apply "fn_params". Otherwise, apply "fn_domain".
13
*
14
* The parameters of "multi" and "domain" are assumed to have been aligned.
15
*/
16
static
__isl_give
MULTI
(
BASE
) *
FN
(
FN
(
MULTI
(
BASE
),apply_domain),
APPLY_DOMBASE
)(
17
__isl_take
MULTI
(
BASE
) *multi,
__isl_take
APPLY_DOM
*
domain
,
18
__isl_give
DOM
*(*fn_domain)(
DOM
*
domain
,
__isl_take
APPLY_DOM
*
set
),
19
__isl_give
DOM
*(*fn_params)(
DOM
*
domain
,
__isl_take
APPLY_DOM
*
set
))
20
{
21
isl_bool
is_params;
22
DOM
*multi_dom;
23
24
multi_dom =
FN
(
MULTI
(
BASE
),get_explicit_domain)(multi);
25
is_params =
FN
(
DOM
,is_params)(multi_dom);
26
if
(is_params < 0) {
27
FN
(
APPLY_DOM
,free)(
domain
);
28
multi_dom =
FN
(
DOM
,free)(multi_dom);
29
}
else
if
(!is_params) {
30
multi_dom =
fn_domain
(multi_dom,
domain
);
31
}
else
{
32
multi_dom = fn_params(multi_dom,
domain
);
33
}
34
multi =
FN
(
MULTI
(
BASE
),set_explicit_domain)(multi, multi_dom);
35
return
multi;
36
}
37
38
#include <
isl_multi_apply_templ.c
>
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_bool
isl_bool
Definition
ctx.h:89
BASE
#define BASE
Definition
flow_cmp.c:49
APPLY_DOMBASE
#define APPLY_DOMBASE
Definition
isl_multi_apply_set_explicit_domain_templ.c:1
APPLY_DOM
#define APPLY_DOM
Definition
isl_multi_apply_set_explicit_domain_templ.c:2
isl_multi_apply_templ.c
MULTI
#define MULTI(BASE)
Definition
isl_multi_macro.h:6
DOM
#define DOM
Definition
isl_multi_macro.h:8
set
const char * set
Definition
isl_test.c:1364
domain
static Signature domain
Definition
template_cpp.cc:602
fn_domain
static std::vector< Signature > fn_domain
Definition
template_cpp.cc:613
Generated on
for Polly by
1.14.0