| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 ForwardSchedulerSvc;
10 class AvalancheSchedulerSvc;
11
22 namespace Gaudi
23 {
24
25 namespace Concurrency
26 {
27
28 class ConcurrencyFlags
29 {
30
31 friend class ::ThreadPoolSvc;
32 friend class ::ForwardSchedulerSvc;
33 friend class ::AvalancheSchedulerSvc;
34
35 public:
38 static GAUDI_API std::size_t numThreads() { return n_threads; }
39
42 static GAUDI_API std::size_t numConcurrentEvents() { return n_concEvts; }
43
46 static GAUDI_API std::size_t numProcs() { return n_procs; }
47
50 static GAUDI_API bool concurrent() { return ( n_threads || n_concEvts || n_procs ); }
51
52 private:
53 static GAUDI_API void setNumThreads( const std::size_t& nT ) { n_threads = nT; }
54 static GAUDI_API void setNumConcEvents( const std::size_t& nE ) { n_concEvts = nE; }
55 static GAUDI_API void setNumProcs( const std::size_t& nP ) { n_procs = nP; }
56
57 private:
58 static std::size_t n_threads; // worker threads for MT
59 static std::size_t n_concEvts; // concurrent events for MT
60 static std::size_t n_procs; // child processes for MP
61 };
62 }
63 }
64
65 #endif
Gaudi::Concurrency::ConcurrencyFlags::setNumThreads
static GAUDI_API void setNumThreads(const std::size_t &nT)
Definition: ConcurrencyFlags.h:53
Kernel.h
Gaudi::Concurrency::ConcurrencyFlags::n_threads
static std::size_t n_threads
Definition: ConcurrencyFlags.h:58
Gaudi::Concurrency::ConcurrencyFlags::numThreads
static GAUDI_API std::size_t numThreads()
number of Worker Threads (for MT)
Definition: ConcurrencyFlags.h:38
Gaudi::Concurrency::ConcurrencyFlags::setNumProcs
static GAUDI_API void setNumProcs(const std::size_t &nP)
Definition: ConcurrencyFlags.h:55
ForwardSchedulerSvc
The SchedulerSvc implements the IScheduler interface.
Definition: ForwardSchedulerSvc.h:83
std::size_t
Gaudi::Concurrency::ConcurrencyFlags::numProcs
static GAUDI_API std::size_t numProcs()
number of forked child processes (for MP)
Definition: ConcurrencyFlags.h:46
Gaudi::Concurrency::ConcurrencyFlags::concurrent
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
Definition: ConcurrencyFlags.h:50
AvalancheSchedulerSvc
Introduction
Definition: AvalancheSchedulerSvc.h:102
Gaudi::Concurrency::ConcurrencyFlags::n_concEvts
static std::size_t n_concEvts
Definition: ConcurrencyFlags.h:59
Gaudi::Concurrency::ConcurrencyFlags::n_procs
static std::size_t n_procs
Definition: ConcurrencyFlags.h:60
Gaudi::Concurrency::ConcurrencyFlags
Definition: ConcurrencyFlags.h:28
ThreadPoolSvc
A service which initializes a TBB thread pool.
Definition: ThreadPoolSvc.h:26
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1
Gaudi::Concurrency::ConcurrencyFlags::setNumConcEvents
static GAUDI_API void setNumConcEvents(const std::size_t &nE)
Definition: ConcurrencyFlags.h:54
Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)
Definition: ConcurrencyFlags.h:42