LLVM OpenMP* Runtime Library
Functions
Tasking support

Functions

kmp_int32 __kmpc_omp_task_with_deps (ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 ndeps, kmp_depend_info_t *dep_list, kmp_int32 ndeps_noalias, kmp_depend_info_t *noalias_dep_list)
 
void __kmpc_omp_wait_deps (ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, kmp_depend_info_t *dep_list, kmp_int32 ndeps_noalias, kmp_depend_info_t *noalias_dep_list)
 
kmp_int32 __kmpc_omp_reg_task_with_affinity (ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 naffins, kmp_task_affinity_info_t *affin_list)
 
void * __kmpc_task_reduction_init (int gtid, int num, void *data)
 
void * __kmpc_taskred_init (int gtid, int num, void *data)
 
void * __kmpc_task_reduction_get_th_data (int gtid, void *tskgrp, void *data)
 
void * __kmpc_task_reduction_modifier_init (ident_t *loc, int gtid, int is_ws, int num, void *data)
 
void * __kmpc_taskred_modifier_init (ident_t *loc, int gtid, int is_ws, int num, void *data)
 
void __kmpc_task_reduction_modifier_fini (ident_t *loc, int gtid, int is_ws)
 
void __kmpc_proxy_task_completed (kmp_int32 gtid, kmp_task_t *ptask)
 
void __kmpc_proxy_task_completed_ooo (kmp_task_t *ptask)
 
void __kmpc_taskloop (ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, void *task_dup)
 
void __kmpc_taskloop_5 (ident_t *loc, int gtid, kmp_task_t *task, int if_val, kmp_uint64 *lb, kmp_uint64 *ub, kmp_int64 st, int nogroup, int sched, kmp_uint64 grainsize, int modifier, void *task_dup)
 

Detailed Description

These functions support tasking constructs.

Function Documentation

◆ __kmpc_omp_reg_task_with_affinity()

kmp_int32 __kmpc_omp_reg_task_with_affinity ( ident_t loc_ref,
kmp_int32  gtid,
kmp_task_t *  new_task,
kmp_int32  naffins,
kmp_task_affinity_info_t *  affin_list 
)
Parameters
loc_reflocation of the original task directive
gtidGlobal Thread ID of encountering thread
new_tasktask thunk allocated by __kmpc_omp_task_alloc() for the ''new task''
naffinsNumber of affinity items
affin_listList of affinity items
Returns
Returns non-zero if registering affinity information was not successful. Returns 0 if registration was successful This entry registers the affinity information attached to a task with the task thunk structure kmp_taskdata_t.

Definition at line 1465 of file kmp_tasking.cpp.

◆ __kmpc_omp_task_with_deps()

kmp_int32 __kmpc_omp_task_with_deps ( ident_t loc_ref,
kmp_int32  gtid,
kmp_task_t *  new_task,
kmp_int32  ndeps,
kmp_depend_info_t *  dep_list,
kmp_int32  ndeps_noalias,
kmp_depend_info_t *  noalias_dep_list 
)
Parameters
loc_reflocation of the original task directive
gtidGlobal Thread ID of encountering thread
new_tasktask thunk allocated by __kmp_omp_task_alloc() for the ''new task''
ndepsNumber of depend items with possible aliasing
dep_listList of depend items with possible aliasing
ndeps_noaliasNumber of depend items with no aliasing
noalias_dep_listList of depend items with no aliasing
Returns
Returns either TASK_CURRENT_NOT_QUEUED if the current task was not suspended and queued, or TASK_CURRENT_QUEUED if it was suspended and queued

Schedule a non-thread-switchable task with dependences for execution

Definition at line 508 of file kmp_taskdeps.cpp.

◆ __kmpc_omp_wait_deps()

void __kmpc_omp_wait_deps ( ident_t loc_ref,
kmp_int32  gtid,
kmp_int32  ndeps,
kmp_depend_info_t *  dep_list,
kmp_int32  ndeps_noalias,
kmp_depend_info_t *  noalias_dep_list 
)
Parameters
loc_reflocation of the original task directive
gtidGlobal Thread ID of encountering thread
ndepsNumber of depend items with possible aliasing
dep_listList of depend items with possible aliasing
ndeps_noaliasNumber of depend items with no aliasing
noalias_dep_listList of depend items with no aliasing

Blocks the current task until all specifies dependences have been fulfilled.

Definition at line 667 of file kmp_taskdeps.cpp.

◆ __kmpc_proxy_task_completed()

void __kmpc_proxy_task_completed ( kmp_int32  gtid,
kmp_task_t *  ptask 
)
Parameters
gtidGlobal Thread ID of encountering thread
ptaskTask which execution is completed

Execute the completion of a proxy task from a thread of that is part of the team. Run first and bottom halves directly.

Definition at line 3909 of file kmp_tasking.cpp.

◆ __kmpc_proxy_task_completed_ooo()

void __kmpc_proxy_task_completed_ooo ( kmp_task_t *  ptask)
Parameters
ptaskTask which execution is completed

Execute the completion of a proxy task from a thread that could not belong to the team.

Definition at line 3962 of file kmp_tasking.cpp.

