Polly
20.0.0git
llvm-project
polly
lib
External
isl
isl_multi_domain_templ.c
Go to the documentation of this file.
1
/*
2
* Copyright 2013 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/set.h
>
11
12
#include <
isl_multi_macro.h
>
13
14
/* Return the shared domain of the elements of "multi".
15
*
16
* If "multi" has an explicit domain, then return this domain.
17
*/
18
__isl_give
isl_set
*
FN
(
MULTI
(
BASE
),
domain
)(
__isl_take
MULTI
(
BASE
) *multi)
19
{
20
int
i;
21
isl_set
*dom;
22
23
if
(!multi)
24
return
NULL;
25
26
if
(
FN
(
MULTI
(
BASE
),has_explicit_domain)(multi)) {
27
dom =
FN
(
MULTI
(
BASE
),get_explicit_domain)(multi);
28
FN
(
MULTI
(
BASE
),free)(multi);
29
return
dom;
30
}
31
32
dom =
isl_set_universe
(
FN
(
MULTI
(
BASE
),get_domain_space)(multi));
33
for
(i = 0; i < multi->n; ++i) {
34
isl_set
*dom_i;
35
36
dom_i =
FN
(
EL
,
domain
)(
FN
(
FN
(
MULTI
(
BASE
),get),
BASE
)(multi, i));
37
dom =
isl_set_intersect
(dom, dom_i);
38
}
39
40
FN
(
MULTI
(
BASE
),free)(multi);
41
return
dom;
42
}
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
BASE
#define BASE
Definition:
flow_cmp.c:49
EL
#define EL
Definition:
isl_aff_private.h:238
isl_multi_macro.h
MULTI
#define MULTI(BASE)
Definition:
isl_multi_macro.h:6
isl_set
struct isl_set isl_set
Definition:
map_type.h:26
set.h
isl_set_universe
__isl_export __isl_give isl_set * isl_set_universe(__isl_take isl_space *space)
Definition:
isl_map.c:6366
isl_set_intersect
__isl_export __isl_give isl_set * isl_set_intersect(__isl_take isl_set *set1, __isl_take isl_set *set2)
Definition:
isl_map.c:3965
domain
static Signature domain
Definition:
template_cpp.cc:602
Generated on Wed Nov 13 2024 03:17:25 for Polly by
1.9.6