Containment Domains C++ API  0.1
Containment Domains C++ API v0.1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Groups Pages
Functions
Global CD Accessor Functions

Functions

CDHandle * cd::GetRootCD ()
 Accessor function to root CD of the application. More...
 
CDHandle * cd::GetCurrentCD ()
 Accessor function to current active CD. More...
 
CDErrT cd::SetCurrentCD (const CDHandle *cd)
 Accessor function for setting the current active CD. More...
 

Detailed Description

The Global CD Accessor Functions are used to get the current and root CD handles if these are not explicitly tracked.

These methods are globally accessible without a CDHandle object.

Function Documentation

CDHandle* cd::GetCurrentCD ( )

Accessor function to current active CD.

At any point after the CD runtime is initialized, each task is associated with a current CD instance. The current CD is the deepest CD in the tree visible from the task that has begun but has not yet completed. In other words, whenever a CD begins, it becomes the current CD. When a CD completes, its parent becomes the current CD.

Returns
returns a pointer to the handle of the current active CD; Returns 0 if CD runtime is not yet initialized or because of a CD implementation bug.
CDHandle* cd::GetRootCD ( )

Accessor function to root CD of the application.

Returns
returns a pointer to the handle of the root CD; Returns 0 if CD runtime is not yet initialized or because of a CD implementation bug.
CDErrT cd::SetCurrentCD ( const CDHandle *  cd)

Accessor function for setting the current active CD.

At any point after the CD runtime is initialized, each task is associated with a current CD instance. The current CD is the deepest CD in the tree visible from the task that has begun but has not yet completed. In other words, whenever a CD begins, it becomes the current CD. When a CD completes, its parent becomes the current CD.

This function is needed when using a non-collective CDHandle::Begin() or CDHandle::Complete() and the CD that is now beginning contains multiple tasks.

Returns
returns a pointer to the handle of the current active CD; Returns 0 if CD runtime is not yet initialized or because of a CD implementation bug.
See also
CDHandle::Begin(), CDHandle::Complete()
Parameters
[in]cdpointer to CDHandle of the CD instance that is now the current CD.