Work Sharing

## Enumerations

enum

sched_type : kmp_int32 {
kmp_sch_lower = 32 , kmp_sch_static = 34 , kmp_sch_guided_chunked = 36 , kmp_sch_auto = 38 ,
kmp_sch_upper, kmp_ord_lower = 64 , kmp_ord_static = 66 , kmp_ord_auto = 70 ,
kmp_ord_upper, kmp_distribute_static_chunked = 91, kmp_distribute_static = 92, kmp_nm_lower = 160 ,
kmp_nm_static = 162 , kmp_nm_guided_chunked = 164 , kmp_nm_auto = 166 , kmp_nm_ord_static = 194 ,
kmp_nm_ord_auto = 198 , kmp_nm_upper, kmp_sch_default = kmp_sch_static
}

## Functions

kmp_int32 | __kmpc_master (ident_t *loc, kmp_int32 global_tid)
void | __kmpc_end_master (ident_t *loc, kmp_int32 global_tid)
void | __kmpc_ordered (ident_t *loc, kmp_int32 gtid)
void | __kmpc_end_ordered (ident_t *loc, kmp_int32 gtid)
void | __kmpc_critical (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *crit)
void | __kmpc_end_critical (ident_t *loc, kmp_int32 global_tid, kmp_critical_name *crit)
kmp_int32 | __kmpc_single (ident_t *loc, kmp_int32 global_tid)
void | __kmpc_end_single (ident_t *loc, kmp_int32 global_tid)
void | __kmpc_for_static_fini (ident_t *loc, kmp_int32 global_tid)
void | __kmpc_dispatch_init_4 (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_int32 lb, kmp_int32 ub, kmp_int32 st, kmp_int32 chunk)
void | __kmpc_dispatch_init_4u (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_uint32 lb, kmp_uint32 ub, kmp_int32 st, kmp_int32 chunk)
void | __kmpc_dispatch_init_8 (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_int64 lb, kmp_int64 ub, kmp_int64 st, kmp_int64 chunk)
void | __kmpc_dispatch_init_8u (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_uint64 lb, kmp_uint64 ub, kmp_int64 st, kmp_int64 chunk)
void | __kmpc_dist_dispatch_init_4 (ident_t *loc, kmp_int32 gtid, enum sched_type schedule, kmp_int32 *p_last, kmp_int32 lb, kmp_int32 ub, kmp_int32 st, kmp_int32 chunk)
int | __kmpc_dispatch_next_4 (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_int32 *p_lb, kmp_int32 *p_ub, kmp_int32 *p_st)
int | __kmpc_dispatch_next_4u (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_uint32 *p_lb, kmp_uint32 *p_ub, kmp_int32 *p_st)
int | __kmpc_dispatch_next_8 (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_int64 *p_lb, kmp_int64 *p_ub, kmp_int64 *p_st)
int | __kmpc_dispatch_next_8u (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_uint64 *p_lb, kmp_uint64 *p_ub, kmp_int64 *p_st)
void | __kmpc_dispatch_fini_4 (ident_t *loc, kmp_int32 gtid)
void | __kmpc_dispatch_fini_8 (ident_t *loc, kmp_int32 gtid)
void | __kmpc_dispatch_fini_4u (ident_t *loc, kmp_int32 gtid)
void | __kmpc_dispatch_fini_8u (ident_t *loc, kmp_int32 gtid)
void | __kmpc_for_static_init_4 (ident_t *loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 *plastiter, kmp_int32 *plower, kmp_int32 *pupper, kmp_int32 *pstride, kmp_int32 incr, kmp_int32 chunk)
void | __kmpc_for_static_init_4u (ident_t *loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 *plastiter, kmp_uint32 *plower, kmp_uint32 *pupper, kmp_int32 *pstride, kmp_int32 incr, kmp_int32 chunk)
void | __kmpc_for_static_init_8 (ident_t *loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 *plastiter, kmp_int64 *plower, kmp_int64 *pupper, kmp_int64 *pstride, kmp_int64 incr, kmp_int64 chunk)
void | __kmpc_for_static_init_8u (ident_t *loc, kmp_int32 gtid, kmp_int32 schedtype, kmp_int32 *plastiter, kmp_uint64 *plower, kmp_uint64 *pupper, kmp_int64 *pstride, kmp_int64 incr, kmp_int64 chunk)
void | __kmpc_dist_for_static_init_4 (ident_t *loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 *plastiter, kmp_int32 *plower, kmp_int32 *pupper, kmp_int32 *pupperD, kmp_int32 *pstride, kmp_int32 incr, kmp_int32 chunk)
void | __kmpc_dist_for_static_init_4u (ident_t *loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 *plastiter, kmp_uint32 *plower, kmp_uint32 *pupper, kmp_uint32 *pupperD, kmp_int32 *pstride, kmp_int32 incr, kmp_int32 chunk)
void | __kmpc_dist_for_static_init_8 (ident_t *loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 *plastiter, kmp_int64 *plower, kmp_int64 *pupper, kmp_int64 *pupperD, kmp_int64 *pstride, kmp_int64 incr, kmp_int64 chunk)
void | __kmpc_dist_for_static_init_8u (ident_t *loc, kmp_int32 gtid, kmp_int32 schedule, kmp_int32 *plastiter, kmp_uint64 *plower, kmp_uint64 *pupper, kmp_uint64 *pupperD, kmp_int64 *pstride, kmp_int64 incr, kmp_int64 chunk)
void | __kmpc_team_static_init_4 (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_int32 *p_lb, kmp_int32 *p_ub, kmp_int32 *p_st, kmp_int32 incr, kmp_int32 chunk)
void | __kmpc_team_static_init_4u (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_uint32 *p_lb, kmp_uint32 *p_ub, kmp_int32 *p_st, kmp_int32 incr, kmp_int32 chunk)
void | __kmpc_team_static_init_8 (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_int64 *p_lb, kmp_int64 *p_ub, kmp_int64 *p_st, kmp_int64 incr, kmp_int64 chunk)
void | __kmpc_team_static_init_8u (ident_t *loc, kmp_int32 gtid, kmp_int32 *p_last, kmp_uint64 *p_lb, kmp_uint64 *p_ub, kmp_int64 *p_st, kmp_int64 incr, kmp_int64 chunk)

