DotMP
Package Functions | Properties | Static Private Attributes | List of all members
DotMP.ForkedRegion Class Reference

Contains the Region object and controls for creating and starting a parallel region. More...

Collaboration diagram for DotMP.ForkedRegion:
Collaboration graph
[legend]

Package Functions

 ForkedRegion ()
 Default constructor. More...
 
 ForkedRegion (uint num_threads, Action omp_fn)
 Initializes the threadpool with the specified number of threads and function to be executed, as well as setting the thread names. More...
 
void StartThreadpool ()
 Starts the threadpool and waits for all threads to complete before returning. More...
 

Properties

Region reg [get]
 Getter for singleton object ForkedRegion.reg_pv. More...
 
bool in_parallel [get, private set]
 Getter and setter for singleton bool ForkedRegion.in_parallel_prv. More...
 
ref uint in_workshare [get]
 Getter and setter for singleton bool ForkedRegion.in_workshare_prv. More...
 

Static Private Attributes

static Region reg_pv
 The contained Region object. More...
 
static bool in_parallel_prv
 Whether or not the program is currently in a parallel region. More...
 
static uint in_workshare_prv = 0
 Whether or not the program is currently in a worksharing region (>0 meaning the program is in said region). More...
 

Detailed Description

Contains the Region object and controls for creating and starting a parallel region.

Constructor & Destructor Documentation

◆ ForkedRegion() [1/2]

DotMP.ForkedRegion.ForkedRegion ( )
inlinepackage

Default constructor.

◆ ForkedRegion() [2/2]

DotMP.ForkedRegion.ForkedRegion ( uint  num_threads,
Action  omp_fn 
)
inlinepackage

Initializes the threadpool with the specified number of threads and function to be executed, as well as setting the thread names.

Parameters
num_threadsThe number of threads to be created.
omp_fnThe function to be executed.

Member Function Documentation

◆ StartThreadpool()

void DotMP.ForkedRegion.StartThreadpool ( )
inlinepackage

Starts the threadpool and waits for all threads to complete before returning.

Exceptions
ExceptionThrown if an exception is caught in the threadpool. If multiple are thrown, the first one thrown is returned.

Member Data Documentation

◆ in_parallel_prv

bool DotMP.ForkedRegion.in_parallel_prv
staticprivate

Whether or not the program is currently in a parallel region.

◆ in_workshare_prv

uint DotMP.ForkedRegion.in_workshare_prv = 0
staticprivate

Whether or not the program is currently in a worksharing region (>0 meaning the program is in said region).

◆ reg_pv

Region DotMP.ForkedRegion.reg_pv
staticprivate

The contained Region object.

Property Documentation

◆ in_parallel

bool DotMP.ForkedRegion.in_parallel
getprivate setpackage

Getter and setter for singleton bool ForkedRegion.in_parallel_prv.

◆ in_workshare

ref uint DotMP.ForkedRegion.in_workshare
getpackage

Getter and setter for singleton bool ForkedRegion.in_workshare_prv.

◆ reg

Region DotMP.ForkedRegion.reg
getpackage

Getter for singleton object ForkedRegion.reg_pv.


The documentation for this class was generated from the following file: