Polly 19.0.0git
isl_insert_domain_templ.c
Go to the documentation of this file.
1/*
2 * Copyright 2019 Cerebras Systems
3 *
4 * Use of this software is governed by the MIT license
5 *
6 * Written by Sven Verdoolaege,
7 * Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA
8 */
9
10/* Given a function defined over a parameter domain,
11 * convert it to a function defined over a domain corresponding
12 * to "domain".
13 */
16{
17 isl_size dim;
18 isl_space *obj_space;
19
20 obj_space = FN(TYPE,peek_space)(obj);
22 isl_space_check_is_set(obj_space) < 0)
23 goto error;
25 if (dim < 0)
26 goto error;
27
29
30 obj = FN(TYPE,from_range)(obj);
31 obj = FN(TYPE,add_dims)(obj, isl_dim_in, dim);
33
34 return obj;
35error:
37 FN(TYPE,free)(obj);
38 return NULL;
39}
#define TYPE
#define FN(TYPE, NAME)
#define __isl_take
Definition: ctx.h:22
#define __isl_give
Definition: ctx.h:19
int isl_size
Definition: ctx.h:96
static __isl_give isl_qpolynomial * reset_domain_space(__isl_take isl_qpolynomial *qp, void *user)
Definition: isl_fold.c:232
isl_stat isl_space_check_is_set(__isl_keep isl_space *space)
Definition: isl_space.c:83
__isl_give isl_space * isl_space_replace_params(__isl_take isl_space *dst, __isl_keep isl_space *src)
Definition: isl_space.c:2966
const char * obj
Definition: isl_test.c:3316
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
Definition: isl_space.c:445
isl_size isl_space_dim(__isl_keep isl_space *space, enum isl_dim_type type)
Definition: isl_space.c:340
@ isl_dim_in
Definition: space_type.h:16
@ isl_dim_set
Definition: space_type.h:18
static Signature domain