## Detailed Description

These functions are used for implementing `#pragma omp for`, `#pragma omp sections`, `#pragma omp single` and `#pragma omp master` constructs.

When handling loops, there are different functions for each of the signed and unsigned 32 and 64 bit integer types which have the name suffixes `_4`, `_4u`, `_8` and `_8u`. The semantics of each of the functions is the same, so they are only described once.

Static loop scheduling is handled by __kmpc_for_static_init_4 and friends. Only a single call is needed, since the iterations to be executed by any give thread can be determined as soon as the loop parameters are known.

Dynamic scheduling is handled by the __kmpc_dispatch_init_4 and __kmpc_dispatch_next_4 functions. The init function is called once in each thread outside the loop, while the next function is called each time that the previous chunk of work has been exhausted.

## Enumeration Type Documentation

## sched_type

enum sched_type : kmp_int32

Describes the loop schedule to be used for a parallel for loop.

Enumerator
kmp_sch_lower | lower bound for unordered values
kmp_sch_static | static unspecialized
kmp_sch_guided_chunked | guided unspecialized
kmp_sch_auto | auto
kmp_sch_upper | upper bound for unordered values
kmp_ord_lower | lower bound for ordered values, must be power of 2
kmp_ord_static | ordered static unspecialized
kmp_ord_auto | ordered auto
kmp_ord_upper | upper bound for ordered values
kmp_distribute_static_chunked | distribute static chunked
kmp_distribute_static | distribute static unspecialized
kmp_nm_lower | lower bound for nomerge values
kmp_nm_static | static unspecialized
kmp_nm_guided_chunked | guided unspecialized
kmp_nm_auto | auto
kmp_nm_ord_static | ordered static unspecialized
kmp_nm_ord_auto | auto
kmp_nm_upper | upper bound for nomerge values
kmp_sch_default | default scheduling algorithm

