This version will leads to speedup of 5 - 7% with VS2019, Windows 10,

8 threads on 8 cores, iscas85Circuits\85\c7552\c7552_ann.net.
This commit is contained in:
Holger Vogt 2021-02-06 10:21:11 +01:00
parent 87fe83a31a
commit 49acf17352
1 changed files with 4 additions and 5 deletions

View File

@ -96,7 +96,6 @@ static void ExpandTranslationArrays( MatrixPtr, int );
void
spClear(MatrixPtr Matrix)
{
ElementPtr pElement;
int I;
/* Begin `spClear'. */
@ -106,11 +105,11 @@ spClear(MatrixPtr Matrix)
if (Matrix->PreviousMatrixWasComplex || Matrix->Complex)
{
#ifdef USE_OMP
#pragma omp parallel for private(pElement)
#pragma omp parallel for private(I)
#endif
for (I = Matrix->Size; I > 0; I--)
{
pElement = Matrix->FirstInCol[I];
ElementPtr pElement = Matrix->FirstInCol[I];
while (pElement != NULL)
{
pElement->Real = 0.0;
@ -122,11 +121,11 @@ spClear(MatrixPtr Matrix)
else
{
#ifdef USE_OMP
#pragma omp parallel for private(pElement)
#pragma omp parallel for private(I)
#endif
for (I = Matrix->Size; I > 0; I--)
{
pElement = Matrix->FirstInCol[I];
ElementPtr pElement = Matrix->FirstInCol[I];
while (pElement != NULL)
{
pElement->Real = 0.0;