DotMP
Package Functions | Package Attributes | List of all members
DotMP.Region Class Reference

Contains relevant internal information about parallel regions, including the threads and the function to be executed. Provides a region-wide lock and SpinWait objects for each thread. More...

Package Functions

Thread CreateThread (Action omp_fn, int tid, uint num_threads)
 Factory for creating threads in the threadpool. More...
 
 Region (uint num_threads, Action omp_fn)
 Creates a specified number of threads available to the parallel region, and sets the function to be executed. Also sets other relevant data for the parallel region. More...
 

Package Attributes

Thread[] threads
 The threads to be created and executed. More...
 
object ws_lock
 Generic lock to be used within the workspace. More...
 
uint num_threads
 The number of threads in play. More...
 
Action omp_fn
 The function to be executed. More...
 
Exception ex
 Exception caught from threads. More...
 

Detailed Description

Contains relevant internal information about parallel regions, including the threads and the function to be executed. Provides a region-wide lock and SpinWait objects for each thread.

Constructor & Destructor Documentation

◆ Region()

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

Creates a specified number of threads available to the parallel region, and sets the function to be executed. Also sets other relevant data for the parallel region.

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

Member Function Documentation

◆ CreateThread()

Thread DotMP.Region.CreateThread ( Action  omp_fn,
int  tid,
uint  num_threads 
)
inlinepackage

Factory for creating threads in the threadpool.

Parameters
omp_fnThe function to execute.
tidThe thread ID.
num_threadsThe total number of threads.
Returns
The created Thread object.

Member Data Documentation

◆ ex

Exception DotMP.Region.ex
package

Exception caught from threads.

◆ num_threads

uint DotMP.Region.num_threads
package

The number of threads in play.

◆ omp_fn

Action DotMP.Region.omp_fn
package

The function to be executed.

◆ threads

Thread [] DotMP.Region.threads
package

The threads to be created and executed.

◆ ws_lock

object DotMP.Region.ws_lock
package

Generic lock to be used within the workspace.


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