Auto Tiler Library
|
Functions | |
unsigned int | MkTCons (unsigned int Div, unsigned int Rem) |
Creates a tile dimension constraint for a kernel argument. More... | |
Object_T ** | AllocateKerArgs (unsigned int KerArgCount) |
Creates a list of user kernel arguments. More... | |
Object_T ** | KerArgs (unsigned int KerArgCount,...) |
Creates a list of user kernel arguments. More... | |
KernelArgDimDescrT * | KerArgSpace (unsigned int Dim,...) |
Define Kernel argument's iteration space. More... | |
Object_T * | KerArg (char *KerArgName, KernelArgDimDescrT *KerArgSpace, Object_Type_T ObjType, unsigned int W, unsigned int H, unsigned int ItemSize, int TileOverlap, KernelArgConstraints_T Constraint, unsigned int PreferedTileSize, char *CArgName) |
Creates one user kernel argument. Kernel argument Space is explicitely described. More... | |
Object_T * | KerArgAliased (char *KerArgName, KernelArgDimDescrT *KerArgSpace, unsigned int Alias, Object_Type_T ObjType, unsigned int W, unsigned int H, unsigned int ItemSize, int TileOverlap, KernelArgConstraints_T Constraint, unsigned int PreferedTileSize, char *CArgName) |
Object_T * | KerArgP (char *KerArgName, KernelArgDimDescrT *KerArgSpace, Object_Type_T ObjType, unsigned int W, unsigned int H, unsigned int UsedW, unsigned int UsedH, v4s PadTile, v4s PadExec, unsigned int ItemSize, int TileOverlap, KernelArgConstraints_T Constraint, unsigned int PreferedTileSize, char *CArgName) |
Creates one user kernel argument with padding on the boundaries. Kernel argument Space is explicitely described. More... | |
Object_T * | KerArgPadAlign (char *KerArgName, KernelArgDimDescrT *KerArgSpace, Object_Type_T ObjType, unsigned int W, unsigned int H, unsigned int TileWPadAlign, unsigned int ItemSize, unsigned int RawItemSize, int TileOverlap, KernelArgConstraints_T Constraint, unsigned int PreferedTileSize, char *CArgName) |
Creates one user kernel argument, extra pad on variable dim for alignment sake. Kernel argument Space is explicitely described. More... | |
Object_T * | KerArgPad (char *KerArgName, KernelArgDimDescrT *KerArgSpace, Object_Type_T ObjType, unsigned int W, unsigned int H, unsigned int BottomBuffer, unsigned int TopBuffer, unsigned int ItemSize, int TileOverlap, KernelArgConstraints_T Constraint, unsigned int PreferedTileSize, char *CArgName) |
Creates one user kernel argument with fixed padding before and after the tile generated for this argument. Kernel argument Space is explicitely described. More... | |
Object_T * | KerArgPart (char *KerArgName, KernelArgDimDescrT *KerArgSpace, Object_Type_T ObjType, unsigned int W, unsigned int UsedW, unsigned int H, unsigned int UsedH, unsigned int ItemSize, int TileOverlap, KernelArgConstraints_T Constraint, unsigned int PreferedTileSize, char *CArgName) |
Creates one user kernel argument with dimension [WxH] but used partially as [UsedWxUsedH]. Kernel argument Space is explicitely described. More... | |
Functions in this group should be used to capture user kernel arguments
Object_T** AllocateKerArgs | ( | unsigned int | KerArgCount | ) |
Creates a list of user kernel arguments.
KerArgCount | Number of user kernel arguments |
KerArgCount | Number of Kernel arguments |
Object_T* KerArg | ( | char * | KerArgName, |
KernelArgDimDescrT * | KerArgSpace, | ||
Object_Type_T | ObjType, | ||
unsigned int | W, | ||
unsigned int | H, | ||
unsigned int | ItemSize, | ||
int | TileOverlap, | ||
KernelArgConstraints_T | Constraint, | ||
unsigned int | PreferedTileSize, | ||
char * | CArgName | ||
) |
Creates one user kernel argument. Kernel argument Space is explicitely described
KerArgName | Kernel argument name |
KerArgSpace | Kernel argument space descriptor |
ObjType | Kernel argument type: logical OR of types (O_xxx) or pre defined types |
W | Kernel argument Data plane width |
H | Kernel argument Data plane height |
ItemSize | Data plane basic data type size in bytes |
TileOverlap | Amount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument |
Constraint | Kernel argument constraints |
PreferedTileSize | Tile variable dimension must be a multiple of PreferedTileSize if not 0 |
CArgName | To which user kernel C argument this kernel argument is related to |
Object_T* KerArgAliased | ( | char * | KerArgName, |
KernelArgDimDescrT * | KerArgSpace, | ||
unsigned int | Alias, | ||
Object_Type_T | ObjType, | ||
unsigned int | W, | ||
unsigned int | H, | ||
unsigned int | ItemSize, | ||
int | TileOverlap, | ||
KernelArgConstraints_T | Constraint, | ||
unsigned int | PreferedTileSize, | ||
char * | CArgName | ||
) |
KerArgName | Kernel argument name |
KerArgSpace | Kernel argument space descriptor |
ObjType | Kernel argument type: logical OR of types (O_xxx) or pre defined types |
W | Kernel argument Data plane width |
H | Kernel argument Data plane height |
ItemSize | Data plane basic data type size in bytes |
TileOverlap | Amount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument |
Constraint | Kernel argument constraints |
PreferedTileSize | Tile variable dimension must be a multiple of PreferedTileSize if not 0 |
CArgName | To which user kernel C argument this kernel argument is related to |
Object_T* KerArgP | ( | char * | KerArgName, |
KernelArgDimDescrT * | KerArgSpace, | ||
Object_Type_T | ObjType, | ||
unsigned int | W, | ||
unsigned int | H, | ||
unsigned int | UsedW, | ||
unsigned int | UsedH, | ||
v4s | PadTile, | ||
v4s | PadExec, | ||
unsigned int | ItemSize, | ||
int | TileOverlap, | ||
KernelArgConstraints_T | Constraint, | ||
unsigned int | PreferedTileSize, | ||
char * | CArgName | ||
) |
Creates one user kernel argument with padding on the boundaries. Kernel argument Space is explicitely described
KerArgName | Kernel argument name |
KerArgSpace | Kernel argument space descriptor |
ObjType | Kernel argument type: logical OR of types (O_xxx) or pre defined types |
W | Kernel argument Data plane width |
H | Kernel argument Data plane height |
UsedW | Used tile width after padding and striding |
UsedH | Used tile height after padding and striding |
PadTile | Left, Right, Top, Bottom amount of pad, for dimension ratio evaluation, may be > Pad Exec if several kernels are cascaded |
PadExec | Left, Right, Top, Bottom amount of pad, actual pad to be used at kernel exec time |
ItemSize | Data plane basic data type size in bytes |
TileOverlap | Amount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument |
Constraint | Kernel argument constraints |
PreferedTileSize | Tile variable dimension must be a multiple of PreferedTileSize if not 0 |
CArgName | To which user kernel C argument this kernel argument is related to |
Object_T* KerArgPad | ( | char * | KerArgName, |
KernelArgDimDescrT * | KerArgSpace, | ||
Object_Type_T | ObjType, | ||
unsigned int | W, | ||
unsigned int | H, | ||
unsigned int | BottomBuffer, | ||
unsigned int | TopBuffer, | ||
unsigned int | ItemSize, | ||
int | TileOverlap, | ||
KernelArgConstraints_T | Constraint, | ||
unsigned int | PreferedTileSize, | ||
char * | CArgName | ||
) |
Creates one user kernel argument with fixed padding before and after the tile generated for this argument. Kernel argument Space is explicitely described
This is generally used for kernels requiring a delay line like in a FIR filter.
KerArgName | Kernel argument name |
KerArgSpace | Kernel argument space descriptor |
ObjType | Kernel argument type: logical OR of types (O_xxx) or pre defined types |
W | Kernel argument Data plane width |
H | Kernel argument Data plane height |
BottomBuffer | Amount of buffer to be added before this kernel argument, unit is ItemSize |
TopBuffer | Amount of buffer to be added after this kernel argument, unit is ItemSize |
ItemSize | Data plane basic data type size in bytes |
TileOverlap | Amount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument |
Constraint | Kernel argument constraints |
PreferedTileSize | Tile variable dimension is prefered to a multiple of PreferedTileSize if not 0 |
CArgName | To which user kernel C argument this kernel argument is related to |
Object_T* KerArgPadAlign | ( | char * | KerArgName, |
KernelArgDimDescrT * | KerArgSpace, | ||
Object_Type_T | ObjType, | ||
unsigned int | W, | ||
unsigned int | H, | ||
unsigned int | TileWPadAlign, | ||
unsigned int | ItemSize, | ||
unsigned int | RawItemSize, | ||
int | TileOverlap, | ||
KernelArgConstraints_T | Constraint, | ||
unsigned int | PreferedTileSize, | ||
char * | CArgName | ||
) |
Creates one user kernel argument, extra pad on variable dim for alignment sake. Kernel argument Space is explicitely described
KerArgName | Kernel argument name |
KerArgSpace | Kernel argument space descriptor |
ObjType | Kernel argument type: logical OR of types (O_xxx) or pre defined types |
W | Kernel argument Data plane width |
H | Kernel argument Data plane height |
TileWPadAlign | Add TilePadAlign to the width of the tile, use adjust tile alignment through tile expansion |
ItemSize | Data plane basic data type size in bytes |
RawItemSize | In case ItemSize has to be padded this is the ItemSize before padding |
TileOverlap | Amount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument |
Constraint | Kernel argument constraints |
PreferedTileSize | Tile variable dimension must be a multiple of PreferedTileSize if not 0 |
CArgName | To which user kernel C argument this kernel argument is related to |
Object_T* KerArgPart | ( | char * | KerArgName, |
KernelArgDimDescrT * | KerArgSpace, | ||
Object_Type_T | ObjType, | ||
unsigned int | W, | ||
unsigned int | UsedW, | ||
unsigned int | H, | ||
unsigned int | UsedH, | ||
unsigned int | ItemSize, | ||
int | TileOverlap, | ||
KernelArgConstraints_T | Constraint, | ||
unsigned int | PreferedTileSize, | ||
char * | CArgName | ||
) |
Creates one user kernel argument with dimension [WxH] but used partially as [UsedWxUsedH]. Kernel argument Space is explicitely described
This is generally used for kernels having vertically tiled arguments that are consumming only a subset of the whole
data plane. In the horizontal case it is not an issue since H can be safely reduced because arrays have line major layout but for vertical we need to be aware that the used width is in fact in a data planne that is wider.
KerArgName | Kernel argument name |
KerArgSpace | Kernel argument space descriptor |
ObjType | Kernel argument type: logical OR of types (O_xxx) or pre defined types |
W | Kernel argument Data plane width |
UsedW | Kernel argument Data plane effective width, has to be < W |
H | Kernel argument Data plane height |
UsedH | Kernel argument Data plane effective height, has to be < H |
ItemSize | Data plane basic data type size in bytes |
TileOverlap | Amount of overlap between 2 adjacent tiles |
Constraint | Kernel argument constraints |
PreferedTileSize | Tile variable dimension is prefered to a multiple of PreferedTileSize if not 0 |
CArgName | To which user kernel C argument this kernel argument is related to |
Object_T** KerArgs | ( | unsigned int | KerArgCount, |
... | |||
) |
Creates a list of user kernel arguments.
KerArgCount | Number of user kernel arguments |
... | List of user kernel arguments: KerArg() or KerArgPad(), KerArg(), ... |
KerArgCount | Number of Kernel arguments |
KernelArgDimDescrT* KerArgSpace | ( | unsigned int | Dim, |
... | |||
) |
Define Kernel argument's iteration space. Each provided dimension must also be defined in the User Kernel's iteration space, the most inner dimension must be a tiled dimension.
Dim | Number of dimensions for this Kernel argument |
unsigned int MkTCons | ( | unsigned int | Div, |
unsigned int | Rem | ||
) |
Creates a tile dimension constraint for a kernel argument, Tile dimension T must be equal to K * Div + Rem, Rem can be greater than Div
Div | Division factor |
Rem | Constant term to be added to a multiple of Div to obtain tile dim |