Lines Matching +full:- +full:d
1 /* ----------------------------------------------------------------------
4 * Description: Floating-point LDL decomposition
9 * Target Processor: Cortex-M and Cortex-A cores
10 * -------------------------------------------------------------------- */
12 * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
14 * SPDX-License-Identifier: Apache-2.0
20 * www.apache.org/licenses/LICENSE-2.0
46 * @brief Floating-point LDL^t decomposition of positive semi-definite matrix.
47 * @param[in] pSrc points to the instance of the input floating-point matrix structure.
48 …* @param[out] pl points to the instance of the output floating-point triangular matrix structure.
49 * @param[out] pd points to the instance of the output floating-point diagonal matrix structure.
50 * @param[out] pp points to the instance of the output floating-point permutation vector.
53 - \ref ARM_MATH_SUCCESS : Operation successful
54 - \ref ARM_MATH_SIZE_MISMATCH : Matrix size check failed
55 - \ref ARM_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed
57 * Computes the LDL^t decomposition of a matrix A such that P A P^t = L D L^t.
72 if ((pSrc->numRows != pSrc->numCols) || in arm_mat_ldlt_f32()
73 (pl->numRows != pl->numCols) || in arm_mat_ldlt_f32()
74 (pd->numRows != pd->numCols) || in arm_mat_ldlt_f32()
75 (pl->numRows != pd->numRows) ) in arm_mat_ldlt_f32()
86 const int n=pSrc->numRows; in arm_mat_ldlt_f32()
90 memset(pd->pData,0,sizeof(float32_t)*n*n); in arm_mat_ldlt_f32()
91 memcpy(pl->pData,pSrc->pData,n*n*sizeof(float32_t)); in arm_mat_ldlt_f32()
92 pA = pl->pData; in arm_mat_ldlt_f32()
106 cnt -= 8; in arm_mat_ldlt_f32()
137 if (fabsf(a) < 1.0e-8f) in arm_mat_ldlt_f32()
155 int cnt = n - k - 1; in arm_mat_ldlt_f32()
173 //pA[w*n+x] = pA[w*n+x] - pA[w*n+k] * (pA[x*n+k] * invA); in arm_mat_ldlt_f32()
196 cnt -= 4; in arm_mat_ldlt_f32()
202 int cnt = n - k - 1; in arm_mat_ldlt_f32()
215 //pA[w*n+x] = pA[w*n+x] - pA[w*n+k] * (pA[x*n+k] * invA); in arm_mat_ldlt_f32()
226 cnt -= 4; in arm_mat_ldlt_f32()
244 diag--; in arm_mat_ldlt_f32()
248 int cnt= n-k; in arm_mat_ldlt_f32()
255 vstrwq_p(&pl->pData[row*n+col], zero, p0); in arm_mat_ldlt_f32()
257 cnt -= 4; in arm_mat_ldlt_f32()
265 int cnt= n-row-1; in arm_mat_ldlt_f32()
272 vstrwq_p(&pl->pData[row*n+col], zero, p0); in arm_mat_ldlt_f32()
274 cnt -= 4; in arm_mat_ldlt_f32()
278 for(int d=0; d < diag;d++) in arm_mat_ldlt_f32() local
280 pd->pData[d*n+d] = pl->pData[d*n+d]; in arm_mat_ldlt_f32()
281 pl->pData[d*n+d] = 1.0; in arm_mat_ldlt_f32()
305 * @brief Floating-point LDL^t decomposition of positive semi-definite matrix.
306 * @param[in] pSrc points to the instance of the input floating-point matrix structure.
307 …* @param[out] pl points to the instance of the output floating-point triangular matrix structure.
308 * @param[out] pd points to the instance of the output floating-point diagonal matrix structure.
309 * @param[out] pp points to the instance of the output floating-point permutation vector.
312 - \ref ARM_MATH_SUCCESS : Operation successful
313 - \ref ARM_MATH_SIZE_MISMATCH : Matrix size check failed
314 - \ref ARM_MATH_DECOMPOSITION_FAILURE : Input matrix cannot be decomposed
316 * Computes the LDL^t decomposition of a matrix A such that P A P^t = L D L^t.
331 if ((pSrc->numRows != pSrc->numCols) || in arm_mat_ldlt_f32()
332 (pl->numRows != pl->numCols) || in arm_mat_ldlt_f32()
333 (pd->numRows != pd->numCols) || in arm_mat_ldlt_f32()
334 (pl->numRows != pd->numRows) ) in arm_mat_ldlt_f32()
345 const int n=pSrc->numRows; in arm_mat_ldlt_f32()
348 int row,d; in arm_mat_ldlt_f32() local
350 memset(pd->pData,0,sizeof(float32_t)*n*n); in arm_mat_ldlt_f32()
351 memcpy(pl->pData,pSrc->pData,n*n*sizeof(float32_t)); in arm_mat_ldlt_f32()
352 pA = pl->pData; in arm_mat_ldlt_f32()
389 if (fabsf(a) < 1.0e-8f) in arm_mat_ldlt_f32()
401 pA[w*n+x] = pA[w*n+x] - pA[w*n+k] * pA[x*n+k] / a; in arm_mat_ldlt_f32()
419 diag--; in arm_mat_ldlt_f32()
425 pl->pData[row*n+col]=0.0; in arm_mat_ldlt_f32()
435 pl->pData[row*n+col] = 0.0; in arm_mat_ldlt_f32()
439 for(d=0; d < diag;d++) in arm_mat_ldlt_f32()
441 pd->pData[d*n+d] = pl->pData[d*n+d]; in arm_mat_ldlt_f32()
442 pl->pData[d*n+d] = 1.0; in arm_mat_ldlt_f32()