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

Functions

KernelIteratorDescrTIterFixedSpace (KernelIteratorT IterSpace, unsigned int Dim)
 Creates a list of ArgCount C arguments, each C argument is created by TCArg() More...
 
KernelIteratorDescrTIterParSpace (KernelIteratorT IterSpace, unsigned int Dim, unsigned int PrefDiv)
 Define one iteration dimension of the current kernel iteration space, dimension must not be a tiled one. Actual dimension value is provided and subject to division. More...
 
KernelIteratorDescrTIterTiledSpace (KernelIteratorT IterSpace)
 Define one iteration dimension of the current kernel iteration space, this dimension must be a tiled one. The autotiler will figure out the actual dimension. More...
 
KernelIterationSpaceTKernelIterSpace (unsigned int Dim,...)
 Define the number of iteration spaces and and how they are nested. More...
 
CKernel_Arg_T ** AllocateCArgs (unsigned int ArgCount)
 Creates a list of ArgCount Kernel C arguments. More...
 
CKernel_Arg_T ** CArgs (unsigned int ArgCount,...)
 Creates a list of ArgCount Kernel C arguments, then list of TCArg(), one for each Argument. More...
 
CKernel_Arg_TTCArg (char *ArgType, char *ArgName)
 Creates a typed C argument. More...
 
ConstInit_TConstInfo (char *FileName, int Format, int Binary, int Size, int Fract)
 Creates a descriptor for an initialized constant vector. More...
 
CKernel_Arg_TTCArgInfo (char *ArgType, char *ArgName, ArgScope_T Scope, ArgDirection_T Dir, AT_MemLocation_T HomeLoc, AT_MemLocation_T ExecLoc, ConstInit_T *ConstInit)
 Creates a typed C argument with location info. More...
 
CKernel_Arg_TTCArgInfoA (char *ArgType, char *ArgName, ArgScope_T Scope, ArgDirection_T Dir, AT_MemLocation_T HomeLoc, AT_MemLocation_T ExecLoc, ConstInit_T *ConstInit)
 Creates a typed C argument with location info, symbol considered to be allocated externally by the user. More...
 
CArg_Descriptor_TArgInfo (ArgScope_T Scope, ArgDirection_T Dir, AT_MemLocation_T HomeLoc, AT_MemLocation_T ExecLoc, ConstInit_T *ConstInit)
 Creates a C argument location info only. More...
 

Description

Functions in this group should be used to add C arguments to a user kernel

Function Documentation

CKernel_Arg_T** AllocateCArgs ( unsigned int  ArgCount)

Creates a list of ArgCount Kernel C arguments

Parameters
ArgCountNumber of C Arguments
CArg_Descriptor_T* ArgInfo ( ArgScope_T  Scope,
ArgDirection_T  Dir,
AT_MemLocation_T  HomeLoc,
AT_MemLocation_T  ExecLoc,
ConstInit_T ConstInit 
)

Creates a C argument location info only

Parameters
ScopeArgument scope, ARG_SCOPE_ARG: passed as an argument, ARG_SCOPE_GLOBAL: global symbol
DirArgument's direction (in, out or in out)
HomeLocPermanent location in the mem hierarch variants of L3 or L2
ExecLocLocation of the argument when it is used, can be != HomeLoc
ConstInitDescriptor for initialized constant
CKernel_Arg_T** CArgs ( unsigned int  ArgCount,
  ... 
)

Creates a list of ArgCount Kernel C arguments, then list of TCArg(), one for each Argument

Parameters
ArgCountNumber of C Arguments
ConstInit_T* ConstInfo ( char *  FileName,
int  Format,
int  Binary,
int  Size,
int  Fract 
)

Creates a descriptor for an initialized constant vector

Parameters
FileNameName of the file containing the list of values for this constant vector
FormatFormat of the list of value, 0: floating point, 1: fixed point
BinaryIf 1 file content is binary, if 0 file content is text
SizeSize of the fixed point container
FractFractional part size, Qx.Fract, note that x+Fract < Size
KernelIteratorDescrT* IterFixedSpace ( KernelIteratorT  IterSpace,
unsigned int  Dim 
)

