31 template <
typename dataType>
42 for (i = 0; i < order; i++) {
44 for (j = 0; j < i; j++) {
45 sum += ((dataType) U[i + j * colLStride]) * y[j];
47 y[i] = (b[i] - sum) / ((dataType) U[i + i * colLStride]);
51 for (i = order - 1; i >= 0; i--) {
53 for (j = i + 1; j < order; j++) {
54 sum += ((dataType) U[j + i * colLStride]) * x[j];
56 x[i] = (y[i] - sum) / ((dataType) U[i + i * colLStride]);
67 template <
typename dataType>
70 void *restrict pScratch,
79 int32_t order = pKerPrivArgs->
order;
80 int32_t strideL = pKerPrivArgs->
strideCn;
81 int32_t colLStride = strideL /
sizeof(dataType);
83 dataType *pLocalU = (dataType *) pU;
84 dataType *pLocalY = (dataType *) pY;
85 dataType *pLocalB = (dataType *) pB;
86 dataType *pLocalX = (dataType *) pX;
88 DSPLIB_STATUS status = DSPLIB_cholesky_solver_cn<dataType>(order, pLocalU, pLocalY, pLocalB, pLocalX, colLStride);
98 void *restrict pScratch,
102 void *restrict pDiv);
106 void *restrict pScratch,
110 void *restrict pDiv);
template DSPLIB_STATUS DSPLIB_cholesky_solver_cn< double >(const int order, double *L, double *y, double *b, double *x, int32_t colLStride)
template DSPLIB_STATUS DSPLIB_cholesky_solver_cn< float >(const int order, float *L, float *y, float *b, float *x, int32_t colLStride)
DSPLIB_STATUS DSPLIB_cholesky_solver_exec_cn(DSPLIB_kernelHandle handle, void *restrict pU, void *restrict pScratch, void *restrict pY, void *restrict pB, void *restrict pX, void *restrict pDiv)
This function is the main execution function for the natural C implementation of the kernel....
DSPLIB_STATUS DSPLIB_cholesky_solver_cn(const int order, dataType *U, dataType *y, dataType *b, dataType *x, int32_t colLStride)
template DSPLIB_STATUS DSPLIB_cholesky_solver_exec_cn< double >(DSPLIB_kernelHandle handle, void *restrict pU, void *restrict pScratch, void *restrict pY, void *restrict pB, void *restrict pX, void *restrict pDiv)
template DSPLIB_STATUS DSPLIB_cholesky_solver_exec_cn< float >(DSPLIB_kernelHandle handle, void *restrict pU, void *restrict pScratch, void *restrict pY, void *restrict pB, void *restrict pX, void *restrict pDiv)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_cholesky_solver.
#define DSPLIB_DEBUGPRINTFN(N, fmt,...)
DSPLIB_STATUS_NAME
The enumeration of all status codes.
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
Structure that is reserved for internal use by the kernel.
int32_t order
Order of input buffer for different batches DSPLIB_cholesky_solver_init that will be retrieved and us...