From 87fe83a31a924616d614fc1b715494f52cc2a68e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 6 Feb 2021 10:13:45 +0100 Subject: [PATCH] Revert "This version will laeds to speedup of 5 - 7% with VS2019, Windows 10." This reverts commit 215b3c513cff17190dc7b04530d97c6b8ec7307c. --- src/maths/sparse/spbuild.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/maths/sparse/spbuild.c b/src/maths/sparse/spbuild.c index afd60758e..8ee62b2da 100644 --- a/src/maths/sparse/spbuild.c +++ b/src/maths/sparse/spbuild.c @@ -96,6 +96,7 @@ static void ExpandTranslationArrays( MatrixPtr, int ); void spClear(MatrixPtr Matrix) { + ElementPtr pElement; int I; /* Begin `spClear'. */ @@ -105,11 +106,11 @@ spClear(MatrixPtr Matrix) if (Matrix->PreviousMatrixWasComplex || Matrix->Complex) { #ifdef USE_OMP -#pragma omp parallel for private(I) schedule(static, 1024) +#pragma omp parallel for private(pElement) #endif for (I = Matrix->Size; I > 0; I--) { - ElementPtr pElement = Matrix->FirstInCol[I]; + pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real = 0.0; @@ -121,11 +122,11 @@ spClear(MatrixPtr Matrix) else { #ifdef USE_OMP -#pragma omp parallel for private(I) schedule(static, 1024) +#pragma omp parallel for private(pElement) #endif for (I = Matrix->Size; I > 0; I--) { - ElementPtr pElement = Matrix->FirstInCol[I]; + pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real = 0.0;