OpenMP Runtime
Classes | Typedefs | Enumerations | Functions | Variables
tomp_parallel.h File Reference

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"
Include dependency graph for tomp_parallel.h:
This graph shows which files directly or indirectly include this file:

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_Teamtomp_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_TeamStatetomp_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_icvgomp_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_Tasktomp_taskPtrTbl [TOMP_DEVICE_NUM_CORES-1]
tomp_Tasktomp_initialTaskForMaster
 Initial Task for master.
tomp_Tasktomp_implicitTaskForMaster
 Implicit Task for master.

Detailed Description

Declares various OMP data structures such as thread, teamstate team etc.


Function Documentation

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

Here is the caller graph for this function:

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.

Parameters:
threadNumnumber of threads in the team
Returns:
a pointer to the initialized team
See also:
GOMP_parallel_start

Here is the call graph for this function:

Here is the caller graph for this function:

void tomp_start_team ( tomp_Team team,
void(*)(void *)  fn,
unsigned char *  data 
)

Start the team by pushing events to the StartLoop queue.

Parameters:
teampointer to a team
fnfunction corresponding to the implicit task (outlined fn)
datadata associated with the function
See also:
GOMP_parallel_start, tomp_eoStartLoop

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Local TLS pointer (one per core)

See also:
___c6xabi_get_tp in tomp_tls_get_tp.asm

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.

 All Classes Files Functions Variables Typedefs Enumerations Defines