34 template <
typename dataType>
49 for (i = 0; i < order; i++) {
51 for (j = 0; j < order; j++) {
52 sum += A[i * colAStride + j] * (dataType) (j + 1);
54 sum1 += (dataType) (i + 1) * sum;
62 #ifdef ENABLE_ORIG_IN_PLACE
65 for (k = 0; k < order; k++) {
66 A[k * colAStride + k] = (dataType) sqrt(A[k * colAStride + k]);
67 for (i = k + 1; i < order; i++) {
68 A[i * colAStride + k] = A[i * colAStride + k] / A[k * colAStride + k];
70 for (j = k + 1; j < order; j++) {
71 for (i = j; i < order; i++) {
72 A[i * colAStride + j] -= A[i * colAStride + k] * A[j * colAStride + k];
82 for (k = 0; k < order; k++) {
83 A[k + k * colAStride] = (dataType) sqrt(A[k + k * colAStride]);
84 for (i = k + 1; i < order; i++) {
85 A[i + k * colAStride] /= A[k + k * colAStride];
86 for (j = k + 1; j <= i; j++) {
87 A[i + j * colAStride] -= A[i + k * colAStride] * A[j + k * colAStride];
99 const int32_t colAStride,
100 const int32_t enable_test);
103 const int32_t colAStride,
104 const int32_t enable_test);
106 template <
typename dataType>
115 dataType *pLocalA = (dataType *) pA;
117 int32_t order = pKerPrivArgs->
order;
118 int32_t strideA = pKerPrivArgs->
stride;
119 int32_t colAStride = strideA /
sizeof(dataType);
121 int32_t enable_test = pKerPrivArgs->
enableTest;
123 status = DSPLIB_cholesky_in_place_core_cn<dataType>(pLocalA, order, colAStride, enable_test);
template DSPLIB_STATUS DSPLIB_cholesky_inplace_exec_cn< double >(DSPLIB_kernelHandle handle, void *restrict pInA, void *restrict pMul)
template DSPLIB_STATUS DSPLIB_cholesky_in_place_core_cn< double >(double *A, const int32_t order, const int32_t colAStride, const int32_t enable_test)
template DSPLIB_STATUS DSPLIB_cholesky_in_place_core_cn< float >(float *A, const int32_t order, const int32_t colAStride, const int32_t enable_test)
DSPLIB_STATUS DSPLIB_cholesky_inplace_exec_cn(DSPLIB_kernelHandle handle, void *restrict pA, void *restrict pMul)
This function is the main execution function for the natural C implementation of the kernel....
template DSPLIB_STATUS DSPLIB_cholesky_inplace_exec_cn< float >(DSPLIB_kernelHandle handle, void *restrict pA, void *restrict pMul)
DSPLIB_STATUS DSPLIB_cholesky_in_place_core_cn(dataType *A, const int32_t order, const int32_t colAStride, const int32_t enable_test)
Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_cholesky_inplace...
#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_inplace_init that will be retrieved and u...