Loading...
Searching...
No Matches
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)
void ** | __kmpc_omp_get_target_async_handle_ptr (kmp_int32 gtid)
bool | __kmpc_omp_has_task_team (kmp_int32 gtid)

## Detailed Description

These functions support tasking constructs.

## Function Documentation

## __kmpc_omp_get_target_async_handle_ptr()

void ** __kmpc_omp_get_target_async_handle_ptr | ( | kmp_int32 | gtid | ) |

Parameters

  gtid | Global Thread ID of current thread

Returns
  Returns a pointer to the thread's current task async handle. If no task is present or gtid is invalid, returns NULL.

Acqurires a pointer to the target async handle from the current task.

Definition at line 5415 of file kmp_tasking.cpp.

## __kmpc_omp_has_task_team()

bool __kmpc_omp_has_task_team | ( | kmp_int32 | gtid | ) |

Parameters

  gtid | Global Thread ID of current thread

Returns
  Returns TRUE if the current task being executed of the given thread has a task team allocated to it. Otherwise, returns FALSE.

Checks if the current thread has a task team.

Definition at line 5436 of file kmp_tasking.cpp.

## __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_ref | location of the original task directive
  gtid | Global Thread ID of encountering thread
  new_task | task thunk allocated by __kmpc_omp_task_alloc() for the ''new task''
  naffins | Number of affinity items
  affin_list | List 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 1729 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_ref | location of the original task directive
  gtid | Global Thread ID of encountering thread
  new_task | task thunk allocated by __kmp_omp_task_alloc() for the ''new task''
  ndeps | Number of depend items with possible aliasing
  dep_list | List of depend items with possible aliasing
  ndeps_noalias | Number of depend items with no aliasing
  noalias_dep_list | List 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 662 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_ref | location of the original task directive
  gtid | Global Thread ID of encountering thread
  ndeps | Number of depend items with possible aliasing
  dep_list | List of depend items with possible aliasing
  ndeps_noalias | Number of depend items with no aliasing
  noalias_dep_list | List of depend items with no aliasing

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

Definition at line 873 of file kmp_taskdeps.cpp.

## __kmpc_proxy_task_completed()

void __kmpc_proxy_task_completed | ( | kmp_int32 | gtid,
|  | kmp_task_t * | ptask
| ) |  |

Parameters

  gtid | Global Thread ID of encountering thread
  ptask | Task 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 4492 of file kmp_tasking.cpp.

## __kmpc_proxy_task_completed_ooo()

void __kmpc_proxy_task_completed_ooo | ( | kmp_task_t * | ptask | ) |

Parameters

  ptask | Task which execution is completed

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

Definition at line 4556 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

  gtid | Global thread ID
  tskgrp | The taskgroup ID (optional)
  data | Shared location of the item

Returns
  The pointer to per-thread data

Get thread-specific location of data item

Definition at line 2642 of file kmp_tasking.cpp.

## __kmpc_task_reduction_init()

void * __kmpc_task_reduction_init | ( | int | gtid,
|  | int | num,
|  | void * | data
| ) |  |

Parameters

  gtid | Global thread ID
  num | Number of data items to reduce
  data | Array 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 2572 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

  loc | Source location info
  gtid | Global thread ID
  is_ws | Is 1 if the reduction is for worksharing, 0 otherwise

Finalize task reduction for a parallel or worksharing.

Definition at line 2851 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

  loc | Source location info
  gtid | Global thread ID
  is_ws | Is 1 if the reduction is for worksharing, 0 otherwise
  num | Number of data items to reduce
  data | Array 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 2817 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

  loc | Source location information
  gtid | Global thread ID
  task | Task structure
  if_val | Value of the if clause
  lb | Pointer to loop lower bound in task structure
  ub | Pointer to loop upper bound in task structure
  st | Loop stride
  nogroup | Flag, 1 if nogroup clause specified, 0 otherwise
  sched | Schedule specified 0/1/2 for none/grainsize/num_tasks
  grainsize | Schedule value if specified
  task_dup | Tasks duplication routine

Execute the taskloop construct.

Definition at line 5369 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

  loc | Source location information
  gtid | Global thread ID
  task | Task structure
  if_val | Value of the if clause
  lb | Pointer to loop lower bound in task structure
  ub | Pointer to loop upper bound in task structure
  st | Loop stride
  nogroup | Flag, 1 if nogroup clause specified, 0 otherwise
  sched | Schedule specified 0/1/2 for none/grainsize/num_tasks
  grainsize | Schedule value if specified
  modifier | Modifier 'strict' for sched, 1 if present, 0 otherwise
  task_dup | Tasks duplication routine

Execute the taskloop construct.

Definition at line 5396 of file kmp_tasking.cpp.

## __kmpc_taskred_init()

void * __kmpc_taskred_init | ( | int | gtid,
|  | int | num,
|  | void * | data
| ) |  |

Parameters

  gtid | Global thread ID
  num | Number of data items to reduce
  data | Array 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 2599 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

  loc | Source location info
  gtid | Global thread ID
  is_ws | Is 1 if the reduction is for worksharing, 0 otherwise
  num | Number of data items to reduce
  data | Array 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 2837 of file kmp_tasking.cpp.