DSPLIB User Guide
DSPLIB_svd_small_priv.h File Reference

Introduction

Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_svd.

Definition in file DSPLIB_svd_small_priv.h.

Go to the source code of this file.

Data Structures

struct  DSPLIB_svd_small_PrivArgs
 Structure that is reserved for internal use by the kernel. More...
 

Macros

#define DSPLIB_SVD_SMALL_IXX_IXX_OXX_PBLOCK_SIZE   (0 * SE_PARAM_SIZE)
 Macro to define the size of bufPblock array of DSPLIB_svd_PrivArgs structure. More...
 

Typedefs

typedef DSPLIB_STATUS(* pFxnDSPLIB_svd_small_exec) (DSPLIB_kernelHandle handle, void *restrict pA, void *restrict pU, void *restrict pV, void *restrict pDiag, void *restrict pSuperDiag, void *restrict pU1)
 This is a function pointer type that conforms to the declaration of DSPLIB_svd_exec_ci and DSPLIB_svd_exec_cn. More...
 

Functions

template<typename dataType >
DSPLIB_STATUS DSPLIB_svd_small_init_ci (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams2D_t *bufParamsU, const DSPLIB_bufParams2D_t *bufParamsV, const DSPLIB_bufParams1D_t *bufParamsDiag, const DSPLIB_bufParams1D_t *bufParamsSuperDiag, const DSPLIB_svd_small_InitArgs *pKerInitArgs)
 This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_init. More...
 
template<typename dataType >
DSPLIB_STATUS DSPLIB_svd_small_exec_ci (DSPLIB_kernelHandle handle, void *restrict pA, void *restrict pU, void *restrict pV, void *restrict pDiag, void *restrict pSuperDiag, void *restrict pU1)
 This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_exec. More...
 
DSPLIB_STATUS DSPLIB_svd_small_init_cn (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams2D_t *bufParamsU, const DSPLIB_bufParams2D_t *bufParamsV, const DSPLIB_bufParams1D_t *bufParamsDiag, const DSPLIB_bufParams1D_t *bufParamsSuperDiag, const DSPLIB_svd_small_InitArgs *pKerInitArgs)
 This function is the initialization function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_init. More...
 
template<typename dataType >
DSPLIB_STATUS DSPLIB_svd_small_exec_cn (DSPLIB_kernelHandle handle, void *restrict pA, void *restrict pU, void *restrict pV, void *restrict pDiag, void *restrict pSuperDiag, void *restrict pU1)
 This function is the main execution function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_exec. More...
 
template<typename dataType >
dataType getRecip (dataType value)
 
template float getRecip (float value)
 
template double getRecip (double value)
 
template<typename dataType >
dataType getSqrt (dataType a)
 
template float getSqrt< float > (float a)
 
template double getSqrt< double > (double a)
 
template c7x::double_vec getSqrt< c7x::double_vec > (c7x::double_vec a)
 
template<typename dataType >
dataType getRecipSqrt (dataType a)
 
template float getRecipSqrt< float > (float a)
 
template double getRecipSqrt< double > (double a)
 

Macro Definition Documentation

◆ DSPLIB_SVD_SMALL_IXX_IXX_OXX_PBLOCK_SIZE

#define DSPLIB_SVD_SMALL_IXX_IXX_OXX_PBLOCK_SIZE   (0 * SE_PARAM_SIZE)

Macro to define the size of bufPblock array of DSPLIB_svd_PrivArgs structure.

Definition at line 40 of file DSPLIB_svd_small_priv.h.

Typedef Documentation

◆ pFxnDSPLIB_svd_small_exec

typedef DSPLIB_STATUS(* pFxnDSPLIB_svd_small_exec) (DSPLIB_kernelHandle handle, void *restrict pA, void *restrict pU, void *restrict pV, void *restrict pDiag, void *restrict pSuperDiag, void *restrict pU1)

This is a function pointer type that conforms to the declaration of DSPLIB_svd_exec_ci and DSPLIB_svd_exec_cn.

Definition at line 47 of file DSPLIB_svd_small_priv.h.

Function Documentation

◆ DSPLIB_svd_small_init_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_svd_small_init_ci ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams2D_t bufParamsU,
const DSPLIB_bufParams2D_t bufParamsV,
const DSPLIB_bufParams1D_t bufParamsDiag,
const DSPLIB_bufParams1D_t bufParamsSuperDiag,
const DSPLIB_svd_small_InitArgs pKerInitArgs 
)

This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_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_svd_small_exec_ci would be called later independently by the application. When DSPLIB_svd_small_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_svd_small_exec_ci does not lose cycles to determine the hardware configuration.

