This patch adds new API __kmpc_taskloop_5 to incorporate strict modifier in num_tasks and grainsize clause. In num_tasks with strict, the logical iterations are partitioned in balanced manner and is assigned in order to a generated task. In grainsize with strict, the number of logical iterations assigned to each task is equal to the value of grainsize, except for the task that contains the last iteration, which may have fewer iterations.
For example -
#pragma omp taskloop grainsize(strict:4)
for (i = 0; i < 22; i++)
This will create 6 tasks (4, 4, 4, 4, 4, 2)
#pragma omp taskloop num_tasks(strict:5)
for (i = 0; i < 22; i++)
This will create 5 tasks (5, 5, 4, 4, 4)