Parallel (fork/join)

Typedefs

typedef void(* kmpc_micro )(kmp_int32 *global_tid, kmp_int32 *bound_tid,...)

Functions

void __kmpc_fork_call (ident_t *loc, kmp_int32 argc, kmpc_micro microtask,...)
void __kmpc_push_num_threads (ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads)

Detailed Description

These functions are used for implementing #pragma omp parallel.


Typedef Documentation

typedef void(* kmpc_micro)(kmp_int32 *global_tid, kmp_int32 *bound_tid,...)

The type for a microtask which gets passed to __kmpc_fork_call(). The arguments to the outlined function are

Parameters:
global_tid the global thread identity of the thread executing the function.
bound_tid the local identitiy of the thread executing the function
... pointers to shared variables accessed by the function.

Definition at line 1253 of file kmp.h.


Function Documentation

void __kmpc_fork_call ( ident_t loc,
kmp_int32  argc,
kmpc_micro  microtask,
  ... 
)
Parameters:
loc source location information
argc total number of arguments in the ellipsis
microtask pointer to callback routine consisting of outlined parallel construct
... pointers to shared variables that aren't global

Do the actual fork and call the microtask in the relevant number of threads.

Definition at line 311 of file kmp_csupport.c.

References __kmp_entry_gtid, __kmp_fork_call(), __kmp_invoke_task_func(), __kmp_join_call(), __kmp_threads, __kmp_tid_from_gtid, KMP_ARCH_X86_64, KMP_OS_LINUX, kmp_team::t, TRUE, and VOLATILE_CAST.

void __kmpc_push_num_threads ( ident_t loc,
kmp_int32  global_tid,
kmp_int32  num_threads 
)
Parameters:
loc source location information
global_tid global thread number
num_threads number of threads requested for this parallel construct

Set the number of threads to be used by the next fork spawned by this thread. This call is only required if the parallel construct has a `num_threads` clause.

Definition at line 270 of file kmp_csupport.c.

References __kmp_push_num_threads(), and KA_TRACE.


Generated on 25 Aug 2013 for libomp_oss by  doxygen 1.6.1