walberla::UniqueID< T > Class Template Reference

Detailed Description

template<typename T>
class walberla::UniqueID< T >

Generation of unique IDs in MPI environments.

The UniqueID class is responsible for the generation of unique system IDs even during an MPI parallel execution. The unique ID is composed from the number of locally generated objects of type T and the rank of the local MPI process.

#include <UniqueID.h>

+ Inheritance diagram for walberla::UniqueID< T >:

Static Public Member Functions

Utility functions
static id_t create ()
 Generates a unique ID. More...
 
static id_t createGlobal ()
 Generates an ID which is the same on all processes but unique on each process. More...
 
static id_t invalidID ()
 Returns an invalid ID. More...
 
static id_t count ()
 
static id_t globalCount ()
 

Static Private Attributes

Member variables
static id_t counter_
 System ID counter. More...
 
static id_t globalCounter_
 Global system ID counter. More...
 

Additional Inherited Members

- Private Member Functions inherited from walberla::NonCreateable
 NonCreateable ()=delete
 

Member Function Documentation

◆ count()

template<typename T >
static id_t walberla::UniqueID< T >::count ( )
inlinestatic

◆ create()

template<typename T >
id_t walberla::UniqueID< T >::create
inlinestatic

Generates a unique ID.

Returns
The newly generated unique ID.

◆ createGlobal()

template<typename T >
id_t walberla::UniqueID< T >::createGlobal
inlinestatic

Generates an ID which is the same on all processes but unique on each process.

Returns
The newly generated ID.

◆ globalCount()

template<typename T >
static id_t walberla::UniqueID< T >::globalCount ( )
inlinestatic

◆ invalidID()

template<typename T >
id_t walberla::UniqueID< T >::invalidID
inlinestatic

Returns an invalid ID.

Returns
invalid ID.

Member Data Documentation

◆ counter_

template<typename T >
id_t walberla::UniqueID< T >::counter_
staticprivate

System ID counter.

◆ globalCounter_

template<typename T >
id_t walberla::UniqueID< T >::globalCounter_
staticprivate

Global system ID counter.


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