23 #ifndef MMALIB_CNN_TENSOR_CONVERT_IXX_IXX_OXX_H_
24 #define MMALIB_CNN_TENSOR_CONVERT_IXX_IXX_OXX_H_
26 #include "../../common/MMALIB_types.h"
32 #if defined(__C7100__)
136 #if defined(__C7100__)
139 int32_t numRowsQuant;
236 #if defined(__C7100__)
274 const uint8_t *shift,
308 const uint8_t *shift,
351 const uint8_t *shift,
382 const uint8_t *shift,
MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_exec_checkParams(MMALIB_kernelHandle handle, const void *src, const void *scale, const uint8_t *shift, const void *q, void *dst, const MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs *pKerInArgs, MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs *pKerOutArgs)
This function checks the parameters and should be called before kernel executuon. It can be called on...
int32_t MMALIB_CNN_tensor_convert_ixX_oxX_getHandleSize(MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_exec(MMALIB_kernelHandle handle, const void *src, const void *scale, const uint8_t *shift, const void *q, void *dst, const MMALIB_CNN_tensor_convert_ixX_oxX_ExecInArgs *pKerInArgs, MMALIB_CNN_tensor_convert_ixX_oxX_ExecOutArgs *pKerOutArgs)
This function is the main compute function, and performs the tensor datatype conversion.
MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_init_checkParams(MMALIB_kernelHandle handle, const MMALIB_bufParams3D_t *src_addr, const MMALIB_bufParams1D_t *scale_addr, const MMALIB_bufParams3D_t *dst_addr, const MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs *pKerInitArgs)
This function checks the validity of the input parameters.
MMALIB_STATUS MMALIB_CNN_tensor_convert_ixX_oxX_init(MMALIB_kernelHandle handle, const MMALIB_bufParams3D_t *src_addr, const MMALIB_bufParams1D_t *scale_addr, const MMALIB_bufParams3D_t *dst_addr, const MMALIB_CNN_tensor_convert_ixX_oxX_InitArgs *pKerInitArgs)
This function call is required to initialize the handle. In this function, most of the one-time opera...
MMALIB_STATUS_NAME
The enumeration of all status codes.
void * MMALIB_kernelHandle
Handle type for MMALIB operations.
MMALIB_tensor_format_e
Tensor format.
This structure holds all the runtime input parameters for tensor convert kernel.
uint32_t srcDimY
update if this is different from init src_addr.dimy
uint32_t srcDimZ
update if this is different from init src_addr.dimz
This structure holds all the runtime output parameters for tensor convert kernel.
int32_t validColsOut
dummy placeholder for now
Structure containing the parameters initialization of tensor convert function.
int8_t funcStyle
Variant of the function refer to MMALIB_FUNCTION_STYLE
int32_t inPad
input pad of each row of output feature map, unused for now
int32_t outPad
output pad of each row of output feature map, specify pad only on one side
MMALIB_tensor_format tensorFormatOut
output tensor format: CHW or HWC
MMALIB_tensor_format tensorFormatIn
input tensor format: CHW or HWC
A structure for a 1 dimensional buffer descriptor.
A structure for a 3 dimensional buffer descriptor.