On Thu, Aug 27, 2015 at 07:01:48AM -0700, Aldy Hernandez wrote:
> commit 45fdbc84123fefde6bf99aaf87099317aaa38f24
> Author: Aldy Hernandez <[email protected]>
> Date: Wed Aug 26 07:28:39 2015 -0700
>
> * libgomp.h (enum gomp_task_kind): Comment fields.
> (struct gomp_task): Comment some fields.
> * task.c (GOMP_task): Add comments.
> (gomp_task_run_pre): Same.
>
> diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
> index 3d705ef..34f064c 100644
> --- a/libgomp/libgomp.h
> +++ b/libgomp/libgomp.h
> @@ -263,9 +263,13 @@ extern char *goacc_device_type;
>
> enum gomp_task_kind
> {
> + /* Thread not directly created by user. For instance, when creating
> + a team of threads or an ICV. */
That is misleading, especially with the (possibly) upcoming thread task.
"implicit task" is an OpenMP tasking term:
"A task generated by an implicit parallel region or generated when a parallel
construct is encountered during execution."
but there is really no reason to explain what it is, so you should just say
in the comment
/* Implicit task. */
> GOMP_TASK_IMPLICIT,
> GOMP_TASK_IFFALSE,
This is for if (0) tasks. The right OpenMP tasking term is "undeferred
task", perhaps we should just replace GOMP_TASK_IFFALSE with
GOMP_TASK_UNDEFERRED everywhere.
> + /* Task created by GOMP_task and waiting to be run. */
> GOMP_TASK_WAITING,
> + /* Task currently scheduled and about to execute. */
Well, not just about to execute, that kind is used even for the task that is
already executing.
Otherwise LGTM.
Jakub