![]() |
![]() |
OpenMP Runtime
|
Declares various OMP data structures such as thread, teamstate team etc. More...
#include "tomp_defs.h"
#include "tomp_init.h"
#include "tomp_util.h"
#include "tomp_qmss.h"
#include "gomp_libgomp.h"
Go to the source code of this file.
Classes | |
struct | tomp_Team |
Describes a team of "threads". More... | |
struct | tomp_TeamState |
Describes current state of the thread. More... | |
struct | tomp_Thread |
Thread structure. More... | |
struct | tomp_Task |
Task structure. More... | |
Typedefs | |
typedef void(* | tomp_OutlinedFunc )(void *) |
Function type executed in the receive function. | |
Enumerations | |
enum | tomp_TaskStealing_e { tomp_TaskStealing_DISABLED = 0, tomp_TaskSteaking_ENABLED } |
Task Stealing. | |
enum | tomp_TaskKind_e { tomp_TaskKind_IMPLICIT = 0, tomp_TaskKind_DEFERRED, tomp_TaskKind_INCLUDED } |
Task kinds. | |
Functions | |
void | tomp_eoStartLoopX (tomp_event_t event) |
Function executed by the worker cores when they pull an event from the workshare queue. | |
void | tomp_eoStartTaskX (tomp_event_t event) |
Function executed by the worker cores when they pull an event from the task queue. | |
tomp_Team * | tomp_initialize_team (unsigned int num_threads) |
Create and initialize a team. | |
void | tomp_start_team (tomp_Team *ts, void(*fn)(void *), unsigned char *data) |
Start the team by pushing events to the StartLoop queue. | |
tomp_TeamState * | tomp_alloc_TeamState () |
static void | tomp_clear_TeamState (tomp_TeamState *ts) |
Reset a tomp_teamState variable. | |
static void | tomp_taskInit (tomp_Task *task, tomp_TaskKind_e kind, tomp_Task *parent, tomp_Team *team) |
Initialize a task object. | |
void | tomp_completePendingTasks () |
Complete all explicit tasks generated upto the implicit/explicit barrier. | |
static struct gomp_task_icv * | gomp_icv (void) |
Variables | |
tomp_Thread | tomp_thread |
void * | __TI_tls_currentTP |
Local TLS pointer (one per core) | |
uint32_t | tomp_threadNum |
tomp_event_t | tomp_eventHdlTbl [TOMP_DEVICE_NUM_CORES-1] |
tomp_Task * | tomp_taskPtrTbl [TOMP_DEVICE_NUM_CORES-1] |
tomp_Task * | tomp_initialTaskForMaster |
Initial Task for master. | |
tomp_Task * | tomp_implicitTaskForMaster |
Implicit Task for master. |
Declares various OMP data structures such as thread, teamstate team etc.
static void tomp_clear_TeamState | ( | tomp_TeamState * | ts | ) | [inline, static] |
Reset a tomp_teamState variable.
Ensure that tomp_TeamState is properly initialized at: 1. startup - to deal with orphaned constucts 2. start of each parallel region - to remove state from a previous region
void tomp_completePendingTasks | ( | ) |
Complete all explicit tasks generated upto the implicit/explicit barrier.
From OMP Spec 3.0, p67, line 23 All threads of the team executing the binding parallel region must execute the barrier region and complete execution of all explicit tasks generated in the binding parallel region up to this point before any are allowed to continue execution beyond the barrier.
tomp_Team* tomp_initialize_team | ( | unsigned int | threadNum | ) |
Create and initialize a team.
threadNum | number of threads in the team |
void tomp_start_team | ( | tomp_Team * | team, |
void(*)(void *) | fn, | ||
unsigned char * | data | ||
) |
Start the team by pushing events to the StartLoop queue.
team | pointer to a team |
fn | function corresponding to the implicit task (outlined fn) |
data | data associated with the function |
void* __TI_tls_currentTP |
Local TLS pointer (one per core)
Implicit Task for master.
The current_task field in tomp_Thread for the master points to this task when the thread is in a parallel region.
Initial Task for master.
This task is the initial implicit task associated with the initial thread. OpenMP Spec 3.0, p12, lines 1-4. There is a distinction between the initial implicit task and the implicit tasks created for a parallel region and this distinction is important for ownership of locks.