Definition at line 320 of file kmp.h.

## Function Documentation

## __kmpc_critical()

void __kmpc_critical | ( | ident_t * | loc,
|  | kmp_int32 | global_tid,
|  | kmp_critical_name * | crit
| ) |  |

Parameters

  loc | source location information.
  global_tid | global thread number .
  crit | identity of the critical section. This could be a pointer to a lock associated with the critical section, or some other suitably unique value.

Enter code protected by a `critical` construct. This function blocks until the executing thread can enter the critical section.

Definition at line 1125 of file kmp_csupport.cpp.

## __kmpc_dispatch_fini_4()

void __kmpc_dispatch_fini_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid
| ) |  |

Parameters

  loc | Source code location
  gtid | Global thread id

Mark the end of a dynamic loop.

Definition at line 2447 of file kmp_dispatch.cpp.

## __kmpc_dispatch_fini_4u()

void __kmpc_dispatch_fini_4u | ( | ident_t * | loc,
|  | kmp_int32 | gtid
| ) |  |

See __kmpc_dispatch_fini_4

Definition at line 2461 of file kmp_dispatch.cpp.

## __kmpc_dispatch_fini_8()

void __kmpc_dispatch_fini_8 | ( | ident_t * | loc,
|  | kmp_int32 | gtid
| ) |  |

See __kmpc_dispatch_fini_4

Definition at line 2454 of file kmp_dispatch.cpp.

## __kmpc_dispatch_fini_8u()

void __kmpc_dispatch_fini_8u | ( | ident_t * | loc,
|  | kmp_int32 | gtid
| ) |  |

See __kmpc_dispatch_fini_4

Definition at line 2468 of file kmp_dispatch.cpp.

## __kmpc_dispatch_init_4()

void __kmpc_dispatch_init_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | enum sched_type | schedule,
|  | kmp_int32 | lb,
|  | kmp_int32 | ub,
|  | kmp_int32 | st,
|  | kmp_int32 | chunk
| ) |  |

Parameters

  loc | Source location
  gtid | Global thread id
  schedule | Schedule type
  lb | Lower bound
  ub | Upper bound
  st | Step (or increment if you prefer)
  chunk | The chunk size to block with

This function prepares the runtime to start a dynamically scheduled for loop, saving the loop arguments. These functions are all identical apart from the types of the arguments.

Definition at line 2260 of file kmp_dispatch.cpp.

## __kmpc_dispatch_init_4u()

void __kmpc_dispatch_init_4u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | enum sched_type | schedule,
|  | kmp_uint32 | lb,
|  | kmp_uint32 | ub,
|  | kmp_int32 | st,
|  | kmp_int32 | chunk
| ) |  |

See __kmpc_dispatch_init_4

Definition at line 2272 of file kmp_dispatch.cpp.

## __kmpc_dispatch_init_8()

void __kmpc_dispatch_init_8 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | enum sched_type | schedule,
|  | kmp_int64 | lb,
|  | kmp_int64 | ub,
|  | kmp_int64 | st,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_dispatch_init_4

Definition at line 2285 of file kmp_dispatch.cpp.

## __kmpc_dispatch_init_8u()

void __kmpc_dispatch_init_8u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | enum sched_type | schedule,
|  | kmp_uint64 | lb,
|  | kmp_uint64 | ub,
|  | kmp_int64 | st,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_dispatch_init_4

Definition at line 2298 of file kmp_dispatch.cpp.

## __kmpc_dispatch_next_4()

int __kmpc_dispatch_next_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_int32 * | p_lb,
|  | kmp_int32 * | p_ub,
|  | kmp_int32 * | p_st
| ) |  |

Parameters

  loc | Source code location
  gtid | Global thread id
  p_last | Pointer to a flag set to one if this is the last chunk or zero otherwise
  p_lb | Pointer to the lower bound for the next chunk of work
  p_ub | Pointer to the upper bound for the next chunk of work
  p_st | Pointer to the stride for the next chunk of work

