The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
ConcurrencyFlags.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13#include <cstddef>
14
15#include <GaudiKernel/Kernel.h>
16
17class ThreadPoolSvc;
18class HiveWhiteBoard;
19class SGHiveMgrSvc;
20class AthMpEvtLoopMgr;
21class EvtStoreSvc;
22
32
33namespace SG {
34 class HiveMgrSvc;
35}
36
37namespace Gaudi {
38
39 namespace Concurrency {
40
42
43 friend class ::ThreadPoolSvc;
44 friend class ::HiveWhiteBoard;
45 friend class ::EvtStoreSvc;
46 friend class SG::HiveMgrSvc; // ATLAS
47 friend class ::AthMpEvtLoopMgr; // ATLAS
48
49 public:
52 static GAUDI_API std::size_t numThreads() { return n_threads; }
53
56 static GAUDI_API std::size_t numConcurrentEvents() { return n_concEvts; }
57
60 static GAUDI_API std::size_t numProcs() { return n_procs; }
61
64 static GAUDI_API bool concurrent() { return ( n_threads || n_concEvts || n_procs ); }
65
66 private:
67 static GAUDI_API void setNumThreads( const std::size_t& nT ) { n_threads = nT; }
68 static GAUDI_API void setNumConcEvents( const std::size_t& nE ) { n_concEvts = nE; }
69 static GAUDI_API void setNumProcs( const std::size_t& nP ) { n_procs = nP; }
70
71 private:
72 static std::size_t n_threads; // worker threads for MT
73 static std::size_t n_concEvts; // concurrent events for MT
74 static std::size_t n_procs; // child processes for MP
75 };
76 } // namespace Concurrency
77} // namespace Gaudi
#define GAUDI_API
Definition Kernel.h:49
Use a minimal event store implementation, and adds everything required to satisfy the IDataProviderSv...
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)
static GAUDI_API void setNumConcEvents(const std::size_t &nE)
static GAUDI_API void setNumThreads(const std::size_t &nT)
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
static GAUDI_API void setNumProcs(const std::size_t &nP)
static GAUDI_API std::size_t numThreads()
number of Worker Threads (for MT)
static GAUDI_API std::size_t numProcs()
number of forked child processes (for MP)
Data service base class.
A service which initializes a TBB thread pool.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1