![]() |
DSPLIB User Guide
|
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_bexp.
Definition in file DSPLIB_bexp_priv.h.
Go to the source code of this file.
Data Structures | |
| struct | DSPLIB_bexp_PrivArgs |
| Structure that is reserved for internal use by the kernel. More... | |
Macros | |
| #define | DSPLIB_BEXP_IXX_IXX_OXX_MAX_BITS_PER_ELEMENT (70) |
| Macro to define the maximum number of bits in an element @ref DSPLIB_bexp_exec_ci. More... | |
| #define | DSPLIB_BEXP_IXX_IXX_OXX_MIN_VECS_TO_ENABLE_SE_READS (4) |
| Macro to define the minimum number of vector lengths that the input data should occupy before SE is used for data reads @ref DSPLIB_bexp_exec_ci. More... | |
| #define | DSPLIB_BEXP_IXX_IXX_OXX_PBLOCK_SIZE (2 * SE_PARAM_SIZE + 512) |
| Macro to print the debug message. More... | |
Typedefs | |
| typedef DSPLIB_STATUS(* | pFxnDSPLIB_bexp_exec) (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut) |
| This is a function pointer type that conforms to the declaration of DSPLIB_bexp_exec_ci and DSPLIB_bexp_exec_cn. More... | |
Functions | |
| template<typename dataType > | |
| DSPLIB_STATUS | DSPLIB_bexp_init_ci (DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_bexp_InitArgs *pKerInitArgs) |
| This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_init. More... | |
| template<typename dataType > | |
| DSPLIB_STATUS | DSPLIB_bexp_exec_ci (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut) |
| This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_exec. More... | |
| template<typename dataType > | |
| DSPLIB_STATUS | DSPLIB_bexp_exec_cn (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut) |
| This function is the main execution function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_exec. More... | |
| DSPLIB_STATUS | DSPLIB_bexp_init_cn (DSPLIB_kernelHandle handle, DSPLIB_bufParams2D_t *bufParamsIn, DSPLIB_bufParams2D_t *bufParamsOut) |
| This function is the initialization function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_init. More... | |
| #define DSPLIB_BEXP_IXX_IXX_OXX_MAX_BITS_PER_ELEMENT (70) |
Macro to define the maximum number of bits in an element @ref DSPLIB_bexp_exec_ci.
Definition at line 39 of file DSPLIB_bexp_priv.h.
| #define DSPLIB_BEXP_IXX_IXX_OXX_MIN_VECS_TO_ENABLE_SE_READS (4) |
Macro to define the minimum number of vector lengths that the input data should occupy before SE is used for data reads @ref DSPLIB_bexp_exec_ci.
Definition at line 48 of file DSPLIB_bexp_priv.h.
| #define DSPLIB_BEXP_IXX_IXX_OXX_PBLOCK_SIZE (2 * SE_PARAM_SIZE + 512) |
Macro to print the debug message.
Definition at line 54 of file DSPLIB_bexp_priv.h.
| typedef DSPLIB_STATUS(* pFxnDSPLIB_bexp_exec) (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut) |
This is a function pointer type that conforms to the declaration of DSPLIB_bexp_exec_ci and DSPLIB_bexp_exec_cn.
Definition at line 61 of file DSPLIB_bexp_priv.h.
| DSPLIB_STATUS DSPLIB_bexp_init_ci | ( | DSPLIB_kernelHandle | handle, |
| const DSPLIB_bufParams1D_t * | bufParamsIn, | ||
| const DSPLIB_bufParams1D_t * | bufParamsOut, | ||
| const DSPLIB_bexp_InitArgs * | pKerInitArgs | ||
| ) |
This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_init.
This function determines the configuration for the streaming engine resources based on the function call parameters, and the configuration is saved in bufPBlock array. In the kernel call sequence, DSPLIB_bexp_exec_ci would be called later independently by the application. When DSPLIB_bexp_exec_ci runs, it merely retrieves the configuration from the bufPBlock and uses it to set up the hardware resources. This arrangement is so that DSPLIB_bexp_exec_ci does not lose cycles to determine the hardware configuration.
| [in] | handle | : Active handle to the kernel |
| [in] | bufParamsIn | : Pointer to the structure containing dimensional information of input buffer |
| [out] | bufParamsOut | : Pointer to the structure containing dimensional information of ouput buffer |
| [in] | pKerInitArgs | : Pointer to the structure holding init parameters |
Init function of the bexp kernel to setup the SE
Definition at line 62 of file DSPLIB_bexp_ci.cpp.
| DSPLIB_STATUS DSPLIB_bexp_exec_ci | ( | DSPLIB_kernelHandle | handle, |
| void *restrict | pIn, | ||
| void *restrict | pOut | ||
| ) |
This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_exec.
The function uses C7x DSP to perform the block exponent. The input data is read as blocks of vectors using the streaming engine. A vertical OR operation is performed on the blocks of vectors that are read using the streaming engine. Finally, once the entire data is read and the final OR result is computed, a horizontal OR operation is performed to get the final mask value. The number of leading zeros or redundant sign bits are computed as the exponent.
| [in] | handle | : Active handle to the kernel |
| [in] | pIn | : Pointer to buffer holding the input data |
| [out] | pOut | : Pointer to buffer holding the output data |
| DSPLIB_STATUS DSPLIB_bexp_exec_cn | ( | DSPLIB_kernelHandle | handle, |
| void *restrict | pIn, | ||
| void *restrict | pOut | ||
| ) |
This function is the main execution function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_exec.
| [in] | handle | : Active handle to the kernel |
| [in] | pIn | : Pointer to buffer holding the input data |
| [out] | pOut | : Pointer to buffer holding the output data |
C Natural implementation of the bexp kernels. Handles unsigned and signed data types internally
Definition at line 36 of file DSPLIB_bexp_cn.cpp.
| DSPLIB_STATUS DSPLIB_bexp_init_cn | ( | DSPLIB_kernelHandle | handle, |
| DSPLIB_bufParams2D_t * | bufParamsIn, | ||
| DSPLIB_bufParams2D_t * | bufParamsOut | ||
| ) |
This function is the initialization function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_bexp_init.
| [in] | handle | : Active handle to the kernel |
| [in] | bufParamsIn | : Pointer to the structure containing dimensional information of input buffer |
| [out] | bufParamsOut | : Pointer to the structure containing dimensional information of ouput buffer |
| [in] | pKerInitArgs | : Pointer to the structure holding init parameters |