Polly 23.0.0git
isl_multi_check_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#include <isl_multi_macro.h>
10
11/* Does the space of "domain" correspond to that of the domain of "multi"?
12 * The parameters do not need to be aligned.
13 */
14static isl_bool FN(MULTI(BASE),compatible_domain)(
16{
17 isl_bool ok;
18 isl_space *space, *domain_space;
19
20 domain_space = FN(DOM,get_space)(domain);
21 space = FN(MULTI(BASE),get_space)(multi);
22 ok = isl_space_has_domain_tuples(domain_space, space);
23 isl_space_free(space);
24 isl_space_free(domain_space);
25
26 return ok;
27}
28
29/* Check that the space of "domain" corresponds to
30 * that of the domain of "multi", ignoring parameters.
31 */
32static isl_stat FN(MULTI(BASE),check_compatible_domain)(
34{
35 isl_bool ok;
36
37 ok = FN(MULTI(BASE),compatible_domain)(multi, domain);
38 if (ok < 0)
39 return isl_stat_error;
40 if (!ok)
42 "incompatible spaces", return isl_stat_error);
43
44 return isl_stat_ok;
45}
#define FN(TYPE, NAME)
isl_stat
Definition ctx.h:84
@ isl_stat_error
Definition ctx.h:85
@ isl_stat_ok
Definition ctx.h:86
#define isl_die(ctx, errno, msg, code)
Definition ctx.h:138
@ isl_error_invalid
Definition ctx.h:80
#define __isl_keep
Definition ctx.h:25
isl_bool
Definition ctx.h:89
#define BASE
Definition flow_cmp.c:49
#define MULTI(BASE)
#define DOM
isl_bool isl_space_has_domain_tuples(__isl_keep isl_space *space1, __isl_keep isl_space *space2)
Definition isl_space.c:2626
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
Definition isl_space.c:478
static Signature domain