Geant4 10.7.0
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) std::this_thread::sleep_for(std::chrono::seconds(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) G4ConsumeParameters(cond, mutex); |
#define | G4CONDITIONWAITLAMBDA(cond, mutex, lambda) G4ConsumeParameters(cond, mutex, lambda); |
#define | G4CONDITIONNOTIFY(cond) G4ConsumeParameters(cond); |
#define | G4CONDITIONBROADCAST(cond) G4ConsumeParameters(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 = G4int(*)(G4Mutex *) |
using | thread_unlock = G4int(*)(G4Mutex *) |
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 (const unsigned int &_n=0) |
template<typename _Tp > | |
G4RecursiveMutex & | G4TypeRecursiveMutex (const unsigned int &_n=0) |
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 274 of file G4Threading.hh.
#define G4CONDITIONBROADCAST | ( | cond | ) | G4ConsumeParameters(cond); |
Definition at line 279 of file G4Threading.hh.
#define G4CONDITIONNOTIFY | ( | cond | ) | G4ConsumeParameters(cond); |
Definition at line 278 of file G4Threading.hh.
#define G4CONDITIONWAIT | ( | cond, | |
mutex | |||
) | G4ConsumeParameters(cond, mutex); |
Definition at line 275 of file G4Threading.hh.
#define G4CONDITIONWAITLAMBDA | ( | cond, | |
mutex, | |||
lambda | |||
) | G4ConsumeParameters(cond, mutex, lambda); |
Definition at line 276 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.
#define G4MUTEXINIT | ( | mutex | ) |
Definition at line 87 of file G4Threading.hh.
#define G4MUTEXLOCK | ( | mutex | ) |
Definition at line 251 of file G4Threading.hh.
#define G4MUTEXUNLOCK | ( | mutex | ) |
Definition at line 254 of file G4Threading.hh.
#define G4THREADJOIN | ( | worker | ) |
Definition at line 259 of file G4Threading.hh.
#define G4THREADSLEEP | ( | tick | ) | std::this_thread::sleep_for(std::chrono::seconds(tick)) |
Definition at line 50 of file G4Threading.hh.
using G4Condition = G4int |
Definition at line 273 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 248 of file G4Threading.hh.
Definition at line 263 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 247 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 286 of file G4Threading.hh.
using thread_lock = G4int (*)(G4Mutex*) |
Definition at line 112 of file G4Threading.hh.
using thread_unlock = G4int (*)(G4Mutex*) |
Definition at line 114 of file G4Threading.hh.
void G4THREADCREATE | ( | _Worker *& | worker, |
_Func | func, | ||
_Args... | args | ||
) |
Definition at line 268 of file G4Threading.hh.
G4Mutex & G4TypeMutex | ( | const unsigned int & | _n = 0 | ) |
Definition at line 124 of file G4Threading.hh.
Referenced by G4Cache< VALTYPE >::G4Cache(), and G4Cache< VALTYPE >::~G4Cache().
G4RecursiveMutex & G4TypeRecursiveMutex | ( | const unsigned int & | _n = 0 | ) |
Definition at line 146 of file G4Threading.hh.