Polly
20.0.0git
llvm-project
polly
lib
External
isl
isl_multi_cmp.c
Go to the documentation of this file.
1
/*
2
* Copyright 2016 Sven Verdoolaege
3
*
4
* Use of this software is governed by the MIT license
5
*
6
* Written by Sven Verdoolaege
7
*/
8
9
#include <
isl_multi_macro.h
>
10
11
/* Compare two multi expressions.
12
*
13
* Return -1 if "multi1" is "smaller" than "multi2", 1 if "multi1" is "greater"
14
* than "multi2" and 0 if they are equal.
15
*/
16
int
FN
(
MULTI
(
BASE
),plain_cmp)(
__isl_keep
MULTI
(
BASE
) *multi1,
17
__isl_keep
MULTI
(
BASE
) *multi2)
18
{
19
int
i;
20
int
cmp
;
21
22
if
(multi1 == multi2)
23
return
0;
24
if
(!multi1)
25
return
-1;
26
if
(!multi2)
27
return
1;
28
29
cmp
=
isl_space_cmp
(multi1->space, multi2->space);
30
if
(
cmp
!= 0)
31
return
cmp
;
32
33
for
(i = 0; i < multi1->n; ++i) {
34
cmp
=
FN
(
EL
,plain_cmp)(multi1->u.p[i], multi2->u.p[i]);
35
if
(
cmp
!= 0)
36
return
cmp
;
37
}
38
39
return
0;
40
}
FN
#define FN(TYPE, NAME)
Definition:
check_parse_fail_test_templ.c:15
__isl_keep
#define __isl_keep
Definition:
ctx.h:25
BASE
#define BASE
Definition:
flow_cmp.c:49
cmp
int GMPQAPI() cmp(mp_rat op1, mp_rat op2)
Definition:
imath/gmp_compat.c:61
EL
#define EL
Definition:
isl_aff_private.h:238
isl_multi_macro.h
MULTI
#define MULTI(BASE)
Definition:
isl_multi_macro.h:6
isl_space_cmp
int isl_space_cmp(__isl_keep isl_space *space1, __isl_keep isl_space *space2)
Definition:
isl_space.c:3364
Generated on Wed Nov 13 2024 03:17:25 for Polly by
1.9.6