3 Star 0 Fork 1

Gitee 极速下载/isl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://repo.or.cz/isl.git
克隆/下载
isl_multi_dim_id_templ.c 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
/*
* Copyright 2011 Sven Verdoolaege
* Copyright 2013 Ecole Normale Superieure
*
* Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege,
* Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
*/
#include <isl/space.h>
#include <isl_multi_macro.h>
/* Return the position of the dimension of the given type and name
* in "multi".
* Return -1 if no such dimension can be found.
*/
int FN(MULTI(BASE),find_dim_by_name)(__isl_keep MULTI(BASE) *multi,
enum isl_dim_type type, const char *name)
{
if (!multi)
return -1;
return isl_space_find_dim_by_name(multi->space, type, name);
}
/* Return the position of the first dimension of "type" with id "id".
* Return -1 if there is no such dimension.
*/
int FN(MULTI(BASE),find_dim_by_id)(__isl_keep MULTI(BASE) *multi,
enum isl_dim_type type, __isl_keep isl_id *id)
{
if (!multi)
return -1;
return isl_space_find_dim_by_id(multi->space, type, id);
}
/* Return the id of the given dimension.
*/
__isl_give isl_id *FN(MULTI(BASE),get_dim_id)(__isl_keep MULTI(BASE) *multi,
enum isl_dim_type type, unsigned pos)
{
return multi ? isl_space_get_dim_id(multi->space, type, pos) : NULL;
}
__isl_give MULTI(BASE) *FN(MULTI(BASE),set_dim_name)(
__isl_take MULTI(BASE) *multi,
enum isl_dim_type type, unsigned pos, const char *s)
{
isl_space *space;
space = FN(MULTI(BASE),get_space)(multi);
space = isl_space_set_dim_name(space, type, pos, s);
return FN(MULTI(BASE),reset_space)(multi, space);
}
/* Set the id of the given dimension of "multi" to "id".
*/
__isl_give MULTI(BASE) *FN(MULTI(BASE),set_dim_id)(
__isl_take MULTI(BASE) *multi,
enum isl_dim_type type, unsigned pos, __isl_take isl_id *id)
{
isl_space *space;
space = FN(MULTI(BASE),get_space)(multi);
space = isl_space_set_dim_id(space, type, pos, id);
return FN(MULTI(BASE),reset_space)(multi, space);
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mirrors/isl.git
git@gitee.com:mirrors/isl.git
mirrors
isl
isl
master

搜索帮助