1 Star 0 Fork 4

fxfunc/swcodegen

forked from 锦轩/swcodegen 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
slave_array_tile.h 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
锦轩 提交于 2020-07-19 21:24 . add slave*.* files
#ifndef SLAVE_ARRAY_TILE_H
#define SLAVE_ARRAY_TILE_H
#include <isl/aff_type.h>
#include <isl/map_type.h>
#include <isl/val.h>
/* The current index is such that if you add "shift",
* then the result is always a multiple of "stride",
* where "stride" may be equal to 1.
* Let D represent the initial tile->depth dimensions of the computed schedule.
* The spaces of "lb" and "shift" are of the form
*
* D -> [b]
*/
struct slave_array_bound {
isl_val *size;
isl_aff *lb;
isl_val *stride;
isl_aff *shift;
};
/* A tile of an outer array.
*
* requires_unroll is set if the schedule dimensions that are mapped
* to threads need to be unrolled for this (private) tile to be used.
*
* "depth" reflects the number of schedule dimensions that affect the tile.
* The copying into and/or out of the tile is performed at that depth.
*
* n is the dimension of the array.
* bound is an array of size "n" representing the lower bound
* and size for each index.
*
* tiling maps a tile in the global array to the corresponding
* shared/private memory tile and is of the form
*
* { [D[i] -> A[a]] -> T[(a + shift(i))/stride - lb(i)] }
*
* where D represents the initial "depth" dimensions
* of the computed schedule.
*/
struct slave_array_tile {
isl_ctx *ctx;
int requires_unroll;
int depth;
int n;
struct slave_array_bound *bound;
isl_multi_aff *tiling;
};
struct slave_array_tile *slave_array_tile_create(isl_ctx *ctx, int n_index);
struct slave_array_tile *slave_array_tile_free(struct slave_array_tile *tile);
__isl_give isl_val *slave_array_tile_size(struct slave_array_tile *tile);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/fxfunc/swcodegen.git
git@gitee.com:fxfunc/swcodegen.git
fxfunc
swcodegen
swcodegen
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385