Polly
20.0.0git
llvm-project
polly
lib
External
isl
isl_copy_tuple_id_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
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
11
#define FN(TYPE,NAME) xFN(TYPE,NAME)
12
13
/* Copy the identifier of tuple "src_type" in "src"
14
* to that of "dst_type" in "dst", if there is any such identifier.
15
*/
16
__isl_give
TYPE
*
FN
(
TYPE
,copy_tuple_id)(
__isl_take
TYPE
*dst,
17
enum
isl_dim_type
dst_type,
__isl_keep
isl_space
*src,
18
enum
isl_dim_type
src_type)
19
{
20
isl_bool
has_id;
21
isl_id
*
id
;
22
23
has_id =
isl_space_has_tuple_id
(src, src_type);
24
if
(has_id < 0)
25
return
FN
(
TYPE
,free)(dst);
26
if
(!has_id)
27
return
dst;
28
29
id
=
isl_space_get_tuple_id
(src, src_type);
30
dst =
FN
(
TYPE
,set_tuple_id)(dst, dst_type,
id
);
31
32
return
dst;
33
}
TYPE
#define TYPE
Definition:
check_parse_fail_test_templ.c:13
__isl_take
#define __isl_take
Definition:
ctx.h:22
__isl_give
#define __isl_give
Definition:
ctx.h:19
__isl_keep
#define __isl_keep
Definition:
ctx.h:25
isl_bool
isl_bool
Definition:
ctx.h:89
FN
#define FN(TYPE, NAME)
Definition:
isl_copy_tuple_id_templ.c:11
id
const char * id
Definition:
isl_test.c:7279
isl_space_has_tuple_id
isl_bool isl_space_has_tuple_id(__isl_keep isl_space *space, enum isl_dim_type type)
Definition:
isl_space.c:572
isl_space_get_tuple_id
__isl_give isl_id * isl_space_get_tuple_id(__isl_keep isl_space *space, enum isl_dim_type type)
Definition:
isl_space.c:598
isl_dim_type
isl_dim_type
Definition:
space_type.h:13
isl_id
Definition:
isl_id_private.h:21
isl_space
Definition:
isl_space_private.h:10
Generated on Wed Nov 13 2024 03:17:22 for Polly by
1.9.6