Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
|
#include "G4Types.hh"
#include "globals.hh"
#include <chrono>
#include <condition_variable>
#include <future>
#include <mutex>
#include <thread>
#include <vector>
Go to the source code of this file.
Classes | |
class | G4DummyThread |
Namespaces | |
namespace | G4ThisThread |
namespace | G4Threading |
Macros | |
#define | G4THREADSLEEP(tick) |
#define | G4MUTEX_INITIALIZER {} |
#define | G4MUTEXINIT(mutex) |
#define | G4MUTEXDESTROY(mutex) |
#define | G4MUTEXLOCK(mutex) |
#define | G4MUTEXUNLOCK(mutex) |
#define | G4THREADJOIN(worker) |
#define | G4CONDITION_INITIALIZER 1 |
#define | G4CONDITIONWAIT(cond, mutex) |
#define | G4CONDITIONWAITLAMBDA(cond, mutex, lambda) |
#define | G4CONDITIONNOTIFY(cond) |
#define | G4CONDITIONBROADCAST(cond) |
Typedefs | |
template<typename _Tp > | |
using | G4Future = std::future<_Tp> |
template<typename _Tp > | |
using | G4SharedFuture = std::shared_future<_Tp> |
template<typename _Tp > | |
using | G4Promise = std::promise<_Tp> |
using | G4Mutex = std::mutex |
using | G4RecursiveMutex = std::recursive_mutex |
using | G4ThreadFunReturnType = void* |
using | G4ThreadFunArgType = void* |
using | thread_lock |
using | thread_unlock |
using | G4Thread = G4DummyThread |
using | G4NativeThread = G4DummyThread::native_handle_type |
using | G4Pid_t = G4int |
using | G4Condition = G4int |
using | G4ThreadId = G4Thread::id |
Enumerations | |
enum | { G4Threading::SEQUENTIAL_ID = -2 , G4Threading::MASTER_ID = -1 , G4Threading::WORKER_ID = 0 , G4Threading::GENERICTHREAD_ID = -1000 } |
Functions | |
template<typename _Tp > | |
G4Mutex & | G4TypeMutex () |
template<typename _Tp > | |
G4RecursiveMutex & | G4TypeRecursiveMutex () |
template<typename _Worker , typename _Func , typename... _Args> | |
void | G4THREADCREATE (_Worker *&worker, _Func func, _Args... args) |
G4Pid_t | G4Threading::G4GetPidId () |
G4int | G4Threading::G4GetNumberOfCores () |
G4int | G4Threading::G4GetThreadId () |
G4bool | G4Threading::IsWorkerThread () |
G4bool | G4Threading::IsMasterThread () |
void | G4Threading::G4SetThreadId (G4int aNewValue) |
G4bool | G4Threading::G4SetPinAffinity (G4int idx, G4NativeThread &at) |
void | G4Threading::SetMultithreadedApplication (G4bool value) |
G4bool | G4Threading::IsMultithreadedApplication () |
G4int | G4Threading::WorkerThreadLeavesPool () |
G4int | G4Threading::WorkerThreadJoinsPool () |
G4int | G4Threading::GetNumberOfRunningWorkerThreads () |
#define G4CONDITION_INITIALIZER 1 |
Definition at line 258 of file G4Threading.hh.
#define G4CONDITIONBROADCAST | ( | cond | ) |
Definition at line 263 of file G4Threading.hh.
Referenced by G4MTBarrier::ReleaseBarrier(), and G4MTBarrier::ThisWorkerReady().
#define G4CONDITIONNOTIFY | ( | cond | ) |
Definition at line 262 of file G4Threading.hh.
#define G4CONDITIONWAIT | ( | cond, | |
mutex ) |
Definition at line 259 of file G4Threading.hh.
Referenced by G4MTBarrier::ThisWorkerReady(), and G4MTBarrier::Wait().
#define G4CONDITIONWAITLAMBDA | ( | cond, | |
mutex, | |||
lambda ) |
Definition at line 260 of file G4Threading.hh.
#define G4MUTEX_INITIALIZER {} |
Definition at line 85 of file G4Threading.hh.
#define G4MUTEXDESTROY | ( | mutex | ) |
Definition at line 90 of file G4Threading.hh.
Referenced by G4CollisionComposite::~G4CollisionComposite(), G4SingleParticleSource::~G4SingleParticleSource(), G4SPSAngDistribution::~G4SPSAngDistribution(), G4SPSEneDistribution::~G4SPSEneDistribution(), G4SPSPosDistribution::~G4SPSPosDistribution(), G4SPSRandomGenerator::~G4SPSRandomGenerator(), G4ThreadLocalSingleton< T >::~G4ThreadLocalSingleton(), and G4VDecayChannel::~G4VDecayChannel().
#define G4MUTEXINIT | ( | mutex | ) |
Definition at line 87 of file G4Threading.hh.
Referenced by G4CollisionComposite::G4CollisionComposite(), G4GeomSplitter< T >::G4GeomSplitter(), G4PDefManager::G4PDefManager(), G4SingleParticleSource::G4SingleParticleSource(), G4SPSAngDistribution::G4SPSAngDistribution(), G4SPSEneDistribution::G4SPSEneDistribution(), G4SPSPosDistribution::G4SPSPosDistribution(), G4SPSRandomGenerator::G4SPSRandomGenerator(), G4ThreadLocalSingleton< T >::G4ThreadLocalSingleton(), G4VDecayChannel::G4VDecayChannel(), G4VUPLSplitter< T >::G4VUPLSplitter(), and G4VDecayChannel::operator=().
#define G4MUTEXLOCK | ( | mutex | ) |
Definition at line 235 of file G4Threading.hh.
Referenced by G4BGGNucleonElasticXS::BuildPhysicsTable(), G4BGGNucleonInelasticXS::BuildPhysicsTable(), G4BGGPionElasticXS::BuildPhysicsTable(), G4BGGPionInelasticXS::BuildPhysicsTable(), G4ComponentBarNucleonNucleusXsc::BuildPhysicsTable(), G4UPiNuclearCrossSection::BuildPhysicsTable(), G4EmParameters::Dump(), G4OpticalParameters::Dump(), G4TransportationParameters::Dump(), G4ParticleTable::FindParticle(), G4ParticleTable::FindParticle(), G4ElasticHadrNucleusHE::G4ElasticHadrNucleusHE(), G4EmParameters::GetEmSaturation(), G4IonTable::GetIon(), G4IonTable::GetIon(), G4IonTable::GetMuonicAtom(), G4EnergyLossForExtrapolator::Initialisation(), G4ANuElNucleusCcModel::InitialiseModel(), G4ANuElNucleusNcModel::InitialiseModel(), G4ANuMuNucleusCcModel::InitialiseModel(), G4ANuMuNucleusNcModel::InitialiseModel(), G4ANuTauNucleusCcModel::InitialiseModel(), G4ANuTauNucleusNcModel::InitialiseModel(), G4NuElNucleusCcModel::InitialiseModel(), G4NuElNucleusNcModel::InitialiseModel(), G4NuMuNucleusCcModel::InitialiseModel(), G4NuMuNucleusNcModel::InitialiseModel(), G4NuTauNucleusCcModel::InitialiseModel(), G4NuTauNucleusNcModel::InitialiseModel(), G4VUserPhysicsList::InitializeProcessManager(), G4OpticalParameters::Instance(), G4TransportationParameters::Instance(), G4GeneralParticleSourceData::Lock(), G4VUserPhysicsList::RemoveProcessManager(), G4ParticleTable::SelectParticle(), and G4ParticleTable::WorkerG4ParticleTable().
#define G4MUTEXUNLOCK | ( | mutex | ) |
Definition at line 238 of file G4Threading.hh.
Referenced by G4BGGNucleonElasticXS::BuildPhysicsTable(), G4BGGNucleonInelasticXS::BuildPhysicsTable(), G4BGGPionElasticXS::BuildPhysicsTable(), G4BGGPionInelasticXS::BuildPhysicsTable(), G4ComponentBarNucleonNucleusXsc::BuildPhysicsTable(), G4UPiNuclearCrossSection::BuildPhysicsTable(), G4EmParameters::Dump(), G4OpticalParameters::Dump(), G4TransportationParameters::Dump(), G4ParticleTable::FindParticle(), G4ParticleTable::FindParticle(), G4ElasticHadrNucleusHE::G4ElasticHadrNucleusHE(), G4EmParameters::GetEmSaturation(), G4IonTable::GetIon(), G4IonTable::GetIon(), G4IonTable::GetMuonicAtom(), G4EnergyLossForExtrapolator::Initialisation(), G4ANuElNucleusCcModel::InitialiseModel(), G4ANuElNucleusNcModel::InitialiseModel(), G4ANuMuNucleusCcModel::InitialiseModel(), G4ANuMuNucleusNcModel::InitialiseModel(), G4ANuTauNucleusCcModel::InitialiseModel(), G4ANuTauNucleusNcModel::InitialiseModel(), G4NuElNucleusCcModel::InitialiseModel(), G4NuElNucleusNcModel::InitialiseModel(), G4NuMuNucleusCcModel::InitialiseModel(), G4NuMuNucleusNcModel::InitialiseModel(), G4NuTauNucleusCcModel::InitialiseModel(), G4NuTauNucleusNcModel::InitialiseModel(), G4VUserPhysicsList::InitializeProcessManager(), G4OpticalParameters::Instance(), G4TransportationParameters::Instance(), G4VUserPhysicsList::RemoveProcessManager(), G4ParticleTable::SelectParticle(), G4GeneralParticleSourceData::Unlock(), and G4ParticleTable::WorkerG4ParticleTable().
#define G4THREADJOIN | ( | worker | ) |
Definition at line 243 of file G4Threading.hh.
Referenced by G4UserTaskThreadInitialization::JoinWorker().
#define G4THREADSLEEP | ( | tick | ) |
Definition at line 50 of file G4Threading.hh.
using G4Condition = G4int |
Definition at line 257 of file G4Threading.hh.
using G4Future = std::future<_Tp> |
Definition at line 55 of file G4Threading.hh.
using G4Mutex = std::mutex |
Definition at line 81 of file G4Threading.hh.
Definition at line 232 of file G4Threading.hh.
Definition at line 247 of file G4Threading.hh.
using G4Promise = std::promise<_Tp> |
Definition at line 59 of file G4Threading.hh.
using G4RecursiveMutex = std::recursive_mutex |
Definition at line 82 of file G4Threading.hh.
using G4SharedFuture = std::shared_future<_Tp> |
Definition at line 57 of file G4Threading.hh.
using G4Thread = G4DummyThread |
Definition at line 231 of file G4Threading.hh.
using G4ThreadFunArgType = void* |
Definition at line 111 of file G4Threading.hh.
using G4ThreadFunReturnType = void* |
Definition at line 110 of file G4Threading.hh.
using G4ThreadId = G4Thread::id |
Definition at line 270 of file G4Threading.hh.
using thread_lock |
Definition at line 112 of file G4Threading.hh.
using thread_unlock |
Definition at line 114 of file G4Threading.hh.
void G4THREADCREATE | ( | _Worker *& | worker, |
_Func | func, | ||
_Args... | args ) |
Definition at line 252 of file G4Threading.hh.
G4Mutex & G4TypeMutex | ( | ) |
Definition at line 124 of file G4Threading.hh.
Referenced by G4Cache< VALTYPE >::G4Cache(), G4CrossSectionFactoryRegistry::GetFactory(), G4CrossSectionFactoryRegistry::Instance(), G4CrossSectionFactoryRegistry::Register(), and G4Cache< VALTYPE >::~G4Cache().
G4RecursiveMutex & G4TypeRecursiveMutex | ( | ) |
Definition at line 138 of file G4Threading.hh.