55 template <
typename dTypeIn,
typename dTypeOut>
59 void *restrict pThresholdVal,
60 void *restrict pTrueVal,
61 void *restrict pFalseVal)
70 size_t width = pKerPrivArgs->
width;
71 size_t height = pKerPrivArgs->
height;
76 printf(
"Enter VXLIB_thresholdBinary_exec_cn\n");
80 dTypeIn *restrict pInLocal = (dTypeIn *) pIn;
81 dTypeOut *restrict pOutLocal = (dTypeOut *) pOut;
83 dTypeIn *restrict pThresholdLocal = (dTypeIn *) pThresholdVal;
84 dTypeIn *restrict pTrueValLocal = (dTypeIn *) pTrueVal;
85 dTypeIn *restrict pFalseValLocal = (dTypeIn *) pFalseVal;
88 printf(
"In VXLIB_thresholdBinary_exec_cn, width: %d, height: %d\n", width, height);
91 for (uint32_t i = 0; i < height; i++) {
92 for (uint32_t j = 0; j < width; j++) {
93 if (pInLocal[i * strideInElements + j] > *pThresholdLocal) {
94 pOutLocal[i * strideOutElements + j] = *pTrueValLocal;
97 pOutLocal[i * strideOutElements + j] = *pFalseValLocal;
103 printf(
"row: %d col: %d a %d b %d temp %d \n", i, j, a, b, temp);
119 void *restrict pThresholdVal,
120 void *restrict pTrueVal,
121 void *restrict pFalseVal);
127 void *restrict pThresholdVal,
128 void *restrict pTrueVal,
129 void *restrict pFalseVal);
135 void *restrict pThresholdVal,
136 void *restrict pTrueVal,
137 void *restrict pFalseVal);
143 void *restrict pThresholdVal,
144 void *restrict pTrueVal,
145 void *restrict pFalseVal);
template VXLIB_STATUS VXLIB_thresholdBinary_exec_cn< VXLIB_THRESHOLDBINARY_TYPENAME_I8S_O8S >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pThresholdVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdBinary_exec_cn< VXLIB_THRESHOLDBINARY_TYPENAME_I16U_O16U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pThresholdVal, void *restrict pTrueVal, void *restrict pFalseVal)
template VXLIB_STATUS VXLIB_thresholdBinary_exec_cn< VXLIB_THRESHOLDBINARY_TYPENAME_I16S_O16S >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pThresholdVal, void *restrict pTrueVal, void *restrict pFalseVal)
VXLIB_STATUS VXLIB_thresholdBinary_exec_cn(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pThresholdVal, void *restrict pTrueVal, void *restrict pFalseVal)
This function is the main execution function for the natural C implementation of the kernel....
template VXLIB_STATUS VXLIB_thresholdBinary_exec_cn< VXLIB_THRESHOLDBINARY_TYPENAME_I8U_O8U >(VXLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut, void *restrict pThresholdVal, void *restrict pTrueVal, void *restrict pFalseVal)
Header file for kernel's internal use. For the kernel's interface, please see VXLIB_thresholdBinary.
void * VXLIB_kernelHandle
Handle type for VXLIB operations.
VXLIB_STATUS_NAME
The enumeration of all status codes.
Structure that is reserved for internal use by the kernel.
size_t width
Width of image
size_t height
Height of image
size_t strideInElements
Stride of input in elements.
size_t strideOutElements
Stride of output in elements.