The Gaudi Framework  v32r2 (46d42edc)
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;
13 
24 namespace SG {
25  class HiveMgrSvc;
26 }
27 
28 namespace Gaudi {
29 
30  namespace Concurrency {
31 
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:
44 
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
static GAUDI_API void setNumThreads(const std::size_t &nT)
static GAUDI_API std::size_t numThreads()
number of Worker Threads (for MT)
static GAUDI_API void setNumProcs(const std::size_t &nP)
static GAUDI_API std::size_t numProcs()
number of forked child processes (for MP)
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
Data service base class.
A service which initializes a TBB thread pool.
Definition: ThreadPoolSvc.h:28
#define GAUDI_API
Definition: Kernel.h:71
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
Use a minimal event store implementation, and adds everything required to satisfy the IDataProviderSv...
static GAUDI_API void setNumConcEvents(const std::size_t &nE)
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)