DSPLIB User Guide
DSPLIB_cholesky_ci.cpp File Reference

Go to the source code of this file.

Macros

#define UNROLL_COUNT   4
 
#define MIN_HORIZONTAL_COLUMNS_FOR_UNROLL   2
 
#define NUM_VECS_IN_TILE   6
 

Functions

template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_c7x_PingPong_init (DSPLIB_kernelHandle handle)
 
template DSPLIB_STATUS DSPLIB_cholesky_c7x_PingPong_init< float > (DSPLIB_kernelHandle handle)
 
template DSPLIB_STATUS DSPLIB_cholesky_c7x_PingPong_init< double > (DSPLIB_kernelHandle handle)
 
template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_init_ci (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_cholesky_InitArgs *pKerInitArgs)
 This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cholesky_init. More...
 
template DSPLIB_STATUS DSPLIB_cholesky_init_ci< float > (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_cholesky_InitArgs *pKerInitArgs)
 
template DSPLIB_STATUS DSPLIB_cholesky_init_ci< double > (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_cholesky_InitArgs *pKerInitArgs)
 
template<typename dataType >
dataType getRecipSqrt (dataType a)
 
template<typename dataType >
c7x::uchar_vec DSPLIB_cholesky_getMaskIncrement ()
 
template<>
c7x::uchar_vec DSPLIB_cholesky_getMaskIncrement< float > ()
 
template<>
c7x::uchar_vec DSPLIB_cholesky_getMaskIncrement< double > ()
 
template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_c7x_PingPong (int enable_test, DSPLIB_cholesky_PrivArgs *pKerPrivArgs, dataType *restrict pInALocal, dataType *restrict pOutULocal, dataType *restrict pMulBuffer)
 
template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_exec_ci (DSPLIB_kernelHandle handle, void *restrict pInA, void *restrict pOutU, void *restrict pMulBuffer)
 This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cholesky_exec. More...
 
template DSPLIB_STATUS DSPLIB_cholesky_exec_ci< float > (DSPLIB_kernelHandle handle, void *restrict pInA, void *restrict pOutU, void *restrict pMulBuffer)
 
template DSPLIB_STATUS DSPLIB_cholesky_exec_ci< double > (DSPLIB_kernelHandle handle, void *restrict pInA, void *restrict pOutU, void *restrict pMulBuffer)
 

Macro Definition Documentation

◆ UNROLL_COUNT

#define UNROLL_COUNT   4

Definition at line 55 of file DSPLIB_cholesky_ci.cpp.

◆ MIN_HORIZONTAL_COLUMNS_FOR_UNROLL

#define MIN_HORIZONTAL_COLUMNS_FOR_UNROLL   2

Definition at line 56 of file DSPLIB_cholesky_ci.cpp.

◆ NUM_VECS_IN_TILE

#define NUM_VECS_IN_TILE   6

Definition at line 57 of file DSPLIB_cholesky_ci.cpp.

Function Documentation

◆ DSPLIB_cholesky_c7x_PingPong_init()

template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_c7x_PingPong_init ( DSPLIB_kernelHandle  handle)

Definition at line 65 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_c7x_PingPong_init< float >()

◆ DSPLIB_cholesky_c7x_PingPong_init< double >()

◆ DSPLIB_cholesky_init_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_init_ci ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams2D_t bufParamsOut,
const DSPLIB_cholesky_InitArgs pKerInitArgs 
)

This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cholesky_init.

This function determines the configuration for the streaming engine and MMA hardware resources based on the function call parameters, and the configuration is saved in bufPBlock array. In the kernel call sequence, DSPLIB_cholesky_exec_ci would be called later independently by the application. When DSPLIB_cholesky_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_cholesky_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]bufParamsOut: Pointer to the structure containing dimensional information of ouput buffer
[in]pKerInitArgs: Pointer to the structure holding init parameters
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 160 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_init_ci< float >()

template DSPLIB_STATUS DSPLIB_cholesky_init_ci< float > ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams2D_t bufParamsOut,
const DSPLIB_cholesky_InitArgs pKerInitArgs 
)

◆ DSPLIB_cholesky_init_ci< double >()

template DSPLIB_STATUS DSPLIB_cholesky_init_ci< double > ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams2D_t bufParamsOut,
const DSPLIB_cholesky_InitArgs pKerInitArgs 
)

◆ getRecipSqrt()

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

Definition at line 198 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_getMaskIncrement()

template<typename dataType >
c7x::uchar_vec DSPLIB_cholesky_getMaskIncrement ( )
inline

◆ DSPLIB_cholesky_getMaskIncrement< float >()

template<>
c7x::uchar_vec DSPLIB_cholesky_getMaskIncrement< float > ( )
inline

Definition at line 221 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_getMaskIncrement< double >()

template<>
c7x::uchar_vec DSPLIB_cholesky_getMaskIncrement< double > ( )
inline

Definition at line 222 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_c7x_PingPong()

template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_c7x_PingPong ( int  enable_test,
DSPLIB_cholesky_PrivArgs pKerPrivArgs,
dataType *restrict  pInALocal,
dataType *restrict  pOutULocal,
dataType *restrict  pMulBuffer 
)

Definition at line 225 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_exec_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_cholesky_exec_ci ( DSPLIB_kernelHandle  handle,
void *restrict  pInA,
void *restrict  pOutU,
void *restrict  multiplierPtr 
)

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

The function uses the Streaming Engine and Streaming Address generators to vectorize the operations of Cholesky Decomposition. The function process square matrix A[order][order] and stores the result in upper triangular matrix L[order][order].

Parameters
[in]handle: Active handle to the kernel
[in]pInA: Pointer to buffer holding the input data A[order][order]
[out]pOutU: Pointer to buffer holding the temporary output data U[order][order]
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

Definition at line 756 of file DSPLIB_cholesky_ci.cpp.

◆ DSPLIB_cholesky_exec_ci< float >()

template DSPLIB_STATUS DSPLIB_cholesky_exec_ci< float > ( DSPLIB_kernelHandle  handle,
void *restrict  pInA,
void *restrict  pOutU,
void *restrict  pMulBuffer 
)

◆ DSPLIB_cholesky_exec_ci< double >()

template DSPLIB_STATUS DSPLIB_cholesky_exec_ci< double > ( DSPLIB_kernelHandle  handle,
void *restrict  pInA,
void *restrict  pOutU,
void *restrict  pMulBuffer 
)