Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
@@ -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 );