72 uint32_t dTypeIn0 = bufParamsIn0->
data_type;
73 uint32_t widthIn0 = bufParamsIn0->
dim_x;
74 uint32_t heightIn0 = bufParamsIn0->
dim_y;
77 uint32_t dTypeIn1 = bufParamsIn1->
data_type;
78 uint32_t widthIn1 = bufParamsIn1->
dim_x;
79 uint32_t heightIn1 = bufParamsIn1->
dim_y;
82 uint32_t dTypeOut = bufParamsOut->
data_type;
83 uint32_t widthOut = bufParamsOut->
dim_x;
84 uint32_t heightOut = bufParamsOut->
dim_y;
94 else if ((widthIn0 != widthIn1) || (widthIn0 != widthOut) || (heightIn0 != heightIn1) || (heightIn0 != heightOut)) {
97 else if (strideIn0Elements < widthIn0 || strideIn1Elements < widthIn1 || strideOutElements < widthOut) {
119 const void *restrict pIn0,
120 const void *restrict pIn1,
121 const void *restrict pOut)
126 printf(
"Enter VXLIB_add_exec_checkParams\n");
128 if ((handle == NULL) || (pIn0 == NULL) || (pIn1 == NULL) || (pOut == NULL)) {
167 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_add_init\n");
171 uint32_t dTypeIn0 = bufParamsIn0->
data_type;
172 uint32_t dTypeIn1 = bufParamsIn1->
data_type;
173 uint32_t dTypeOut = bufParamsOut->
data_type;
238 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_add_exec\n");
243 status = pKerPrivArgs->
execute(handle, pIn0, pIn1, pOut);
template VXLIB_STATUS VXLIB_add_init_ci< VXLIB_ADD_DTYPE_I16S_I16S_O16S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_add_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_add_init_ci< VXLIB_ADD_DTYPE_I8U_I8U_O8U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_add_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_add_init_ci< VXLIB_ADD_DTYPE_I8U_I8U_O16S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_add_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_add_exec_ci< VXLIB_ADD_TYPENAME_I8U_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_exec_ci< VXLIB_ADD_TYPENAME_I8U_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_init_ci< VXLIB_ADD_DTYPE_I8U_I16S_O16S >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_add_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_add_exec_ci< VXLIB_ADD_TYPENAME_I16S_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_exec_ci< VXLIB_ADD_TYPENAME_I8U_I8U_O16S >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_exec_cn< VXLIB_ADD_TYPENAME_I8U_I8U_O16S >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_exec_cn< VXLIB_ADD_TYPENAME_I8U_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_exec_cn< VXLIB_ADD_TYPENAME_I8U_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
template VXLIB_STATUS VXLIB_add_exec_cn< VXLIB_ADD_TYPENAME_I16S_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_add.
#define VXLIB_ADD_I8U_I8U_O8U
Macros that will be useful to check for datatype combinations.
#define VXLIB_ADD_I8U_I8U_O16S
#define VXLIB_ADD_I8U_I16S_O16S
#define VXLIB_ADD_I16S_I16S_O16S
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
VXLIB_STATUS_NAME
The enumeration of all status codes.
@ VXLIB_ERR_INVALID_DIMENSION
@ VXLIB_ERR_NOT_EQUAL_WIDTH_STRIDE
static int32_t VXLIB_sizeof(uint32_t type)
Inline function returns number of bytes per element given a type of VXLIB_data_type_e.
VXLIB_STATUS VXLIB_add_init(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn0, VXLIB_bufParams2D_t *bufParamsIn1, VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_add_InitArgs *pKerInitArgs)
This function should be called before the VXLIB_add_exec function is called. This function takes care...
VXLIB_STATUS VXLIB_add_init_checkParams(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_add_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to VXLIB_add_init function....
int32_t VXLIB_add_getHandleSize(VXLIB_add_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
VXLIB_STATUS VXLIB_add_exec_checkParams(VXLIB_kernelHandle handle, const void *restrict pIn0, const void *restrict pIn1, const void *restrict pOut)
This function checks the validity of the parameters passed to VXLIB_add_exec function....
VXLIB_STATUS VXLIB_add_exec(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut)
This function is the main kernel compute function.
Structure containing the parameters to initialize the kernel.
int8_t funcStyle
Variant of the function, refer to VXLIB_FUNCTION_STYLE
Structure that is reserved for internal use by the kernel.
VXLIB_add_InitArgs pKerInitArgs
Initargs of the kernel.
size_t strideIn0Elements
Stride of input0 in elements.
size_t strideIn1Elements
Stride of input1 in elements.
pFxnVXLIB_add_exec execute
Function pointer to point to the right execution variant between VXLIB_add_exec_cn and VXLIB_add_exec...
size_t width
Width of image
size_t height
Height of image
size_t strideOutElements
Stride of output in elements.
A structure for a 2 dimensional buffer descriptor.
uint32_t dim_y
Height of buffer in Y dimension in elements.
uint32_t dim_x
Width of buffer in X dimension in elements.
uint32_t data_type
Values are of type VXLIB_data_type_e.
int32_t stride_y
Stride in Y dimension in bytes.