New trial: OpenMP to spClear to parallelize the loop

This commit is contained in:
dwarning 2021-02-05 18:32:45 +01:00
parent f15aaebc9f
commit 7bb590f249
1 changed files with 6 additions and 0 deletions

View File

@ -105,6 +105,9 @@ spClear(MatrixPtr Matrix)
/* Clear matrix. */
if (Matrix->PreviousMatrixWasComplex || Matrix->Complex)
{
#ifdef USE_OMP
#pragma omp parallel for private(pElement)
#endif
for (I = Matrix->Size; I > 0; I--)
{
pElement = Matrix->FirstInCol[I];
@ -118,6 +121,9 @@ spClear(MatrixPtr Matrix)
}
else
{
#ifdef USE_OMP
#pragma omp parallel for private(pElement)
#endif
for (I = Matrix->Size; I > 0; I--)
{
pElement = Matrix->FirstInCol[I];