Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
+62 -65
View File
@@ -23,21 +23,20 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// ----------------------------------------------------------------------
// G4TiMemory
//
// Description:
//
// Provides empty macros when Geant4 is compiled with TiMemory disabled
// ----------------------------------------------------------------------
#ifndef g4timemory_hh_
#define g4timemory_hh_
// Author: Jonathan R. Madsen, 25 April 2019
// --------------------------------------------------------------------
#ifndef g4timemory_hh
#define g4timemory_hh 1
// Fundamental definitions
#ifndef G4GMAKE
# include "G4GlobalConfig.hh"
# include "G4GlobalConfig.hh"
#endif
#include "globals.hh"
@@ -45,32 +44,30 @@
//----------------------------------------------------------------------------//
#ifdef GEANT4_USE_TIMEMORY
# include <timemory/timemory.hpp>
# include <timemory/timemory.hpp>
using G4AutoTimer = tim::auto_timer;
#else
# include <ostream>
# include <string>
# include <ostream>
# include <string>
namespace tim
{
template <typename... _Args>
void timemory_init(_Args...)
{
}
inline void timemory_finalize() {}
inline void print_env() {}
template <typename... _Args>
void timemory_init(_Args...)
{}
inline void timemory_finalize() {}
inline void print_env() {}
/// this provides "functionality" for *_HANDLE macros
/// and can be omitted if these macros are not utilized
struct dummy
{
/// this provides "functionality" for *_HANDLE macros
/// and can be omitted if these macros are not utilized
struct dummy
{
template <typename... _Args>
dummy(_Args&&...)
{
}
{}
~dummy() = default;
dummy(const dummy&) = default;
dummy(dummy&&) = default;
@@ -84,75 +81,76 @@ struct dummy
void report_at_exit(bool) {}
template <typename... _Args>
void mark_begin(_Args&&...)
{
}
{}
template <typename... _Args>
void mark_end(_Args&&...)
{}
friend std::ostream& operator<<(std::ostream& os, const dummy&)
{
return os;
}
friend std::ostream& operator<<(std::ostream& os, const dummy&) { return os; }
};
};
} // namespace tim
// startup/shutdown/configure
# define TIMEMORY_INIT(...)
# define TIMEMORY_FINALIZE()
# define TIMEMORY_CONFIGURE(...)
# define TIMEMORY_INIT(...)
# define TIMEMORY_FINALIZE()
# define TIMEMORY_CONFIGURE(...)
// label creation
# define TIMEMORY_BASIC_LABEL(...) std::string("")
# define TIMEMORY_LABEL(...) std::string("")
# define TIMEMORY_JOIN(...) std::string("")
# define TIMEMORY_BASIC_LABEL(...) std::string("")
# define TIMEMORY_LABEL(...) std::string("")
# define TIMEMORY_JOIN(...) std::string("")
// define an object
# define TIMEMORY_BLANK_MARKER(...)
# define TIMEMORY_BASIC_MARKER(...)
# define TIMEMORY_MARKER(...)
# define TIMEMORY_BLANK_MARKER(...)
# define TIMEMORY_BASIC_MARKER(...)
# define TIMEMORY_MARKER(...)
// define an unique pointer object
# define TIMEMORY_BLANK_POINTER(...)
# define TIMEMORY_BASIC_POINTER(...)
# define TIMEMORY_POINTER(...)
# define TIMEMORY_BLANK_POINTER(...)
# define TIMEMORY_BASIC_POINTER(...)
# define TIMEMORY_POINTER(...)
// define an object with a caliper reference
# define TIMEMORY_BLANK_CALIPER(...)
# define TIMEMORY_BASIC_CALIPER(...)
# define TIMEMORY_CALIPER(...)
# define TIMEMORY_BLANK_CALIPER(...)
# define TIMEMORY_BASIC_CALIPER(...)
# define TIMEMORY_CALIPER(...)
// define a static object with a caliper reference
# define TIMEMORY_STATIC_BLANK_CALIPER(...)
# define TIMEMORY_STATIC_BASIC_CALIPER(...)
# define TIMEMORY_STATIC_CALIPER(...)
# define TIMEMORY_STATIC_BLANK_CALIPER(...)
# define TIMEMORY_STATIC_BASIC_CALIPER(...)
# define TIMEMORY_STATIC_CALIPER(...)
// invoke member function on caliper reference or type within reference
# define TIMEMORY_CALIPER_APPLY(...)
# define TIMEMORY_CALIPER_TYPE_APPLY(...)
# define TIMEMORY_CALIPER_APPLY(...)
# define TIMEMORY_CALIPER_TYPE_APPLY(...)
// get an object
# define TIMEMORY_BLANK_HANDLE(...) tim::dummy()
# define TIMEMORY_BASIC_HANDLE(...) tim::dummy()
# define TIMEMORY_HANDLE(...) tim::dummy()
# define TIMEMORY_BLANK_HANDLE(...) tim::dummy()
# define TIMEMORY_BASIC_HANDLE(...) tim::dummy()
# define TIMEMORY_HANDLE(...) tim::dummy()
// get a pointer to an object
# define TIMEMORY_BLANK_POINTER_HANDLE(...) nullptr
# define TIMEMORY_BASIC_POINTER_HANDLE(...) nullptr
# define TIMEMORY_POINTER_HANDLE(...) nullptr
# define TIMEMORY_BLANK_POINTER_HANDLE(...) nullptr
# define TIMEMORY_BASIC_POINTER_HANDLE(...) nullptr
# define TIMEMORY_POINTER_HANDLE(...) nullptr
// debug only
# define TIMEMORY_DEBUG_BLANK_MARKER(...)
# define TIMEMORY_DEBUG_BASIC_MARKER(...)
# define TIMEMORY_DEBUG_MARKER(...)
# define TIMEMORY_DEBUG_BLANK_MARKER(...)
# define TIMEMORY_DEBUG_BASIC_MARKER(...)
# define TIMEMORY_DEBUG_MARKER(...)
// auto-timers
# define TIMEMORY_BLANK_AUTO_TIMER(...)
# define TIMEMORY_BASIC_AUTO_TIMER(...)
# define TIMEMORY_AUTO_TIMER(...)
# define TIMEMORY_BLANK_AUTO_TIMER_HANDLE(...)
# define TIMEMORY_BASIC_AUTO_TIMER_HANDLE(...)
# define TIMEMORY_AUTO_TIMER_HANDLE(...)
# define TIMEMORY_DEBUG_BASIC_AUTO_TIMER(...)
# define TIMEMORY_DEBUG_AUTO_TIMER(...)
# define TIMEMORY_BLANK_AUTO_TIMER(...)
# define TIMEMORY_BASIC_AUTO_TIMER(...)
# define TIMEMORY_AUTO_TIMER(...)
# define TIMEMORY_BLANK_AUTO_TIMER_HANDLE(...)
# define TIMEMORY_BASIC_AUTO_TIMER_HANDLE(...)
# define TIMEMORY_AUTO_TIMER_HANDLE(...)
# define TIMEMORY_DEBUG_BASIC_AUTO_TIMER(...)
# define TIMEMORY_DEBUG_AUTO_TIMER(...)
using G4AutoTimer = tim::dummy;
@@ -161,4 +159,3 @@ using G4AutoTimer = tim::dummy;
//----------------------------------------------------------------------------//
#endif