40 #include "../VXLIB_add/VXLIB_add_priv.h"
75 uint32_t dTypeIn = bufParamsIn->
data_type;
76 uint32_t widthIn = bufParamsIn->
dim_x;
77 uint32_t heightIn = bufParamsIn->
dim_y;
78 uint32_t strideIn = bufParamsIn->
stride_y;
81 uint32_t dTypeOut = bufParamsOut->
data_type;
82 uint32_t widthOut = bufParamsOut->
dim_x;
83 uint32_t heightOut = bufParamsOut->
dim_y;
84 uint32_t strideOut = bufParamsOut->
stride_y;
93 else if ((widthIn != widthOut) || (heightIn != heightOut)) {
96 else if (strideInElements < widthIn || strideOutElements < widthOut) {
123 printf(
"Enter VXLIB_accumulateImage_exec_checkParams\n");
125 if ((handle == NULL) || (pIn == NULL) || (pOut == NULL)) {
166 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_accumulateImage_init\n");
170 uint32_t dTypeIn = bufParamsIn->
data_type;
171 uint32_t dTypeOut = bufParamsOut->
data_type;
228 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_accumulateImage_exec\n");
233 status = pKerPrivArgs->
execute(handle, pIn, pOut, pOut);
245 size_t numBlocks = pKerPrivArgs->
numBlocks;
246 size_t overheadCnt = 17;
247 *archCycles = 7 + numBlocks * 2;
248 *estCycles = overheadCnt + *archCycles;
Header file for kernel's internal use. For the kernel's interface. Note: The VXLIB_accumulateImage do...
#define VXLIB_ACCUMULATEIMAGE_I8U_O8U
Macros that will be useful to check for datatype combinations.
#define VXLIB_ACCUMULATEIMAGE_I16S_O16S
#define VXLIB_ACCUMULATEIMAGE_I8U_O16S
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_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_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)
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_accumulateImage_exec_checkParams(VXLIB_kernelHandle handle, const void *restrict pIn, const void *restrict pOut)
This function checks the validity of the parameters passed to VXLIB_accumulateImage_exec function....
void VXLIB_accumulateImage_perfEst(VXLIB_kernelHandle handle, size_t *archCycles, size_t *estCycles)
VXLIB_STATUS VXLIB_accumulateImage_init(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn, VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_accumulateImage_InitArgs *pKerInitArgs)
This function should be called before the VXLIB_accumulateImage_exec function is called....
int32_t VXLIB_accumulateImage_getHandleSize(VXLIB_accumulateImage_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
VXLIB_STATUS VXLIB_accumulateImage_exec(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
This function is the main kernel compute function.
VXLIB_STATUS VXLIB_accumulateImage_init_checkParams(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_accumulateImage_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to VXLIB_accumulateImage_init function....
Structure containing the parameters to initialize the kernel.
int8_t funcStyle
Variant of the function, refer to VXLIB_FUNCTION_STYLE
Structure containing the parameters to initialize the kernel.
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 numBlocks
Number of blocks to be processed after simidfication.
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.