Containment Domains C++ API
0.1
Containment Domains C++ API v0.1
|
Functions | |
CDHandle * | cd::Init (bool collective=trueCDErrT *error=0) |
Initialize the CD runtime. More... | |
The CD Init Functions are used for initialization.
CDHandle* cd::Init | ( | bool | collective = trueCDErrT *error=0 | ) |
Initialize the CD runtime.
Creates all necessary CD runtime components and data structures, initializes the CD runtime, and creates and begins the root CD. At this point, the current CD is the root. cd::Init()
should only be called once per application.
There are two variants of this function. The first is a collective operation across all SPMD tasks currently in the application. All tasks get a handle to the single root and begin the CD in a synchronized manner. The second variant is called locally by a single task and synchronization, as well as broadcasting the handle are up to the programmer. Use of this second variant is discouraged.
kOK
if successful, AlreadyInit
if called more than once, and kError
if initialization is unsuccessful for some reason.The handle to the root is also registered in some globally accessible variable so that it can be accessed by cd::GetCurrentCD() and cd::GetRootCD().
[in] | collective | Collective operation (default) or called from only a single task (discouraged) [in,out] Pointer for error return value (kOK on success, kAlreadyInit if trying to re-initialize, and kError on other failures); no error value returned if error=0. |