When a task construct, a parallel construct or a teams construct is encountered, each generated task inherits the values of the data environment scoped ICVs from each generating task’s ICV values.
When a parallel construct is encountered, the value of each ICV with implicit task scope is inherited from the implicit binding task of the generating task unless otherwise specified.
When a task construct is encountered, the generated task inherits the value of nthreads-var from the generating task’s nthreads-var value. When a parallel construct is encountered, and the generating task’s nthreads-var list contains a single element, the generated implicit tasks inherit that list as the value of nthreads-var. When a parallel construct is encountered, and the generating task’s nthreads-var list contains multiple elements, the generated implicit tasks inherit the value of nthreads-var as the list obtained by deletion of the first element from the generating task’s nthreads-var value. The bind-var ICV is handled in the same way as the nthreads-var ICV.
When a target task executes an active target region, the generated initial task uses the values of the data environment scoped ICVs from the device data environment ICV values of the device that will execute the region.
When a target task executes an inactive target region, the generated initial task uses the values of the data environment scoped ICVs from the data environment of the task that encountered the target construct.
If a target construct with a thread_limit clause is encountered, the thread-limit-var ICV from the data environment of the generated initial task is instead set to an implementation defined value between one and the value specified in the clause.
If a target construct with no thread_limit clause is encountered, the thread-limit-var ICV from the data environment of the generated initial task is set to an implementation defined value that is greater than zero.
If a teams construct with a thread_limit clause is encountered, the thread-limit-var ICV from the data environment of the initial task for each team is instead set to an implementation defined value between one and the value specified in the clause.
If a teams construct with no thread_limit clause is encountered, the thread-limit-var ICV from the data environment of the initial task of each team is set to an implementation defined value that is greater than zero and does not exceed teams-thread-limit-var, if teams-thread-limit-var is greater than zero.
When encountering a worksharing-loop region for which the runtime schedule kind is specified, all implicit task regions that constitute the binding parallel region must have the same value for run-sched-var in their data environments. Otherwise, the behavior is unspecified.