From af5294db0954f00a4413b9e8f81db3c97e40318f Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Mon, 3 Apr 2023 08:06:22 +0200 Subject: [PATCH] Revert some part of PR #95 Removed long doubles. --- .../DistanceFunctions/arm_cosine_distance_f64.c | 2 +- Source/MatrixFunctions/arm_householder_f64.c | 4 ++-- Source/MatrixFunctions/arm_mat_cholesky_f64.c | 8 ++++---- Source/MatrixFunctions/arm_mat_inverse_f64.c | 12 ++++++------ Source/MatrixFunctions/arm_mat_ldlt_f64.c | 2 +- .../arm_mat_solve_lower_triangular_f64.c | 6 +++--- .../arm_mat_solve_upper_triangular_f64.c | 6 +++--- Source/TransformFunctions/arm_cfft_f64.c | 2 +- Source/TransformFunctions/arm_rfft_fast_f64.c | 16 ++++++++-------- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Source/DistanceFunctions/arm_cosine_distance_f64.c b/Source/DistanceFunctions/arm_cosine_distance_f64.c index 6ceffab9..423eea46 100644 --- a/Source/DistanceFunctions/arm_cosine_distance_f64.c +++ b/Source/DistanceFunctions/arm_cosine_distance_f64.c @@ -59,7 +59,7 @@ float64_t arm_cosine_distance_f64(const float64_t *pA,const float64_t *pB, uint3 arm_dot_prod_f64(pA,pB,blockSize,&dot); tmp = sqrt(pwra * pwrb); - return(1.0L - dot / tmp); + return(1.0 - dot / tmp); } diff --git a/Source/MatrixFunctions/arm_householder_f64.c b/Source/MatrixFunctions/arm_householder_f64.c index 8c04a908..be4f3e4c 100644 --- a/Source/MatrixFunctions/arm_householder_f64.c +++ b/Source/MatrixFunctions/arm_householder_f64.c @@ -93,12 +93,12 @@ float64_t arm_householder_f64( beta = alpha * alpha + x1norm2; beta=sqrt(beta); - if (alpha > 0.0L) + if (alpha > 0.0) { beta = -beta; } - r = 1.0L / (alpha -beta); + r = 1.0 / (alpha -beta); arm_scale_f64(pOut,r,pOut,blockSize); pOut[0] = 1.0; diff --git a/Source/MatrixFunctions/arm_mat_cholesky_f64.c b/Source/MatrixFunctions/arm_mat_cholesky_f64.c index 4404dc42..0e284c21 100755 --- a/Source/MatrixFunctions/arm_mat_cholesky_f64.c +++ b/Source/MatrixFunctions/arm_mat_cholesky_f64.c @@ -192,12 +192,12 @@ arm_status arm_mat_cholesky_f64( pG[j * n + i] -= sum; } - if (pG[i * n + i] <= 0.0L) + if (pG[i * n + i] <= 0.0) { return(ARM_MATH_DECOMPOSITION_FAILURE); } - invSqrtVj = 1.0L/sqrt(pG[i * n + i]); + invSqrtVj = 1.0/sqrt(pG[i * n + i]); SCALE_COL_F64(pDst,i,invSqrtVj,i); } @@ -254,12 +254,12 @@ arm_status arm_mat_cholesky_f64( } } - if (pG[i * n + i] <= 0.0L) + if (pG[i * n + i] <= 0.0) { return(ARM_MATH_DECOMPOSITION_FAILURE); } - invSqrtVj = 1.0L/sqrt(pG[i * n + i]); + invSqrtVj = 1.0/sqrt(pG[i * n + i]); SCALE_COL_F64(pDst,i,invSqrtVj,i); } diff --git a/Source/MatrixFunctions/arm_mat_inverse_f64.c b/Source/MatrixFunctions/arm_mat_inverse_f64.c index ff073ed1..f41356f2 100644 --- a/Source/MatrixFunctions/arm_mat_inverse_f64.c +++ b/Source/MatrixFunctions/arm_mat_inverse_f64.c @@ -61,7 +61,7 @@ arm_status arm_mat_inverse_f64( uint32_t numCols = pSrc->numCols; /* Number of Cols in the matrix */ - float64_t pivot = 0.0L, newPivot=0.0L; /* Temporary input values */ + float64_t pivot = 0.0, newPivot=0.0; /* Temporary input values */ uint32_t selectedRow,pivotRow,i, rowNb, rowCnt, flag = 0U, j,column; /* loop counters */ arm_status status; /* status of matrix inverse */ @@ -182,7 +182,7 @@ arm_status arm_mat_inverse_f64( /* Check if there is a non zero pivot element to * replace in the rows below */ - if ((pivot != 0.0L) && (selectedRow != column)) + if ((pivot != 0.0) && (selectedRow != column)) { /* Loop over number of columns * to the right of the pilot element */ @@ -198,14 +198,14 @@ arm_status arm_mat_inverse_f64( /* Update the status if the matrix is singular */ - if ((flag != 1U) && (pivot == 0.0L)) + if ((flag != 1U) && (pivot == 0.0)) { return ARM_MATH_SINGULAR; } /* Pivot element of the row */ - pivot = 1.0L / pivot; + pivot = 1.0 / pivot; SCALE_ROW_F64(pSrc,column,pivot,pivotRow); SCALE_ROW_F64(pDst,0,pivot,pivotRow); @@ -241,12 +241,12 @@ arm_status arm_mat_inverse_f64( /* Set status as ARM_MATH_SUCCESS */ status = ARM_MATH_SUCCESS; - if ((flag != 1U) && (pivot == 0.0L)) + if ((flag != 1U) && (pivot == 0.0)) { pIn = pSrc->pData; for (i = 0; i < numRows * numCols; i++) { - if (pIn[i] != 0.0L) + if (pIn[i] != 0.0) break; } diff --git a/Source/MatrixFunctions/arm_mat_ldlt_f64.c b/Source/MatrixFunctions/arm_mat_ldlt_f64.c index d2ac547e..3fe2cd58 100755 --- a/Source/MatrixFunctions/arm_mat_ldlt_f64.c +++ b/Source/MatrixFunctions/arm_mat_ldlt_f64.c @@ -125,7 +125,7 @@ arm_status arm_mat_ldlt_f64( a = pA[k*n+k]; - if (fabs(a) < 1.0e-18L) + if (fabs(a) < 1.0e-18) { fullRank = 0; diff --git a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c index fbd8f5ae..cd71243b 100755 --- a/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c +++ b/Source/MatrixFunctions/arm_mat_solve_lower_triangular_f64.c @@ -108,7 +108,7 @@ arm_status arm_mat_solve_lower_triangular_f64( vecA = vfmsq_f64(vecA,vdupq_n_f64(pLT[n*i + k]),vecX); } - if (pLT[n*i + i]==0.0L) + if (pLT[n*i + i]==0.0) { return(ARM_MATH_SINGULAR); } @@ -131,7 +131,7 @@ arm_status arm_mat_solve_lower_triangular_f64( tmp -= lt_row[k] * pX[cols*k+j]; } - if (lt_row[i]==0.0L) + if (lt_row[i]==0.0) { return(ARM_MATH_SINGULAR); } @@ -206,7 +206,7 @@ arm_status arm_mat_solve_lower_triangular_f64( tmp -= lt_row[k] * pX[cols*k+j]; } - if (lt_row[i]==0.0L) + if (lt_row[i]==0.0) { return(ARM_MATH_SINGULAR); } diff --git a/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f64.c b/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f64.c index c3ae2b9e..3a227ed9 100755 --- a/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f64.c +++ b/Source/MatrixFunctions/arm_mat_solve_upper_triangular_f64.c @@ -100,7 +100,7 @@ arm_status arm_mat_solve_upper_triangular_f64( vecA = vfmsq_f64(vecA,vdupq_n_f64(pUT[n*i + k]),vecX); } - if (pUT[n*i + i]==0.0L) + if (pUT[n*i + i]==0.0) { return(ARM_MATH_SINGULAR); } @@ -125,7 +125,7 @@ arm_status arm_mat_solve_upper_triangular_f64( tmp -= ut_row[k] * pX[cols*k+j]; } - if (ut_row[i]==0.0L) + if (ut_row[i]==0.0) { return(ARM_MATH_SINGULAR); } @@ -194,7 +194,7 @@ arm_status arm_mat_solve_upper_triangular_f64( tmp -= ut_row[k] * pX[cols*k+j]; } - if (ut_row[i]==0.0L) + if (ut_row[i]==0.0) { return(ARM_MATH_SINGULAR); } diff --git a/Source/TransformFunctions/arm_cfft_f64.c b/Source/TransformFunctions/arm_cfft_f64.c index 6694db1d..e8c0a6b8 100644 --- a/Source/TransformFunctions/arm_cfft_f64.c +++ b/Source/TransformFunctions/arm_cfft_f64.c @@ -297,7 +297,7 @@ void arm_cfft_f64( if (ifftFlag == 1U) { - invL = 1.0L / (float64_t)L; + invL = 1.0 / (float64_t)L; /* Conjugate and scale output data */ pSrc = p1; for(l=0; l