Auto Tiler Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
UserKernelArguments

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...
 
KernelArgDimDescrTKerArgSpace (unsigned int Dim,...)
 Define Kernel argument's iteration space. More...
 
Object_TKerArg (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_TKerArgAliased (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_TKerArgP (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_TKerArgPadAlign (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_TKerArgPad (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_TKerArgPart (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...
 

Description

Functions in this group should be used to capture user kernel arguments

Function Documentation

Object_T** AllocateKerArgs ( unsigned int  KerArgCount)

Creates a list of user kernel arguments.

Parameters
KerArgCountNumber of user kernel arguments
Parameters
KerArgCountNumber 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

Parameters
KerArgNameKernel argument name
KerArgSpaceKernel argument space descriptor
ObjTypeKernel argument type: logical OR of types (O_xxx) or pre defined types
WKernel argument Data plane width
HKernel argument Data plane height
ItemSizeData plane basic data type size in bytes
TileOverlapAmount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument
ConstraintKernel argument constraints
PreferedTileSizeTile variable dimension must be a multiple of PreferedTileSize if not 0
CArgNameTo 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 
)
Parameters
KerArgNameKernel argument name
KerArgSpaceKernel argument space descriptor
ObjTypeKernel argument type: logical OR of types (O_xxx) or pre defined types
WKernel argument Data plane width
HKernel argument Data plane height
ItemSizeData plane basic data type size in bytes
TileOverlapAmount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument
ConstraintKernel argument constraints
PreferedTileSizeTile variable dimension must be a multiple of PreferedTileSize if not 0
CArgNameTo 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

Parameters
KerArgNameKernel argument name
KerArgSpaceKernel argument space descriptor
ObjTypeKernel argument type: logical OR of types (O_xxx) or pre defined types
WKernel argument Data plane width
HKernel argument Data plane height
UsedWUsed tile width after padding and striding
UsedHUsed tile height after padding and striding
PadTileLeft, Right, Top, Bottom amount of pad, for dimension ratio evaluation, may be > Pad Exec if several kernels are cascaded
PadExecLeft, Right, Top, Bottom amount of pad, actual pad to be used at kernel exec time
ItemSizeData plane basic data type size in bytes
TileOverlapAmount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument
ConstraintKernel argument constraints
PreferedTileSizeTile variable dimension must be a multiple of PreferedTileSize if not 0
CArgNameTo 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.
Parameters
KerArgNameKernel argument name
KerArgSpaceKernel argument space descriptor
ObjTypeKernel argument type: logical OR of types (O_xxx) or pre defined types
WKernel argument Data plane width
HKernel argument Data plane height
BottomBufferAmount of buffer to be added before this kernel argument, unit is ItemSize
TopBufferAmount of buffer to be added after this kernel argument, unit is ItemSize
ItemSizeData plane basic data type size in bytes
TileOverlapAmount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument
ConstraintKernel argument constraints
PreferedTileSizeTile variable dimension is prefered to a multiple of PreferedTileSize if not 0
CArgNameTo 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

Parameters
KerArgNameKernel argument name
KerArgSpaceKernel argument space descriptor
ObjTypeKernel argument type: logical OR of types (O_xxx) or pre defined types
WKernel argument Data plane width
HKernel argument Data plane height
TileWPadAlignAdd TilePadAlign to the width of the tile, use adjust tile alignment through tile expansion
ItemSizeData plane basic data type size in bytes
RawItemSizeIn case ItemSize has to be padded this is the ItemSize before padding
TileOverlapAmount of overlap between 2 adjacent tiles, applies to tiled 2D space if present, if not to most inner dim of this argument
ConstraintKernel argument constraints
PreferedTileSizeTile variable dimension must be a multiple of PreferedTileSize if not 0
CArgNameTo 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.

Parameters
KerArgNameKernel argument name
KerArgSpaceKernel argument space descriptor
ObjTypeKernel argument type: logical OR of types (O_xxx) or pre defined types
WKernel argument Data plane width
UsedWKernel argument Data plane effective width, has to be < W
HKernel argument Data plane height
UsedHKernel argument Data plane effective height, has to be < H
ItemSizeData plane basic data type size in bytes
TileOverlapAmount of overlap between 2 adjacent tiles
ConstraintKernel argument constraints
PreferedTileSizeTile variable dimension is prefered to a multiple of PreferedTileSize if not 0
CArgNameTo which user kernel C argument this kernel argument is related to
Object_T** KerArgs ( unsigned int  KerArgCount,
  ... 
)

Creates a list of user kernel arguments.

Parameters
KerArgCountNumber of user kernel arguments
...List of user kernel arguments: KerArg() or KerArgPad(), KerArg(), ...
Parameters
KerArgCountNumber 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.

Parameters
DimNumber 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

Parameters
DivDivision factor
RemConstant term to be added to a multiple of Div to obtain tile dim