| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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 namespace Concurrency {
25
26 class ConcurrencyFlags {
27
28 friend class ::ThreadPoolSvc;
29 friend class ::ForwardSchedulerSvc;
30 friend class ::AvalancheSchedulerSvc;
31
32 public:
33
36 static GAUDI_API std::size_t numThreads() {return n_threads; }
37
40 static GAUDI_API std::size_t numConcurrentEvents() { return n_concEvts; }
41
44 static GAUDI_API std::size_t numProcs() { return n_procs; }
45
48 static GAUDI_API bool concurrent() {
49 return ( n_threads || n_concEvts || n_procs );
50 }
51
52 private:
53
54 static GAUDI_API void setNumThreads(const std::size_t& nT) {n_threads=nT;}
55 static GAUDI_API void setNumConcEvents(const std::size_t& nE) {n_concEvts=nE;}
56 static GAUDI_API void setNumProcs(const std::size_t& nP) {n_procs=nP;}
57
58 private:
59 static std::size_t n_threads; // worker threads for MT
60 static std::size_t n_concEvts; // concurrent events for MT
61 static std::size_t n_procs; // child processes for MP
62 };
63
64 }
65 }
66
67 #endif
Gaudi::Concurrency::ConcurrencyFlags::setNumThreads
static GAUDI_API void setNumThreads(const std::size_t &nT)
Definition: ConcurrencyFlags.h:54
Kernel.h
Gaudi::Concurrency::ConcurrencyFlags::n_threads
static std::size_t n_threads
Definition: ConcurrencyFlags.h:59
Gaudi::Concurrency::ConcurrencyFlags::numThreads
static GAUDI_API std::size_t numThreads()
number of Worker Threads (for MT)
Definition: ConcurrencyFlags.h:36
Gaudi::Concurrency::ConcurrencyFlags::setNumProcs
static GAUDI_API void setNumProcs(const std::size_t &nP)
Definition: ConcurrencyFlags.h:56
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:44
Gaudi::Concurrency::ConcurrencyFlags::concurrent
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
Definition: ConcurrencyFlags.h:48
AvalancheSchedulerSvc
Introduction
Definition: AvalancheSchedulerSvc.h:100
Gaudi::Concurrency::ConcurrencyFlags::n_concEvts
static std::size_t n_concEvts
Definition: ConcurrencyFlags.h:60
Gaudi::Concurrency::ConcurrencyFlags::n_procs
static std::size_t n_procs
Definition: ConcurrencyFlags.h:61
Gaudi::Concurrency::ConcurrencyFlags
Definition: ConcurrencyFlags.h:26
ThreadPoolSvc
A service which initializes a TBB thread pool.
Definition: ThreadPoolSvc.h:26
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
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:55
Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)
Definition: ConcurrencyFlags.h:40