Regarding merged tasks, does that mean that e.g. omp_in_final () in the merged tasks can return info about the parent task?
I mean, for:
Code: Select all
void
foo ()
{
#pragma omp task if (0) mergeable
printf ("%d\n", omp_in_final ());
}
Code: Select all
void
foo ()
{
#pragma omp task if (0) mergeable
printf ("%d\n", omp_in_final ());
}
No, side effects on parent envoironment could be observable, if the task is merged.jakub wrote:Ok, is omp_in_final () the only thing that is currently a user visible difference between a merged task compared to execution in the parent task?
included tasks unconditionally undergo immediate execution, there is no check for a constraint. An if(0) task does not, so it is not an included task.jakub wrote:Also, what is the difference between if(0) tasks and included tasks? The draft says if(0) tasks are just undeferred tasks, but can they be
considered included tasks if they are executed right away (i.e. can omp_in_final () return true for them)? Task scheduling constraints
say that if(0) tasks must be scheduled right away if task scheduling constraint 2. is already met, which is usually the case.
See above, both would return zero.jakub wrote:Non-if(0) tasks created by an if(0) tasks that isn't final (nor any of its parent are final) could not be included tasks, so
parent task may return omp_in_final () non-zero, while child returns omp_in_final () zero, right?