Added threading to par_lr_interp.c:hypre_BoomerAMGBuildExtPIInterp()

This commit is contained in:
schroder2 2012-02-16 01:17:48 +00:00
parent b271aee1c5
commit f68b8c4097
3 changed files with 693 additions and 523 deletions

View File

@ -669,14 +669,17 @@ void initialize_vecs(HYPRE_Int diag_n, HYPRE_Int offd_n, HYPRE_Int *diag_ftc, HY
{
diag_ftc[i] = -1;
offd_ftc[i] = -1;
diag_pm[i] = -1;
offd_pm[i] = -1;
tmp_CF[i] = -1;
if(diag_pm != NULL)
{ diag_pm[i] = -1; }
if(offd_pm != NULL)
{ offd_pm[i] = -1;}
}
for(i = offd_n; i < diag_n; i++)
{
diag_ftc[i] = -1;
diag_pm[i] = -1;
if(diag_pm != NULL)
{ diag_pm[i] = -1; }
}
}
else
@ -685,15 +688,18 @@ void initialize_vecs(HYPRE_Int diag_n, HYPRE_Int offd_n, HYPRE_Int *diag_ftc, HY
{
diag_ftc[i] = -1;
offd_ftc[i] = -1;
diag_pm[i] = -1;
offd_pm[i] = -1;
tmp_CF[i] = -1;
if(diag_pm != NULL)
{ diag_pm[i] = -1;}
if(offd_pm != NULL)
{ offd_pm[i] = -1;}
}
for(i = diag_n; i < offd_n; i++)
{
offd_ftc[i] = -1;
offd_pm[i] = -1;
tmp_CF[i] = -1;
if(offd_pm != NULL)
{ offd_pm[i] = -1;}
}
}
return;

File diff suppressed because it is too large Load Diff

View File

@ -27,6 +27,7 @@
#ifndef HYPRE_SMP_REDUCTION_OP
#ifndef HYPRE_SMP_PAR_REGION
#ifndef HYPRE_SMP_FOR
#ifndef HYPRE_SMP_ONLY_OUTER_FOR_LOOP
#ifndef HYPRE_SMP_CRITICAL
#ifndef HYPRE_SMP_BARRIER
#pragma omp parallel for private(HYPRE_SMP_PRIVATE) schedule(static)
@ -35,6 +36,7 @@
#endif
#endif
#endif
#endif
#ifdef HYPRE_SMP_PAR_REGION
#pragma omp parallel private(HYPRE_SMP_PRIVATE)
@ -44,6 +46,11 @@
#pragma omp for schedule(static)
#endif
/* This specifically tells OMP to only parallelize the outer-most for loop */
#ifdef HYPRE_SMP_ONLY_OUTER_FOR_LOOP
#pragma omp parallel for private(HYPRE_SMP_PRIVATE) schedule(static) collapse(1)
#endif
#ifdef HYPRE_SMP_CRITICAL
#pragma omp critical
#endif
@ -92,4 +99,5 @@ schedule(static)
#undef HYPRE_SMP_PAR_REGION
#undef HYPRE_SMP_FOR
#undef HYPRE_SMP_CRITICAL
#undef HYPRE_SMP_ONLY_OUTER_FOR_LOOP
#undef HYPRE_SMP_BARRIER