◆ __kmpc_task_reduction_get_th_data()

void* __kmpc_task_reduction_get_th_data ( int  gtid,
void *  tskgrp,
void *  data 
)
Parameters
gtidGlobal thread ID
tskgrpThe taskgroup ID (optional)
dataShared location of the item
Returns
The pointer to per-thread data

Get thread-specific location of data item

Definition at line 2281 of file kmp_tasking.cpp.

◆ __kmpc_task_reduction_init()

void* __kmpc_task_reduction_init ( int  gtid,
int  num,
void *  data 
)
Parameters
gtidGlobal thread ID
numNumber of data items to reduce
dataArray of data for reduction
Returns
The taskgroup identifier

Initialize task reduction for the taskgroup.

Note: this entry supposes the optional compiler-generated initializer routine has single parameter - pointer to object to be initialized. That means the reduction either does not use omp_orig object, or the omp_orig is accessible without help of the runtime library.

Definition at line 2233 of file kmp_tasking.cpp.

◆ __kmpc_task_reduction_modifier_fini()

void __kmpc_task_reduction_modifier_fini ( ident_t loc,
int  gtid,
int  is_ws 
)
Parameters
locSource location info
gtidGlobal thread ID
is_wsIs 1 if the reduction is for worksharing, 0 otherwise

Finalize task reduction for a parallel or worksharing.

Definition at line 2478 of file kmp_tasking.cpp.

◆ __kmpc_task_reduction_modifier_init()

void* __kmpc_task_reduction_modifier_init ( ident_t loc,
int  gtid,
int  is_ws,
int  num,
void *  data 
)
Parameters
locSource location info
gtidGlobal thread ID
is_wsIs 1 if the reduction is for worksharing, 0 otherwise
numNumber of data items to reduce
dataArray of data for reduction
Returns
The taskgroup identifier

Initialize task reduction for a parallel or worksharing.

Note: this entry supposes the optional compiler-generated initializer routine has single parameter - pointer to object to be initialized. That means the reduction either does not use omp_orig object, or the omp_orig is accessible without help of the runtime library.

Definition at line 2444 of file kmp_tasking.cpp.

◆ __kmpc_taskloop()

void __kmpc_taskloop ( ident_t loc,
int  gtid,
kmp_task_t *  task,
int  if_val,
kmp_uint64 *  lb,
kmp_uint64 *  ub,
kmp_int64  st,
int  nogroup,
int  sched,
kmp_uint64  grainsize,
void *  task_dup 
)
Parameters
locSource location information
gtidGlobal thread ID
taskTask structure
if_valValue of the if clause
lbPointer to loop lower bound in task structure
ubPointer to loop upper bound in task structure
stLoop stride
nogroupFlag, 1 if nogroup clause specified, 0 otherwise
schedSchedule specified 0/1/2 for none/grainsize/num_tasks
grainsizeSchedule value if specified
task_dupTasks duplication routine

Execute the taskloop construct.

Definition at line 4735 of file kmp_tasking.cpp.

◆ __kmpc_taskloop_5()

void __kmpc_taskloop_5 ( ident_t loc,
int  gtid,
kmp_task_t *  task,
int  if_val,
kmp_uint64 *  lb,
kmp_uint64 *  ub,
kmp_int64  st,
int  nogroup,
int  sched,
kmp_uint64  grainsize,
int  modifier,
void *  task_dup 
)
Parameters
locSource location information
gtidGlobal thread ID
taskTask structure
if_valValue of the if clause
lbPointer to loop lower bound in task structure
ubPointer to loop upper bound in task structure
stLoop stride
nogroupFlag, 1 if nogroup clause specified, 0 otherwise
schedSchedule specified 0/1/2 for none/grainsize/num_tasks
grainsizeSchedule value if specified
modiferModifier 'strict' for sched, 1 if present, 0 otherwise
task_dupTasks duplication routine

Execute the taskloop construct.

Definition at line 4762 of file kmp_tasking.cpp.

◆ __kmpc_taskred_init()

void* __kmpc_taskred_init ( int  gtid,
int  num,
void *  data 
)
Parameters
gtidGlobal thread ID
numNumber of data items to reduce
dataArray of data for reduction
Returns
The taskgroup identifier

Initialize task reduction for the taskgroup.

Note: this entry supposes the optional compiler-generated initializer routine has two parameters, pointer to object to be initialized and pointer to omp_orig

Definition at line 2249 of file kmp_tasking.cpp.

◆ __kmpc_taskred_modifier_init()

void* __kmpc_taskred_modifier_init ( ident_t loc,
int  gtid,
int  is_ws,
int  num,
void *  data 
)
Parameters
locSource location info
gtidGlobal thread ID
is_wsIs 1 if the reduction is for worksharing, 0 otherwise
numNumber of data items to reduce
dataArray of data for reduction
Returns
The taskgroup identifier

Initialize task reduction for a parallel or worksharing.

Note: this entry supposes the optional compiler-generated initializer routine has two parameters, pointer to object to be initialized and pointer to omp_orig

Definition at line 2464 of file kmp_tasking.cpp.