Brick Library 0.1
Performance-portable stencil datalayout & codegen
|
Interface to code generator. More...
Go to the source code of this file.
Macros | |
#define | bElem double |
Basic datatype for all brick elements. | |
#define | VS_STRING(...) #__VA_ARGS__ |
#define | VS_TOSTR(...) VS_STRING(__VA_ARGS__) |
#define | _SELECTMACRO(_v0, _v1, _v2, _v3, _v4, _v6, NAME, ...) NAME |
#define | tile(...) _SELECTMACRO(__VA_ARGS__, 0, _tile5, _tile4)(__VA_ARGS__) |
Inject stencil code for tiling here. | |
#define | _tile4(file, vec, vsdim, titer) do { _Pragma(VS_TOSTR(vecscatter Scatter Tile(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, tile_iter=titer, dim=vsdim))) } while (false) |
4 argument variation of tile(...) | |
#define | _tile5(file, vec, vsdim, titer, stri) do { _Pragma(VS_TOSTR(vecscatter Scatter Tile(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, tile_iter=titer, dim=vsdim, stride=stri))) } while (false) |
5 argument variation of tile(...) | |
#define | brick(...) _SELECTMACRO(__VA_ARGS__, _brick6, _brick5)(__VA_ARGS__) |
Inject stencil code for brick datalayout. | |
#define | _brick5(file, vec, vsdim, vsfold, brickIdx) do { _Pragma(VS_TOSTR(vecscatter Scatter Brick(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, bidx=VS_TOSTR(brickIdx), dim=vsdim, fold=vsfold))) } while (false) |
5 arguments version of brick(...) | |
#define | _brick6(file, vec, vsdim, vsfold, brickIdx, stri) do { _Pragma(VS_TOSTR(vecscatter Scatter Brick(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, bidx=VS_TOSTR(brickIdx), dim=vsdim, fold=vsfold, stride=stri))) } while (false) |
5 arguments version of brick(...) | |
Interface to code generator.
#define _brick5 | ( | file, | |
vec, | |||
vsdim, | |||
vsfold, | |||
brickIdx | |||
) | do { _Pragma(VS_TOSTR(vecscatter Scatter Brick(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, bidx=VS_TOSTR(brickIdx), dim=vsdim, fold=vsfold))) } while (false) |
5 arguments version of brick(...)
file | Path to the python stencil expression file as a string. |
vec | Vectorization ISA, available choices see Vectorization in Bricks |
vsdim | Brick dimensions |
vsfold | (folded-)Vector dimensions |
brickIdx | Index of the brick to compute |
If file is given as a relative path, it is specified as relative to the current file.
Use from brick(...), for example:
#define _brick6 | ( | file, | |
vec, | |||
vsdim, | |||
vsfold, | |||
brickIdx, | |||
stri | |||
) | do { _Pragma(VS_TOSTR(vecscatter Scatter Brick(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, bidx=VS_TOSTR(brickIdx), dim=vsdim, fold=vsfold, stride=stri))) } while (false) |
5 arguments version of brick(...)
stri | Stride of shift during greedy algorithm |
For other parameters see _brick5(file, vec, vsdim, vsfold, brickIdx)
Use from brick(...), for example:
#define _SELECTMACRO | ( | _v0, | |
_v1, | |||
_v2, | |||
_v3, | |||
_v4, | |||
_v6, | |||
NAME, | |||
... | |||
) | NAME |
#define _tile4 | ( | file, | |
vec, | |||
vsdim, | |||
titer | |||
) | do { _Pragma(VS_TOSTR(vecscatter Scatter Tile(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, tile_iter=titer, dim=vsdim))) } while (false) |
4 argument variation of tile(...)
file | Path to the python stencil expression file as a string. |
vec | Vectorization ISA, available choices see Vectorization in Bricks |
vsdim | Tile dimensions |
titer | Tiling iteration index |
If file is given as a relative path, it is specified as relative to the current file.
Use from tile(...), for example:
#define _tile5 | ( | file, | |
vec, | |||
vsdim, | |||
titer, | |||
stri | |||
) | do { _Pragma(VS_TOSTR(vecscatter Scatter Tile(__FILE__, __LINE__, file, VS_TOSTR(bElem), vec, tile_iter=titer, dim=vsdim, stride=stri))) } while (false) |
5 argument variation of tile(...)
stri | Stride of shift during greedy algorithm |
For other parameters see _tile4(file, vec, vsdim, titer)
Use from tile(...), for example the following will only select shift of multiples of 4 on i-dimension:
#define bElem double |
Basic datatype for all brick elements.
#define brick | ( | ... | ) | _SELECTMACRO(__VA_ARGS__, _brick6, _brick5)(__VA_ARGS__) |
Inject stencil code for brick datalayout.
Versions of this call with different number of variables are defined in _brick5(file, vec, vsdim, vsfold, brickIdx) and _brick6(file, vec, vsdim, vsfold, brickIdx, stri)
#define tile | ( | ... | ) | _SELECTMACRO(__VA_ARGS__, 0, _tile5, _tile4)(__VA_ARGS__) |
Inject stencil code for tiling here.
Versions of this call with different number of variables are defined in _tile4(file, vec, vsdim, titer) and _tile5(file, vec, vsdim, titer, stri).
#define VS_STRING | ( | ... | ) | #__VA_ARGS__ |
#define VS_TOSTR | ( | ... | ) | VS_STRING(__VA_ARGS__) |