Project
Loading...
Searching...
No Matches
o2::framework::ParallelContext Class Reference

#include <ParallelContext.h>

Public Member Functions

 ParallelContext (size_t index1D, size_t index1DSize)
 
size_t index1D () const
 
size_t index1DSize () const
 

Static Public Attributes

static constexpr ServiceKind service_kind = ServiceKind::Global
 

Detailed Description

Purpose of this class is to provide DataProcessors which have been instanciated in parallel via the o2::framework::parallel function with information relevant to the parallel execution, e.g. how many workers have been created by the above mentioned function and what's the unique id the caller is associated with. This context is exposed as a Service and it's therefore available to both the init and the processing callbacks via:

auto ctx = services.get<ParallelContext>();

FIXME: should we have convenience methods to address workers using different parallel topology (e.g. have a index2D, rather than index1D).

Definition at line 32 of file ParallelContext.h.

Constructor & Destructor Documentation

◆ ParallelContext()

o2::framework::ParallelContext::ParallelContext ( size_t  index1D,
size_t  index1DSize 
)
inline

Definition at line 37 of file ParallelContext.h.

Member Function Documentation

◆ index1D()

size_t o2::framework::ParallelContext::index1D ( ) const
inline

Definition at line 43 of file ParallelContext.h.

◆ index1DSize()

size_t o2::framework::ParallelContext::index1DSize ( ) const
inline

Definition at line 44 of file ParallelContext.h.

Member Data Documentation

◆ service_kind

constexpr ServiceKind o2::framework::ParallelContext::service_kind = ServiceKind::Global
staticconstexpr

Definition at line 35 of file ParallelContext.h.


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