Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -14,12 +14,18 @@ code and to keep track of all tags.
|
||||
* Please list in reverse chronological order (last date on top)
|
||||
---------------------------------------------------------------
|
||||
|
||||
09 February 2018 Ben Morgan (hadr-util-V10-03-06)
|
||||
17 May 2018 Jonathan Madsen (hadr-util-V10-04-02)
|
||||
-------------------------------------------------
|
||||
- updated "thread-local-static-var" model to
|
||||
"function-returning-thread-local-static-reference" model
|
||||
which fixes Windows DLL + MT
|
||||
|
||||
09 February 2018 Ben Morgan (hadr-util-V10-04-01)
|
||||
-------------------------------------------------
|
||||
- G4StableIsotopes - Move member function definitions to source file
|
||||
to avoid global data visibility issues in Windows DLLs.
|
||||
|
||||
19 December 2017 Gabriele Cosmo
|
||||
19 December 2017 Gabriele Cosmo (hadr-util-V10-04-00)
|
||||
--------------------------------------------------------
|
||||
- Fixed self-consistency in headers (missing #include) in DumpFrame,
|
||||
G4GHEKinematicsVector and G4ping.
|
||||
|
||||
@@ -45,9 +45,9 @@ class G4ReactionProduct;
|
||||
// To support better memory management and reduced fragmentation
|
||||
//
|
||||
#if defined G4HADRONIC_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator;
|
||||
extern G4DLLEXPORT G4Allocator<G4ReactionProduct>*& aRPAllocator();
|
||||
#else
|
||||
extern G4DLLIMPORT G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator;
|
||||
extern G4DLLIMPORT G4Allocator<G4ReactionProduct>*& aRPAllocator();
|
||||
#endif
|
||||
|
||||
class G4ReactionProduct
|
||||
@@ -80,8 +80,8 @@ class G4ReactionProduct
|
||||
|
||||
// Override new and delete for use with G4Allocator
|
||||
inline void* operator new(size_t) {
|
||||
if (!aRPAllocator) aRPAllocator = new G4Allocator<G4ReactionProduct> ;
|
||||
return (void *)aRPAllocator->MallocSingle();
|
||||
if (!aRPAllocator()) aRPAllocator() = new G4Allocator<G4ReactionProduct> ;
|
||||
return (void *)aRPAllocator()->MallocSingle();
|
||||
}
|
||||
#ifdef __IBMCPP__
|
||||
inline void* operator new(size_t, void *p) {
|
||||
@@ -89,7 +89,7 @@ class G4ReactionProduct
|
||||
}
|
||||
#endif
|
||||
inline void operator delete(void* aReactionProduct) {
|
||||
aRPAllocator->FreeSingle((G4ReactionProduct*)aReactionProduct);
|
||||
aRPAllocator()->FreeSingle((G4ReactionProduct*)aReactionProduct);
|
||||
}
|
||||
|
||||
G4ReactionProduct &operator= ( const G4ReactionProduct &right );
|
||||
|
||||
@@ -30,8 +30,11 @@
|
||||
|
||||
#include "G4ReactionProduct.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<G4ReactionProduct> *aRPAllocator = 0;
|
||||
|
||||
G4Allocator<G4ReactionProduct>*& aRPAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4ReactionProduct>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
G4ReactionProduct::G4ReactionProduct() :
|
||||
theParticleDefinition(NULL),
|
||||
|
||||
Reference in New Issue
Block a user