Returns
  one if there is work to be done, zero otherwise

Get the next dynamically allocated chunk of work for this thread. If there is no more work, then the lb,ub and stride need not be modified.

Definition at line 2378 of file kmp_dispatch.cpp.

## __kmpc_dispatch_next_4u()

int __kmpc_dispatch_next_4u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_uint32 * | p_lb,
|  | kmp_uint32 * | p_ub,
|  | kmp_int32 * | p_st
| ) |  |

See __kmpc_dispatch_next_4

Definition at line 2394 of file kmp_dispatch.cpp.

## __kmpc_dispatch_next_8()

int __kmpc_dispatch_next_8 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_int64 * | p_lb,
|  | kmp_int64 * | p_ub,
|  | kmp_int64 * | p_st
| ) |  |

See __kmpc_dispatch_next_4

Definition at line 2411 of file kmp_dispatch.cpp.

## __kmpc_dispatch_next_8u()

int __kmpc_dispatch_next_8u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_uint64 * | p_lb,
|  | kmp_uint64 * | p_ub,
|  | kmp_int64 * | p_st
| ) |  |

See __kmpc_dispatch_next_4

Definition at line 2427 of file kmp_dispatch.cpp.

## __kmpc_dist_dispatch_init_4()

void __kmpc_dist_dispatch_init_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | enum sched_type | schedule,
|  | kmp_int32 * | p_last,
|  | kmp_int32 | lb,
|  | kmp_int32 | ub,
|  | kmp_int32 | st,
|  | kmp_int32 | chunk
| ) |  |

See __kmpc_dispatch_init_4

Difference from __kmpc_dispatch_init set of functions is these functions are called for composite distribute parallel for construct. Thus before regular iterations dispatching we need to calc per-team iteration space.

These functions are all identical apart from the types of the arguments.

Definition at line 2317 of file kmp_dispatch.cpp.

## __kmpc_dist_for_static_init_4()

void __kmpc_dist_for_static_init_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedule,
|  | kmp_int32 * | plastiter,
|  | kmp_int32 * | plower,
|  | kmp_int32 * | pupper,
|  | kmp_int32 * | pupperD,
|  | kmp_int32 * | pstride,
|  | kmp_int32 | incr,
|  | kmp_int32 | chunk
| ) |  |

Parameters

  loc | Source code location
  gtid | Global thread id of this thread
  schedule | Scheduling type for the parallel loop
  plastiter | Pointer to the "last iteration" flag
  plower | Pointer to the lower bound
  pupper | Pointer to the upper bound of loop chunk
  pupperD | Pointer to the upper bound of dist_chunk
  pstride | Pointer to the stride for parallel loop
  incr | Loop increment
  chunk | The chunk size for the parallel loop

Each of the four functions here are identical apart from the argument types.

The functions compute the upper and lower bounds and strides to be used for the set of iterations to be executed by the current thread from the statically scheduled loop that is described by the initial values of the bounds, strides, increment and chunks for parallel loop and distribute constructs.

Definition at line 879 of file kmp_sched.cpp.

## __kmpc_dist_for_static_init_4u()

void __kmpc_dist_for_static_init_4u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedule,
|  | kmp_int32 * | plastiter,
|  | kmp_uint32 * | plower,
|  | kmp_uint32 * | pupper,
|  | kmp_uint32 * | pupperD,
|  | kmp_int32 * | pstride,
|  | kmp_int32 | incr,
|  | kmp_int32 | chunk
| ) |  |

See __kmpc_dist_for_static_init_4

Definition at line 891 of file kmp_sched.cpp.

## __kmpc_dist_for_static_init_8()

void __kmpc_dist_for_static_init_8 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedule,
|  | kmp_int32 * | plastiter,
|  | kmp_int64 * | plower,
|  | kmp_int64 * | pupper,
|  | kmp_int64 * | pupperD,
|  | kmp_int64 * | pstride,
|  | kmp_int64 | incr,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_dist_for_static_init_4