Creates a list of ArgCount C arguments, each C argument is created by TCArg()

Parameters
ArgCountNumber of C arguments
...List of TCArg() calls
// 2 C arguments, Par0 of type int and Par1 of type char *
CArgs(2, TCArg("int", "Par0", "char *", "Par1"));
Define one iteration dimension of the current kernel iteration space, this dimension must not be a tiled one. Actual dimension value is provided.

Define one iteration dimension of the current kernel iteration space, this dimension must not be a tiled one. Actual dimension value is provided.

Parameters
IterSpaceWhich iteration dimension of the kernel iteration space, must be a non tiled iteration space
DimActual value for the given dimension, must be > 0
KernelIteratorDescrT* IterParSpace ( KernelIteratorT  IterSpace,
unsigned int  Dim,
unsigned int  PrefDiv 
)

Define one iteration dimension of the current kernel iteration space, dimension must not be a tiled one. Actual dimension value is provided and subject to division using PrefDiv as a prefered divider or a multiple of the divider.

Parameters
IterSpaceWhich iteration dimension of the kernel iteration space, must be a non tiled iteration space
DimActual value for the given dimension, must be > 0
PrefDivPrefered space Dim divider
KernelIteratorDescrT* IterTiledSpace ( KernelIteratorT  IterSpace)

Define one iteration dimension of the current kernel iteration space, this dimension must not be a tiled one. The autotiler will figure out the actual dimension.

Parameters
IterSpaceWhich iteration dimension of the kernel iteration space, must be a tiled iteration space
KernelIterationSpaceT* KernelIterSpace ( unsigned int  Dim,
  ... 
)

Define the number of iteration spaces and and how they are nested

Parameters
DimNumber of nested iteration levels
...Ordered list of nested iteration spaces, iterators are defined by enum KernelIteratorT
See Also
KernelIteratorDescrT for a description of an iteration space
IterFixedSpace() and IterTiledSpace() for a description of how to create an iteration space
// User Kernel's Iteration space is outer dim: ITER_D0 (non tiled, actual dim = 10), then TILE0 (a tiled dimension) and then ITER_D1 (non tiled, actual dim=20)
Parameters
DimNumber of dimension for the iteration space
CKernel_Arg_T* TCArg ( char *  ArgType,
char *  ArgName 
)

Creates a typed C argument

Parameters
ArgTypeC argument type as a string
ArgNameC argument name as a string
CKernel_Arg_T* TCArgInfo ( char *  ArgType,
char *  ArgName,
ArgScope_T  Scope,
ArgDirection_T  Dir,
AT_MemLocation_T  HomeLoc,
AT_MemLocation_T  ExecLoc,
ConstInit_T ConstInit 
)

Creates a typed C argument with location info

Parameters
ArgTypeC argument type as a string
ArgNameC argument name as a string
ScopeArgument scope, ARG_SCOPE_ARG: passed as an argument, ARG_SCOPE_GLOBAL: global symbol
DirArgument's direction (in, out or in out)
HomeLocPermanent location in the mem hierarch variants of L3 or L2
ExecLocLocation of the argument when it is used, can be != HomeLoc
ConstInitDescriptor for initialized constant
CKernel_Arg_T* TCArgInfoA ( char *  ArgType,
char *  ArgName,
ArgScope_T  Scope,
ArgDirection_T  Dir,
AT_MemLocation_T  HomeLoc,
AT_MemLocation_T  ExecLoc,
ConstInit_T ConstInit 
)

Creates a typed C argument with location info, symbol considered to be allocated externally by the user

Parameters
ArgTypeC argument type as a string
ArgNameC argument name as a string
ScopeArgument scope, ARG_SCOPE_ARG: passed as an argument, ARG_SCOPE_GLOBAL: global symbol
DirArgument's direction (in, out or in out)
HomeLocPermanent location in the mem hierarch variants of L3 or L2
ExecLocLocation of the argument when it is used, can be != HomeLoc
ConstInitDescriptor for initialized constant