Parameters
[in]handle: Active handle to the kernel
[in]bufParamsIn: Pointer to the structure containing dimensional information of input buffer
[out]bufParamsU: Pointer to the structure containing dimensional information of output buffer U
[out]bufParamsV: Pointer to the structure containing dimensional information of output buffer V
[out]bufParamsDiag: Pointer to the structure containing dimensional information of output buffer Diag
[out]bufParamsSuperDiag: Pointer to the structure containing dimensional information of output buffer SuperDiag
[in]pKerInitArgs: Pointer to the structure holding init parameters
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 68 of file DSPLIB_svd_small_ci.cpp.

◆ DSPLIB_svd_small_exec_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_svd_small_exec_ci ( DSPLIB_kernelHandle  handle,
void *restrict  pA,
void *restrict  pU,
void *restrict  pV,
void *restrict  pDiag,
void *restrict  pSuperDiag,
void *restrict  pU1 
)

This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_exec.

Parameters
[in]handle: Active handle to the kernel
[in]pA: Pointer to the input buffer pA
[out]pU: Pointer to the output buffer pU
[out]pV: Pointer to the output buffer pV
[out]pDiag: Pointer to the output buffer pDiag
[out]pSuperDiag: Pointer to the output buffer pSuperDiag
[in]pU1: Pointer to the buffer pU1
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.
Performance Considerations:
For best performance,
  • the input and output data buffers are expected to be in L2 memory.
  • the buffer pointers are assumed to be 64-byte aligned
Assumptions:
The arrays A, U, V, Diag, SuperDiag, U1, V1 and Scratch are stored in distinct arrays In-place processing of A is not allowed.

Definition at line 657 of file DSPLIB_svd_small_ci.cpp.

◆ DSPLIB_svd_small_init_cn()

DSPLIB_STATUS DSPLIB_svd_small_init_cn ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams2D_t bufParamsU,
const DSPLIB_bufParams2D_t bufParamsV,
const DSPLIB_bufParams1D_t bufParamsDiag,
const DSPLIB_bufParams1D_t bufParamsSuperDiag,
const DSPLIB_svd_small_InitArgs pKerInitArgs 
)

This function is the initialization function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_init.

Parameters
[in]handle: Active handle to the kernel
[in]bufParamsIn: Pointer to the structure containing dimensional information of input buffer
[out]bufParamsU: Pointer to the structure containing dimensional information of output buffer U
[out]bufParamsV: Pointer to the structure containing dimensional information of output buffer V
[out]bufParamsDiag: Pointer to the structure containing dimensional information of output buffer Diag
[out]bufParamsSuperDiag: Pointer to the structure containing dimensional information of output buffer SuperDiag
[in]pKerInitArgs: Pointer to the structure holding init parameters
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 62 of file DSPLIB_svd_small_cn.cpp.

◆ DSPLIB_svd_small_exec_cn()

template<typename dataType >
DSPLIB_STATUS DSPLIB_svd_small_exec_cn ( DSPLIB_kernelHandle  handle,
void *restrict  pA,
void *restrict  pU,
void *restrict  pV,
void *restrict  pDiag,
void *restrict  pSuperDiag,
void *restrict  pU1 
)

This function is the main execution function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_svd_small_exec.

Parameters
[in]handle: Active handle to the kernel
[in]pA: Pointer to the input buffer pA
[out]pU: Pointer to the output buffer pU
[out]pV: Pointer to the output buffer pV
[out]pDiag: Pointer to the output buffer pDiag
[out]pSuperDiag: Pointer to the output buffer pSuperDiag
[in]pU1: Pointer to the buffer pU1
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 746 of file DSPLIB_svd_small_cn.cpp.

◆ getRecip() [1/3]

template<typename dataType >
dataType getRecip ( dataType  value)
inline

Definition at line 230 of file DSPLIB_svd_small_priv.h.

◆ getRecip() [2/3]

template float getRecip ( float  value)

◆ getRecip() [3/3]

template double getRecip ( double  value)

◆ getSqrt()

template<typename dataType >
dataType getSqrt ( dataType  a)
inline

Definition at line 251 of file DSPLIB_svd_small_priv.h.

◆ getSqrt< float >()

template float getSqrt< float > ( float  a)

◆ getSqrt< double >()

template double getSqrt< double > ( double  a)

◆ getSqrt< c7x::double_vec >()

template c7x::double_vec getSqrt< c7x::double_vec > ( c7x::double_vec  a)

◆ getRecipSqrt()

template<typename dataType >
dataType getRecipSqrt ( dataType  a)
inline

Definition at line 276 of file DSPLIB_svd_small_priv.h.

◆ getRecipSqrt< float >()

template float getRecipSqrt< float > ( float  a)

◆ getRecipSqrt< double >()

template double getRecipSqrt< double > ( double  a)