Definition at line 903 of file kmp_sched.cpp.

## __kmpc_dist_for_static_init_8u()

void __kmpc_dist_for_static_init_8u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedule,
|  | kmp_int32 * | plastiter,
|  | kmp_uint64 * | plower,
|  | kmp_uint64 * | pupper,
|  | kmp_uint64 * | pupperD,
|  | kmp_int64 * | pstride,
|  | kmp_int64 | incr,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_dist_for_static_init_4

Definition at line 915 of file kmp_sched.cpp.

## __kmpc_end_critical()

void __kmpc_end_critical | ( | ident_t * | loc,
|  | kmp_int32 | global_tid,
|  | kmp_critical_name * | crit
| ) |  |

Parameters

  loc | source location information.
  global_tid | global thread number .
  crit | identity of the critical section. This could be a pointer to a lock associated with the critical section, or some other suitably unique value.

Leave a critical section, releasing any lock that was held during its execution.

Definition at line 1476 of file kmp_csupport.cpp.

## __kmpc_end_master()

void __kmpc_end_master | ( | ident_t * | loc,
|  | kmp_int32 | global_tid
| ) |  |

Parameters

  loc | source location information.
  global_tid | global thread number .

Mark the end of a `master` region. This should only be called by the thread that executes the `master` region.

Definition at line 781 of file kmp_csupport.cpp.

## __kmpc_end_ordered()

void __kmpc_end_ordered | ( | ident_t * | loc,
|  | kmp_int32 | gtid
| ) |  |

Parameters

  loc | source location information.
  gtid | global thread number.

End execution of an `ordered` construct.

Definition at line 885 of file kmp_csupport.cpp.

## __kmpc_end_single()

void __kmpc_end_single | ( | ident_t * | loc,
|  | kmp_int32 | global_tid
| ) |  |

Parameters

  loc | source location information
  global_tid | global thread number

Mark the end of a `single` construct. This function should only be called by the thread that executed the block of code protected by the `single` construct.

Definition at line 1747 of file kmp_csupport.cpp.

## __kmpc_for_static_fini()

void __kmpc_for_static_fini | ( | ident_t * | loc,
|  | kmp_int32 | global_tid
| ) |  |

Parameters

  loc | Source location
  global_tid | Global thread id

Mark the end of a statically scheduled loop.

Definition at line 1773 of file kmp_csupport.cpp.

## __kmpc_for_static_init_4()

void __kmpc_for_static_init_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedtype,
|  | kmp_int32 * | plastiter,
|  | kmp_int32 * | plower,
|  | kmp_int32 * | pupper,
|  | kmp_int32 * | pstride,
|  | kmp_int32 | incr,
|  | kmp_int32 | chunk
| ) |  |

Parameters

  loc | Source code location
  gtid | Global thread id of this thread
  schedtype | Scheduling type
  plastiter | Pointer to the "last iteration" flag
  plower | Pointer to the lower bound
  pupper | Pointer to the upper bound
  pstride | Pointer to the stride
  incr | Loop increment
  chunk | The chunk size

Each of the four functions here are identical apart from the argument types.

The functions compute the upper and lower bounds and stride to be used for the set of iterations to be executed by the current thread from the statically scheduled loop that is described by the initial values of the bounds, stride, increment and chunk size.

Definition at line 791 of file kmp_sched.cpp.

## __kmpc_for_static_init_4u()

void __kmpc_for_static_init_4u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedtype,
|  | kmp_int32 * | plastiter,
|  | kmp_uint32 * | plower,
|  | kmp_uint32 * | pupper,
|  | kmp_int32 * | pstride,
|  | kmp_int32 | incr,
|  | kmp_int32 | chunk
| ) |  |

See __kmpc_for_static_init_4

Definition at line 807 of file kmp_sched.cpp.

## __kmpc_for_static_init_8()

