40 #include "../VXLIB_addWeight/VXLIB_addWeight_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) {
117 const void *restrict pIn,
118 const void *restrict pOut,
124 printf(
"Enter VXLIB_accumulateWeightImage_exec_checkParams\n");
126 if ((handle == NULL) || (pIn == NULL) || (pOut == NULL)) {
131 else if ((alpha < 0.0) || (alpha > 1.0)) {
173 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_accumulateWeightImage_init\n");
177 uint32_t dTypeIn = bufParamsIn->
data_type;
178 uint32_t dTypeOut = bufParamsOut->
data_type;
199 bufParamsOut, kerInitArgsAddWeight);
222 printf(
"VXLIB_DEBUGPRINT Enter VXLIB_accumulateWeightImage_exec\n");
227 status = pKerPrivArgs->
execute(handle, pIn, pOut, pOut, alpha);
239 size_t numBlocks = pKerPrivArgs->
numBlocks;
240 size_t overheadCnt = 17;
243 size_t iterConst = 14;
246 *archCycles = iterConst + numBlocks * ii;
247 *estCycles = overheadCnt + *archCycles;
Header file for kernel's internal use. For the kernel's interface. Note: The VXLIB_accumulateWeightIm...
#define VXLIB_ACCUMULATEWEIGHTIMAGE_I8U_O8U
Macros that will be useful to check for datatype combinations.
template VXLIB_STATUS VXLIB_addWeight_init_ci< VXLIB_ADDWEIGHT_DTYPE_I8U_I8U_O8U >(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn0, const VXLIB_bufParams2D_t *bufParamsIn1, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_addWeight_InitArgs *pKerInitArgs)
template VXLIB_STATUS VXLIB_addWeight_exec_ci< VXLIB_ADDWEIGHT_TYPENAME_I8U_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut, float alpha)
template VXLIB_STATUS VXLIB_addWeight_exec_cn< VXLIB_ADDWEIGHT_TYPENAME_I8U_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn0, void *restrict pIn1, void *restrict pOut, float alpha)
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
@ VXLIB_ERR_INVALID_VALUE
static int32_t VXLIB_sizeof(uint32_t type)
Inline function returns number of bytes per element given a type of VXLIB_data_type_e.
void VXLIB_accumulateWeightImage_perfEst(VXLIB_kernelHandle handle, size_t *archCycles, size_t *estCycles)
VXLIB_STATUS VXLIB_accumulateWeightImage_exec(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, float alpha)
This function is the main kernel compute function.
VXLIB_STATUS VXLIB_accumulateWeightImage_exec_checkParams(VXLIB_kernelHandle handle, const void *restrict pIn, const void *restrict pOut, float alpha)
This function checks the validity of the parameters passed to VXLIB_accumulateWeightImage_exec functi...
int32_t VXLIB_accumulateWeightImage_getHandleSize(VXLIB_accumulateWeightImage_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
VXLIB_STATUS VXLIB_accumulateWeightImage_init(VXLIB_kernelHandle handle, VXLIB_bufParams2D_t *bufParamsIn, VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_accumulateWeightImage_InitArgs *pKerInitArgs)
This function should be called before the VXLIB_accumulateWeightImage_exec function is called....
VXLIB_STATUS VXLIB_accumulateWeightImage_init_checkParams(VXLIB_kernelHandle handle, const VXLIB_bufParams2D_t *bufParamsIn, const VXLIB_bufParams2D_t *bufParamsOut, const VXLIB_accumulateWeightImage_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to VXLIB_accumulateWeightImage_init functi...
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.
size_t strideIn0Elements
Stride of input0 in elements.
size_t strideIn1Elements
Stride of input1 in elements.
pFxnVXLIB_addWeight_exec execute
Function pointer to point to the right execution variant between VXLIB_addWeight_exec_cn and VXLIB_ad...
size_t height
Height of image
VXLIB_addWeight_InitArgs pKerInitArgs
Initargs of the kernel.
size_t width
Width of image
size_t strideOutElements
Stride of output in elements.
size_t numBlocks
Number of blocks to be processed after simidfication.
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.