Geant4
10.02.p02
|
This is an implementation of G4THitsCollection<T> where the underlying type is G4atomic<T>, not just T. A static assert is provided to ensure that T is fundamental. This class should be used in lieu of G4THitsCollection<T> when memory is a concern. Atomics are thread-safe and generally faster that mutexes (as long as the STL implementation is lock-free) but the synchronization does not come without a cost. If performance is the primary concern, use G4THitsCollection<T> in thread-local instances. More...
#include <G4TAtomicHitsCollection.hh>
This is an implementation of G4THitsCollection<T> where the underlying type is G4atomic<T>, not just T. A static assert is provided to ensure that T is fundamental. This class should be used in lieu of G4THitsCollection<T> when memory is a concern. Atomics are thread-safe and generally faster that mutexes (as long as the STL implementation is lock-free) but the synchronization does not come without a cost. If performance is the primary concern, use G4THitsCollection<T> in thread-local instances.
Definition at line 86 of file G4TAtomicHitsCollection.hh.