void __kmpc_for_static_init_8 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedtype,
|  | kmp_int32 * | plastiter,
|  | kmp_int64 * | plower,
|  | kmp_int64 * | pupper,
|  | kmp_int64 * | pstride,
|  | kmp_int64 | incr,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_for_static_init_4

Definition at line 824 of file kmp_sched.cpp.

## __kmpc_for_static_init_8u()

void __kmpc_for_static_init_8u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 | schedtype,
|  | kmp_int32 * | plastiter,
|  | kmp_uint64 * | plower,
|  | kmp_uint64 * | pupper,
|  | kmp_int64 * | pstride,
|  | kmp_int64 | incr,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_for_static_init_4

Definition at line 840 of file kmp_sched.cpp.

## __kmpc_master()

kmp_int32 __kmpc_master | ( | ident_t * | loc,
|  | kmp_int32 | global_tid
| ) |  |

Parameters

  loc | source location information.
  global_tid | global thread number .

Returns
  1 if this thread should execute the `master` block, 0 otherwise.

Definition at line 727 of file kmp_csupport.cpp.

Referenced by __kmpc_barrier_master_nowait().

## __kmpc_ordered()

void __kmpc_ordered | ( | ident_t * | loc,
|  | kmp_int32 | gtid
| ) |  |

Parameters

  loc | source location information.
  gtid | global thread number.

Start execution of an `ordered` construct.

Definition at line 815 of file kmp_csupport.cpp.

## __kmpc_single()

kmp_int32 __kmpc_single | ( | ident_t * | loc,
|  | kmp_int32 | global_tid
| ) |  |

Parameters

  loc | source location information
  global_tid | global thread number

Returns
  One if this thread should execute the single construct, zero otherwise.

Test whether to execute a `single` construct. There are no implicit barriers in the two "single" calls, rather the compiler should introduce an explicit barrier if it is required.

Definition at line 1695 of file kmp_csupport.cpp.

## __kmpc_team_static_init_4()

void __kmpc_team_static_init_4 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_int32 * | p_lb,
|  | kmp_int32 * | p_ub,
|  | kmp_int32 * | p_st,
|  | kmp_int32 | incr,
|  | kmp_int32 | chunk
| ) |  |

Parameters

  loc | Source location
  gtid | Global thread id
  p_last | pointer to last iteration flag
  p_lb | pointer to Lower bound
  p_ub | pointer to Upper bound
  p_st | Step (or increment if you prefer)
  incr | Loop increment
  chunk | The chunk size to block with

The functions compute the upper and lower bounds and stride to be used for the set of iterations to be executed by the current team from the statically scheduled loop that is described by the initial values of the bounds, stride, increment and chunk for the distribute construct as part of composite distribute parallel loop construct. These functions are all identical apart from the types of the arguments.

Definition at line 953 of file kmp_sched.cpp.

## __kmpc_team_static_init_4u()

void __kmpc_team_static_init_4u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_uint32 * | p_lb,
|  | kmp_uint32 * | p_ub,
|  | kmp_int32 * | p_st,
|  | kmp_int32 | incr,
|  | kmp_int32 | chunk
| ) |  |

See __kmpc_team_static_init_4

Definition at line 965 of file kmp_sched.cpp.

## __kmpc_team_static_init_8()

void __kmpc_team_static_init_8 | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_int64 * | p_lb,
|  | kmp_int64 * | p_ub,
|  | kmp_int64 * | p_st,
|  | kmp_int64 | incr,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_team_static_init_4

Definition at line 977 of file kmp_sched.cpp.

## __kmpc_team_static_init_8u()

void __kmpc_team_static_init_8u | ( | ident_t * | loc,
|  | kmp_int32 | gtid,
|  | kmp_int32 * | p_last,
|  | kmp_uint64 * | p_lb,
|  | kmp_uint64 * | p_ub,
|  | kmp_int64 * | p_st,
|  | kmp_int64 | incr,
|  | kmp_int64 | chunk
| ) |  |

See __kmpc_team_static_init_4

Definition at line 989 of file kmp_sched.cpp.