Polly
23.0.0git
llvm-project
polly
lib
External
isl
isl_multi_intersect.c
Go to the documentation of this file.
1
/*
2
* Copyright 2011 Sven Verdoolaege
3
* Copyright 2012-2013 Ecole Normale Superieure
4
*
5
* Use of this software is governed by the MIT license
6
*
7
* Written by Sven Verdoolaege,
8
* Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France
9
*/
10
11
#include <
isl_multi_macro.h
>
12
13
/* Intersect the parameter domain "dom1" with "dom2".
14
* That is, intersect the parameters of "dom2" with "dom1".
15
*
16
* Even though "dom1" is known to only involve parameter constraints,
17
* it may be of type isl_union_set, so explicitly convert it
18
* to an isl_set first.
19
*/
20
static
__isl_give
DOM
*
FN
(
MULTI
(
BASE
),params_domain_intersect)(
DOM
*dom1,
21
__isl_take
DOM
*dom2)
22
{
23
isl_set
*
params
;
24
25
params
=
FN
(
DOM
,
params
)(dom1);
26
dom2 =
FN
(
DOM
,intersect_params)(dom2,
params
);
27
28
return
dom2;
29
}
30
31
/* Intersect the domain of "multi" with "domain".
32
*
33
* If "multi" has an explicit domain, then only this domain
34
* needs to be intersected.
35
*/
36
__isl_give
MULTI
(
BASE
) *
FN
(
MULTI
(
BASE
),intersect_domain)(
37
__isl_take
MULTI
(
BASE
) *multi,
__isl_take
DOM
*
domain
)
38
{
39
if
(
FN
(
MULTI
(
BASE
),check_compatible_domain)(multi,
domain
) < 0)
40
domain
=
FN
(
DOM
,free)(
domain
);
41
return
FN
(
FN
(
MULTI
(
BASE
),
apply
),
DOMBASE
)(multi,
domain
,
42
&
FN
(
EL
,intersect_domain),
43
&
FN
(
DOM
,
intersect
),
44
&
FN
(
MULTI
(
BASE
),params_domain_intersect));
45
}
46
47
/* Intersect the parameter domain of "multi" with "domain".
48
*
49
* If "multi" has an explicit domain, then only this domain
50
* needs to be intersected.
51
*/
52
__isl_give
MULTI
(
BASE
) *
FN
(
MULTI
(
BASE
),intersect_params)(
53
__isl_take
MULTI
(
BASE
) *multi,
__isl_take
isl_set
*
domain
)
54
{
55
return
FN
(
MULTI
(
BASE
),apply_set)(multi,
domain
,
56
&
FN
(
EL
,intersect_params),
57
&
FN
(
DOM
,intersect_params),
58
&
FN
(
DOM
,intersect_params));
59
}
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
DOMBASE
#define DOMBASE
Definition
isl_aff.c:4121
EL
#define EL
Definition
isl_aff_private.h:25
isl_set
#define isl_set
Definition
isl_map_private.h:15
isl_multi_macro.h
MULTI
#define MULTI(BASE)
Definition
isl_multi_macro.h:6
DOM
#define DOM
Definition
isl_multi_macro.h:8
params
static Kind params
Definition
template_cpp.cc:987
apply
static TupleKindPtr apply(const TupleKindPtr tuple, const Substitution &subs)
Definition
template_cpp.cc:82
domain
static Signature domain
Definition
template_cpp.cc:602
intersect
static std::vector< std::string > intersect(const std::vector< std::string > &v1, const std::vector< std::string > &v2)
Definition
template_cpp.cc:386
Generated on
for Polly by
1.14.0