| The Gaudi Framework v32r1 (f65d50dc)

ConcurrencyFlags.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_CONCURRENCYFLAGS_H
2 #define GAUDIKERNEL_CONCURRENCYFLAGS_H 1
3
4 #include <cstddef>
5
6 #include "GaudiKernel/Kernel.h"
7
8 class ThreadPoolSvc;
9 class HiveWhiteBoard;
10 class SGHiveMgrSvc;
11 class AthMpEvtLoopMgr;
12 class EvtStoreSvc;
13
24 namespace SG {
25 class HiveMgrSvc;
26 }
27
28 namespace Gaudi {
29
30 namespace Concurrency {
31
32 class ConcurrencyFlags {
33
34 friend class ::ThreadPoolSvc;
35 friend class ::HiveWhiteBoard;
36 friend class ::EvtStoreSvc;
37 friend class SG::HiveMgrSvc; // ATLAS
38 friend class ::AthMpEvtLoopMgr; // ATLAS
39
40 public:
43 static GAUDI_API std::size_t numThreads() { return n_threads; }
44
47 static GAUDI_API std::size_t numConcurrentEvents() { return n_concEvts; }
48
51 static GAUDI_API std::size_t numProcs() { return n_procs; }
52
55 static GAUDI_API bool concurrent() { return ( n_threads || n_concEvts || n_procs ); }
56
57 private:
58 static GAUDI_API void setNumThreads( const std::size_t& nT ) { n_threads = nT; }
59 static GAUDI_API void setNumConcEvents( const std::size_t& nE ) { n_concEvts = nE; }
60 static GAUDI_API void setNumProcs( const std::size_t& nP ) { n_procs = nP; }
61
62 private:
63 static std::size_t n_threads; // worker threads for MT
64 static std::size_t n_concEvts; // concurrent events for MT
65 static std::size_t n_procs; // child processes for MP
66 };
67 } // namespace Concurrency
68 } // namespace Gaudi
69
70 #endif
SG
Definition: ConcurrencyFlags.h:24
Gaudi::Concurrency::ConcurrencyFlags::setNumThreads
static GAUDI_API void setNumThreads(const std::size_t &nT)
Definition: ConcurrencyFlags.h:58
Kernel.h
Gaudi::Concurrency::ConcurrencyFlags::HiveMgrSvc
friend class SG::HiveMgrSvc
Definition: ConcurrencyFlags.h:37
Gaudi::Concurrency::ConcurrencyFlags::n_threads
static std::size_t n_threads
Definition: ConcurrencyFlags.h:63
Gaudi::Concurrency::ConcurrencyFlags::numThreads
static GAUDI_API std::size_t numThreads()
number of Worker Threads (for MT)
Definition: ConcurrencyFlags.h:43
Gaudi::Concurrency::ConcurrencyFlags::setNumProcs
static GAUDI_API void setNumProcs(const std::size_t &nP)
Definition: ConcurrencyFlags.h:60
std::size_t
Gaudi::Concurrency::ConcurrencyFlags::numProcs
static GAUDI_API std::size_t numProcs()
number of forked child processes (for MP)
Definition: ConcurrencyFlags.h:51
Gaudi::Concurrency::ConcurrencyFlags::concurrent
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
Definition: ConcurrencyFlags.h:55
HiveWhiteBoard
Data service base class.
Definition: HiveWhiteBoard.cpp:119
Gaudi::Concurrency::ConcurrencyFlags::n_concEvts
static std::size_t n_concEvts
Definition: ConcurrencyFlags.h:64
Gaudi::Concurrency::ConcurrencyFlags::n_procs
static std::size_t n_procs
Definition: ConcurrencyFlags.h:65
Gaudi::Concurrency::ConcurrencyFlags
Definition: ConcurrencyFlags.h:32
ThreadPoolSvc
A service which initializes a TBB thread pool.
Definition: ThreadPoolSvc.h:28
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
EvtStoreSvc
Use a minimal event store implementation, and adds everything required to satisfy the IDataProviderSv...
Definition: EvtStoreSvc.cpp:188
Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents
static GAUDI_API void setNumConcEvents(const std::size_t &nE)
Definition: ConcurrencyFlags.h:59
Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)
Definition: ConcurrencyFlags.h:47