From 3988cd9b16c0adf1814dc56c5f5c451c6b888aaf Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Mon, 15 Jul 2024 14:36:14 -0700 Subject: [PATCH 01/29] use inline constexpr --- src/CMakeLists.txt | 4 ++-- src/celeritas_version.h.in | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bab78e4896..350ab74587 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,7 +53,7 @@ foreach(_var BUILD_TYPE HOSTNAME REAL_TYPE UNITS OPENMP CORE_GEO CORE_RNG) set(_var "CELERITAS_${_var}") string(TOLOWER "${_var}" _lower) string(APPEND CELERITAS_CMAKE_STRINGS - "static const char ${_lower}[] = \"${${_var}}\";\n" + "inline constexpr char ${_lower}[] = \"${${_var}}\";\n" ) endforeach() @@ -64,7 +64,7 @@ foreach(_var CLHEP_VERSION Geant4_VERSION VecGeom_VERSION) endif() set(_value "${${_var}}") string(APPEND CELERITAS_CMAKE_STRINGS - "static const char celeritas_${_lower}[] = \"${_value}\";\n" + "inline constexpr char celeritas_${_lower}[] = \"${_value}\";\n" ) endforeach() celeritas_configure_file("celeritas_cmake_strings.h.in" "celeritas_cmake_strings.h" @ONLY) diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index 329d1ad7fd..c415ee73c5 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -14,12 +14,12 @@ #define CELERITAS_VERSION @CELERITAS_VERSION@ //! Celeritas version string with git metadata -static const char celeritas_version[] = "@Celeritas_VERSION_STRING@"; +inline constexpr char celeritas_version[] = "@Celeritas_VERSION_STRING@"; //! Celeritas major version -static const int celeritas_version_major = @PROJECT_VERSION_MAJOR@; +inline constexpr int celeritas_version_major = @PROJECT_VERSION_MAJOR@; //! Celeritas minor version -static const int celeritas_version_minor = @PROJECT_VERSION_MINOR@; +inline constexpr int celeritas_version_minor = @PROJECT_VERSION_MINOR@; //! Celeritas patch version -static const int celeritas_version_patch = @PROJECT_VERSION_PATCH@; +inline constexpr int celeritas_version_patch = @PROJECT_VERSION_PATCH@; #endif /* celeritas_version_h */ From 81f6ede15b387491e4c56969fd2305f0d721e7fc Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Tue, 16 Jul 2024 12:08:09 -0700 Subject: [PATCH 02/29] refactor header extension to hh --- app/celer-g4/celer-g4.cc | 2 +- app/celer-geo/celer-geo.cc | 2 +- app/celer-sim/celer-sim.cc | 2 +- app/demo-geo-check/demo-geo-check.cc | 2 +- app/demo-interactor/demo-interactor.cc | 2 +- app/demo-interactor/host-demo-interactor.cc | 2 +- doc/CMakeLists.txt | 4 ++-- doc/main/api/corecel.rst | 4 ++-- interface/celeritas.i | 8 ++++---- src/CMakeLists.txt | 4 ++-- src/accel/detail/HitManager.cc | 2 +- src/accel/detail/SensDetInserter.cc | 3 ++- src/celeritas/ext/GeantVolumeMapper.cc | 3 ++- src/celeritas/user/SimpleCalo.cc | 3 ++- ...s_cmake_strings.h.in => celeritas_cmake_strings.hh.in} | 2 +- src/{celeritas_version.h.in => celeritas_version.hh.in} | 2 +- src/corecel/io/BuildOutput.cc | 4 ++-- src/corecel/sys/Version.cc | 3 ++- src/corecel/sys/Version.hh | 2 +- test/celeritas/GeantTestBase.cc | 3 ++- test/celeritas/ext/GeantImporter.test.cc | 2 +- test/celeritas/field/FieldPropagator.test.cc | 2 +- test/celeritas/user/Diagnostic.test.cc | 2 +- test/geocel/g4/GeantGeo.test.cc | 2 +- test/geocel/vg/Vecgeom.test.cc | 2 +- test/testdetail/TestMainImpl.cc | 2 +- 26 files changed, 38 insertions(+), 33 deletions(-) rename src/{celeritas_cmake_strings.h.in => celeritas_cmake_strings.hh.in} (94%) rename src/{celeritas_version.h.in => celeritas_version.hh.in} (97%) diff --git a/app/celer-g4/celer-g4.cc b/app/celer-g4/celer-g4.cc index 277f11f011..7d13ea4ff0 100644 --- a/app/celer-g4/celer-g4.cc +++ b/app/celer-g4/celer-g4.cc @@ -32,7 +32,6 @@ #include #include "celeritas_config.h" -#include "celeritas_version.h" #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/io/ExceptionOutput.hh" @@ -60,6 +59,7 @@ #include "GlobalSetup.hh" #include "LocalLogger.hh" #include "RunInputIO.json.hh" +#include "celeritas_version.hh" using namespace std::literals::string_view_literals; diff --git a/app/celer-geo/celer-geo.cc b/app/celer-geo/celer-geo.cc index 59b28bdf8d..c8f9e50420 100644 --- a/app/celer-geo/celer-geo.cc +++ b/app/celer-geo/celer-geo.cc @@ -14,7 +14,6 @@ #include #include "celeritas_config.h" -#include "celeritas_version.h" #include "corecel/io/ExceptionOutput.hh" #include "corecel/io/Logger.hh" #include "corecel/io/Repr.hh" @@ -31,6 +30,7 @@ #include "GeoInput.hh" #include "Runner.hh" +#include "celeritas_version.hh" using namespace std::literals::string_view_literals; using nlohmann::json; diff --git a/app/celer-sim/celer-sim.cc b/app/celer-sim/celer-sim.cc index 11f12149ff..f437520ada 100644 --- a/app/celer-sim/celer-sim.cc +++ b/app/celer-sim/celer-sim.cc @@ -23,7 +23,6 @@ #include #include "celeritas_config.h" -#include "celeritas_version.h" #include "corecel/device_runtime_api.h" #include "corecel/io/BuildOutput.hh" #include "corecel/io/ExceptionOutput.hh" @@ -45,6 +44,7 @@ #include "RunnerInput.hh" #include "RunnerInputIO.json.hh" #include "RunnerOutput.hh" +#include "celeritas_version.hh" using namespace std::literals::string_view_literals; diff --git a/app/demo-geo-check/demo-geo-check.cc b/app/demo-geo-check/demo-geo-check.cc index 3f23a635be..fb0841adcf 100644 --- a/app/demo-geo-check/demo-geo-check.cc +++ b/app/demo-geo-check/demo-geo-check.cc @@ -17,7 +17,6 @@ #include #include -#include "celeritas_cmake_strings.h" #include "corecel/Assert.hh" #include "corecel/Types.hh" #include "corecel/cont/ArrayIO.json.hh" @@ -30,6 +29,7 @@ #include "celeritas/geo/GeoFwd.hh" #include "GCheckRunner.hh" +#include "celeritas_cmake_strings.hh" namespace celeritas { diff --git a/app/demo-interactor/demo-interactor.cc b/app/demo-interactor/demo-interactor.cc index 409f18828e..57dc221407 100644 --- a/app/demo-interactor/demo-interactor.cc +++ b/app/demo-interactor/demo-interactor.cc @@ -14,7 +14,6 @@ #include #include -#include "celeritas_version.h" #include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/DeviceIO.json.hh" @@ -27,6 +26,7 @@ #include "KNDemoIO.hh" #include "KNDemoRunner.hh" #include "LoadXs.hh" +#include "celeritas_version.hh" namespace celeritas { diff --git a/app/demo-interactor/host-demo-interactor.cc b/app/demo-interactor/host-demo-interactor.cc index 9ea46dc02f..332d604704 100644 --- a/app/demo-interactor/host-demo-interactor.cc +++ b/app/demo-interactor/host-demo-interactor.cc @@ -15,7 +15,6 @@ #include #include -#include "celeritas_version.h" #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" @@ -34,6 +33,7 @@ #include "HostKNDemoRunner.hh" #include "KNDemoIO.hh" #include "LoadXs.hh" +#include "celeritas_version.hh" using std::cerr; using std::cout; diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index e9c3be7c62..9b35a41eb5 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -32,8 +32,8 @@ set(_DOXYGEN_EXTRA_SOURCE "${PROJECT_SOURCE_DIR}/README.md" "${PROJECT_SOURCE_DIR}/scripts/README.md" "${PROJECT_BINARY_DIR}/include/celeritas_config.h" - "${PROJECT_BINARY_DIR}/include/celeritas_cmake_strings.h" - "${PROJECT_BINARY_DIR}/include/celeritas_version.h" + "${PROJECT_BINARY_DIR}/include/celeritas_cmake_strings.hh" + "${PROJECT_BINARY_DIR}/include/celeritas_version.hh" ) if((CELERITAS_DEBUG AND CELERITAS_BUILD_TESTS) OR CELERITAS_DOXYGEN_BUILD_TESTS) diff --git a/doc/main/api/corecel.rst b/doc/main/api/corecel.rst index 4791c04baf..be208e66d9 100644 --- a/doc/main/api/corecel.rst +++ b/doc/main/api/corecel.rst @@ -15,9 +15,9 @@ Configuration The ``celeritas_config.h`` configure file contains all-caps definitions of the CMake configuration options as 0/1 defines so they can be used with ``if -constexpr`` and other C++ expressions. The ``celeritas_cmake_strings.h`` +constexpr`` and other C++ expressions. The ``celeritas_cmake_strings.hh`` defines static C strings with configuration options such as key dependent -library versions. Finally, ``celeritas_version.h`` defines version numbers as +library versions. Finally, ``celeritas_version.hh`` defines version numbers as a preprocessor definition, a set of integers, and a descriptive string. .. doxygendefine:: CELERITAS_VERSION diff --git a/interface/celeritas.i b/interface/celeritas.i index 229db82a00..9bf3caf5f6 100644 --- a/interface/celeritas.i +++ b/interface/celeritas.i @@ -19,14 +19,14 @@ // CONFIG FILE //---------------------------------------------------------------------------// %{ -#include "celeritas_version.h" +#include "celeritas_version.hh" #include "celeritas_config.h" -#include "celeritas_cmake_strings.h" +#include "celeritas_cmake_strings.hh" %} -%include "celeritas_version.h" +%include "celeritas_version.hh" %include "celeritas_config.h" -%include "celeritas_cmake_strings.h" +%include "celeritas_cmake_strings.hh" //---------------------------------------------------------------------------// // ASSERTIONS diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 350ab74587..14909902d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,7 @@ # Celeritas version celeritas_version_to_hex(CELERITAS_VERSION PROJECT_VERSION) -celeritas_configure_file("celeritas_version.h.in" "celeritas_version.h" @ONLY) +celeritas_configure_file("celeritas_version.hh.in" "celeritas_version.hh" @ONLY) #----------------------------------------------------------------------------# # Build configuration @@ -67,7 +67,7 @@ foreach(_var CLHEP_VERSION Geant4_VERSION VecGeom_VERSION) "inline constexpr char celeritas_${_lower}[] = \"${_value}\";\n" ) endforeach() -celeritas_configure_file("celeritas_cmake_strings.h.in" "celeritas_cmake_strings.h" @ONLY) +celeritas_configure_file("celeritas_cmake_strings.hh.in" "celeritas_cmake_strings.hh" @ONLY) # Save dependency versions to sys_config set(CELERITAS_DEPENDENCY_VERSIONS) diff --git a/src/accel/detail/HitManager.cc b/src/accel/detail/HitManager.cc index f3dad1be47..ff8dccb412 100644 --- a/src/accel/detail/HitManager.cc +++ b/src/accel/detail/HitManager.cc @@ -14,7 +14,6 @@ #include #include -#include "celeritas_cmake_strings.h" #include "corecel/cont/EnumArray.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Join.hh" @@ -26,6 +25,7 @@ #include "HitProcessor.hh" #include "SensDetInserter.hh" +#include "celeritas_cmake_strings.hh" #include "../SetupOptions.hh" namespace celeritas diff --git a/src/accel/detail/SensDetInserter.cc b/src/accel/detail/SensDetInserter.cc index f080149235..15e8f47be5 100644 --- a/src/accel/detail/SensDetInserter.cc +++ b/src/accel/detail/SensDetInserter.cc @@ -9,10 +9,11 @@ #include -#include "celeritas_cmake_strings.h" #include "corecel/io/Logger.hh" #include "geocel/GeantGeoUtils.hh" +#include "celeritas_cmake_strings.hh" + namespace celeritas { namespace detail diff --git a/src/celeritas/ext/GeantVolumeMapper.cc b/src/celeritas/ext/GeantVolumeMapper.cc index 55ae560ae4..3987ce99be 100644 --- a/src/celeritas/ext/GeantVolumeMapper.cc +++ b/src/celeritas/ext/GeantVolumeMapper.cc @@ -9,11 +9,12 @@ #include -#include "celeritas_cmake_strings.h" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" #include "geocel/GeantGeoUtils.hh" +#include "celeritas_cmake_strings.hh" + namespace celeritas { //---------------------------------------------------------------------------// diff --git a/src/celeritas/user/SimpleCalo.cc b/src/celeritas/user/SimpleCalo.cc index b4142cdde7..85100ae9bc 100644 --- a/src/celeritas/user/SimpleCalo.cc +++ b/src/celeritas/user/SimpleCalo.cc @@ -11,7 +11,6 @@ #include #include -#include "celeritas_cmake_strings.h" #include "celeritas_config.h" #include "corecel/data/CollectionAlgorithms.hh" #include "corecel/io/Join.hh" @@ -21,6 +20,8 @@ #include "corecel/io/Logger.hh" #include "geocel/GeoParamsInterface.hh" // IWYU pragma: keep +#include "celeritas_cmake_strings.hh" + #include "detail/SimpleCaloImpl.hh" namespace celeritas diff --git a/src/celeritas_cmake_strings.h.in b/src/celeritas_cmake_strings.hh.in similarity index 94% rename from src/celeritas_cmake_strings.h.in rename to src/celeritas_cmake_strings.hh.in index eaece437bd..7b0f5e665e 100644 --- a/src/celeritas_cmake_strings.h.in +++ b/src/celeritas_cmake_strings.hh.in @@ -3,7 +3,7 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_cmake_strings.h +/*! \file celeritas_cmake_strings.hh * Detailed CMake configuration information. *---------------------------------------------------------------------------*/ #ifndef celeritas_cmake_strings_h diff --git a/src/celeritas_version.h.in b/src/celeritas_version.hh.in similarity index 97% rename from src/celeritas_version.h.in rename to src/celeritas_version.hh.in index c415ee73c5..a66fa054cb 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.hh.in @@ -3,7 +3,7 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_version.h +/*! \file celeritas_version.hh * Version metadata for Celeritas. *---------------------------------------------------------------------------*/ #ifndef celeritas_version_h diff --git a/src/corecel/io/BuildOutput.cc b/src/corecel/io/BuildOutput.cc index 3f4d3b6a86..448b13d5a1 100644 --- a/src/corecel/io/BuildOutput.cc +++ b/src/corecel/io/BuildOutput.cc @@ -11,12 +11,12 @@ #include #include -#include "celeritas_cmake_strings.h" #include "celeritas_config.h" -#include "celeritas_version.h" #include "corecel/Macros.hh" #include "JsonPimpl.hh" +#include "celeritas_cmake_strings.hh" +#include "celeritas_version.hh" namespace celeritas { diff --git a/src/corecel/sys/Version.cc b/src/corecel/sys/Version.cc index 817e5df5e7..61e03cb891 100644 --- a/src/corecel/sys/Version.cc +++ b/src/corecel/sys/Version.cc @@ -11,10 +11,11 @@ #include #include -#include "celeritas_version.h" #include "corecel/Assert.hh" #include "corecel/io/Join.hh" +#include "celeritas_version.hh" + namespace celeritas { //---------------------------------------------------------------------------// diff --git a/src/corecel/sys/Version.hh b/src/corecel/sys/Version.hh index 76952dbe69..d44b8f6cb3 100644 --- a/src/corecel/sys/Version.hh +++ b/src/corecel/sys/Version.hh @@ -28,7 +28,7 @@ namespace celeritas * Simple version comparison. * * This is intended to be constructed with version numbers from \c - * celeritas_cmake_strings.h and used in unit tests. It can be used in `if + * celeritas_cmake_strings.hh and used in unit tests. It can be used in `if * constexpr` expressions with preprocessor macros. In the constructor * documentation, x/y/z correspond to major/minor/patch. * diff --git a/test/celeritas/GeantTestBase.cc b/test/celeritas/GeantTestBase.cc index 5bef4bc308..d8c3f97319 100644 --- a/test/celeritas/GeantTestBase.cc +++ b/test/celeritas/GeantTestBase.cc @@ -9,7 +9,6 @@ #include -#include "celeritas_cmake_strings.h" #include "celeritas_config.h" #include "corecel/io/Logger.hh" #include "geocel/ScopedGeantExceptionHandler.hh" @@ -23,6 +22,8 @@ #include "celeritas/io/ImportData.hh" #include "celeritas/track/TrackInitParams.hh" +#include "celeritas_cmake_strings.hh" + namespace celeritas { namespace test diff --git a/test/celeritas/ext/GeantImporter.test.cc b/test/celeritas/ext/GeantImporter.test.cc index 9c7718b47e..5fe5bd2ece 100644 --- a/test/celeritas/ext/GeantImporter.test.cc +++ b/test/celeritas/ext/GeantImporter.test.cc @@ -7,7 +7,6 @@ //---------------------------------------------------------------------------// #include "celeritas/ext/GeantImporter.hh" -#include "celeritas_cmake_strings.h" #include "celeritas_config.h" #include "corecel/ScopedLogStorer.hh" #include "corecel/io/Logger.hh" @@ -21,6 +20,7 @@ #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/PDGNumber.hh" +#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" #include "../GeantTestBase.hh" diff --git a/test/celeritas/field/FieldPropagator.test.cc b/test/celeritas/field/FieldPropagator.test.cc index e03b19641e..21ede11a0e 100644 --- a/test/celeritas/field/FieldPropagator.test.cc +++ b/test/celeritas/field/FieldPropagator.test.cc @@ -10,7 +10,6 @@ #include #include -#include "celeritas_cmake_strings.h" #include "corecel/ScopedLogStorer.hh" #include "corecel/cont/ArrayIO.hh" #include "corecel/io/Logger.hh" @@ -34,6 +33,7 @@ #include "CMSParameterizedField.hh" #include "DiagnosticStepper.hh" #include "FieldTestBase.hh" +#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" namespace celeritas diff --git a/test/celeritas/user/Diagnostic.test.cc b/test/celeritas/user/Diagnostic.test.cc index ea182b4ddf..417e6d01d6 100644 --- a/test/celeritas/user/Diagnostic.test.cc +++ b/test/celeritas/user/Diagnostic.test.cc @@ -5,7 +5,6 @@ //---------------------------------------------------------------------------// //! \file celeritas/user/Diagnostic.test.cc //---------------------------------------------------------------------------// -#include "celeritas_cmake_strings.h" #include "corecel/cont/Span.hh" #include "corecel/io/StringUtils.hh" #include "geocel/UnitUtils.hh" @@ -19,6 +18,7 @@ #include "celeritas/phys/Primary.hh" #include "DiagnosticTestBase.hh" +#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" #include "../SimpleTestBase.hh" #include "../TestEm3Base.hh" diff --git a/test/geocel/g4/GeantGeo.test.cc b/test/geocel/g4/GeantGeo.test.cc index 097d4abb27..40a9826ff7 100644 --- a/test/geocel/g4/GeantGeo.test.cc +++ b/test/geocel/g4/GeantGeo.test.cc @@ -8,7 +8,6 @@ #include #include -#include "celeritas_cmake_strings.h" #include "corecel/ScopedLogStorer.hh" #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" @@ -21,6 +20,7 @@ #include "geocel/g4/GeantGeoTrackView.hh" #include "GeantGeoTestBase.hh" +#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" namespace celeritas diff --git a/test/geocel/vg/Vecgeom.test.cc b/test/geocel/vg/Vecgeom.test.cc index 55155ab711..9c822589b8 100644 --- a/test/geocel/vg/Vecgeom.test.cc +++ b/test/geocel/vg/Vecgeom.test.cc @@ -9,7 +9,6 @@ #include -#include "celeritas_cmake_strings.h" #include "corecel/ScopedLogStorer.hh" #include "corecel/cont/ArrayIO.hh" #include "corecel/cont/Span.hh" @@ -26,6 +25,7 @@ #include "geocel/vg/VecgeomTrackView.hh" #include "VecgeomTestBase.hh" +#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" namespace celeritas diff --git a/test/testdetail/TestMainImpl.cc b/test/testdetail/TestMainImpl.cc index 9453fa98a2..fc896b0101 100644 --- a/test/testdetail/TestMainImpl.cc +++ b/test/testdetail/TestMainImpl.cc @@ -11,7 +11,6 @@ #include #include "celeritas_config.h" -#include "celeritas_version.h" #include "corecel/Macros.hh" #include "corecel/cont/Range.hh" #include "corecel/io/ColorUtils.hh" @@ -23,6 +22,7 @@ #include "corecel/sys/ScopedMpiInit.hh" #include "NonMasterResultPrinter.hh" +#include "celeritas_version.hh" using std::cout; using std::endl; From 16c661d5eff79b5012547e8145cd6cd7f6026716 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 12:30:47 -0700 Subject: [PATCH 03/29] update clang-format --- .clang-format | 6 +++--- ...itas_version.hh.in => celeritas_version.h.in} | 16 ++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) rename src/{celeritas_version.hh.in => celeritas_version.h.in} (65%) diff --git a/.clang-format b/.clang-format index 69ac376c14..328a976a53 100644 --- a/.clang-format +++ b/.clang-format @@ -8,7 +8,7 @@ AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: false AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: true +AllowShortBlocksOnASingleLine: Always AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false @@ -138,7 +138,7 @@ PenaltyReturnTypeOnItsOwnLine: 10 PointerAlignment: Left QualifierAlignment: Right ReflowComments: true -SortIncludes: true +SortIncludes: CaseInsensitive SortUsingDeclarations: true SpaceAfterCStyleCast: false SpaceAfterTemplateKeyword: false @@ -155,7 +155,7 @@ SpacesInContainerLiterals: false SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: c++17 StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION diff --git a/src/celeritas_version.hh.in b/src/celeritas_version.h.in similarity index 65% rename from src/celeritas_version.hh.in rename to src/celeritas_version.h.in index a66fa054cb..a9ee1a16c8 100644 --- a/src/celeritas_version.hh.in +++ b/src/celeritas_version.h.in @@ -12,14 +12,18 @@ /*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per * component: (major * 256 + minor) * 256 + patch. */ #define CELERITAS_VERSION @CELERITAS_VERSION@ - +#if __cplusplus >= 201703L +# include "corecel/Version.hh" +#else +# define CELER_INLINE_CONSTEXPR inline const +#endif //! Celeritas version string with git metadata -inline constexpr char celeritas_version[] = "@Celeritas_VERSION_STRING@"; +CELER_INLINE_CONSTEXPR char celeritas_version[] = "@Celeritas_VERSION_STRING@"; //! Celeritas major version -inline constexpr int celeritas_version_major = @PROJECT_VERSION_MAJOR@; +CELER_INLINE_CONSTEXPR int celeritas_version_major = @PROJECT_VERSION_MAJOR@; //! Celeritas minor version -inline constexpr int celeritas_version_minor = @PROJECT_VERSION_MINOR@; +CELER_INLINE_CONSTEXPR int celeritas_version_minor = @PROJECT_VERSION_MINOR@; //! Celeritas patch version -inline constexpr int celeritas_version_patch = @PROJECT_VERSION_PATCH@; - +CELER_INLINE_CONSTEXPR int celeritas_version_patch = @PROJECT_VERSION_PATCH@; +#undef CELER_INLINE_CONSTEXPR #endif /* celeritas_version_h */ From d946d70972b7a1bbdc9568a1cb39ffd04d9ae9ec Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 12:31:30 -0700 Subject: [PATCH 04/29] move version header to corecel, keep older header for compatibility --- app/celer-g4/celer-g4.cc | 8 +++---- app/celer-geo/celer-geo.cc | 2 +- app/celer-sim/celer-sim.cc | 2 +- app/demo-interactor/demo-interactor.cc | 2 +- app/demo-interactor/host-demo-interactor.cc | 8 +++---- doc/CMakeLists.txt | 3 ++- doc/main/api/corecel.rst | 4 +++- interface/celeritas.i | 4 ++-- src/CMakeLists.txt | 3 ++- src/celeritas_version.h.in | 22 ++++++++++---------- src/corecel/Version.hh.in | 23 +++++++++++++++++++++ src/corecel/io/BuildOutput.cc | 4 ++-- src/corecel/sys/Version.cc | 3 +-- test/testdetail/TestMainImpl.cc | 4 ++-- 14 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 src/corecel/Version.hh.in diff --git a/app/celer-g4/celer-g4.cc b/app/celer-g4/celer-g4.cc index 7d13ea4ff0..1bfc90fb61 100644 --- a/app/celer-g4/celer-g4.cc +++ b/app/celer-g4/celer-g4.cc @@ -33,25 +33,26 @@ #include "celeritas_config.h" #include "corecel/Assert.hh" -#include "corecel/Macros.hh" #include "corecel/io/ExceptionOutput.hh" #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeAndRedirect.hh" #include "corecel/io/ScopedTimeLog.hh" #include "corecel/io/StringUtils.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedMpiInit.hh" #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/TypeDemangler.hh" +#include "corecel/Version.hh" #include "geocel/GeantUtils.hh" #include "geocel/ScopedGeantExceptionHandler.hh" #include "geocel/ScopedGeantLogger.hh" -#include "celeritas/ext/GeantPhysicsOptions.hh" -#include "celeritas/ext/ScopedRootErrorHandler.hh" #include "celeritas/ext/detail/CelerEmPhysicsList.hh" #include "celeritas/ext/detail/CelerFTFPBert.hh" +#include "celeritas/ext/GeantPhysicsOptions.hh" +#include "celeritas/ext/ScopedRootErrorHandler.hh" #include "accel/SharedParams.hh" #include "ActionInitialization.hh" @@ -59,7 +60,6 @@ #include "GlobalSetup.hh" #include "LocalLogger.hh" #include "RunInputIO.json.hh" -#include "celeritas_version.hh" using namespace std::literals::string_view_literals; diff --git a/app/celer-geo/celer-geo.cc b/app/celer-geo/celer-geo.cc index c8f9e50420..2efd6298ed 100644 --- a/app/celer-geo/celer-geo.cc +++ b/app/celer-geo/celer-geo.cc @@ -25,12 +25,12 @@ #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMpiInit.hh" #include "corecel/sys/ScopedSignalHandler.hh" +#include "corecel/Version.hh" #include "geocel/rasterize/Image.hh" #include "geocel/rasterize/ImageIO.json.hh" #include "GeoInput.hh" #include "Runner.hh" -#include "celeritas_version.hh" using namespace std::literals::string_view_literals; using nlohmann::json; diff --git a/app/celer-sim/celer-sim.cc b/app/celer-sim/celer-sim.cc index f437520ada..e09861e4f5 100644 --- a/app/celer-sim/celer-sim.cc +++ b/app/celer-sim/celer-sim.cc @@ -38,13 +38,13 @@ #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/Stopwatch.hh" #include "corecel/sys/TracingSession.hh" +#include "corecel/Version.hh" #include "celeritas/Types.hh" #include "Runner.hh" #include "RunnerInput.hh" #include "RunnerInputIO.json.hh" #include "RunnerOutput.hh" -#include "celeritas_version.hh" using namespace std::literals::string_view_literals; diff --git a/app/demo-interactor/demo-interactor.cc b/app/demo-interactor/demo-interactor.cc index 57dc221407..18c98be3ee 100644 --- a/app/demo-interactor/demo-interactor.cc +++ b/app/demo-interactor/demo-interactor.cc @@ -21,12 +21,12 @@ #include "corecel/sys/KernelRegistryIO.json.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMpiInit.hh" +#include "corecel/Version.hh" #include "celeritas/phys/ParticleParams.hh" #include "KNDemoIO.hh" #include "KNDemoRunner.hh" #include "LoadXs.hh" -#include "celeritas_version.hh" namespace celeritas { diff --git a/app/demo-interactor/host-demo-interactor.cc b/app/demo-interactor/host-demo-interactor.cc index 332d604704..4b14359f73 100644 --- a/app/demo-interactor/host-demo-interactor.cc +++ b/app/demo-interactor/host-demo-interactor.cc @@ -23,17 +23,17 @@ #include "corecel/sys/KernelRegistryIO.json.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMpiInit.hh" -#include "celeritas/Quantities.hh" -#include "celeritas/Units.hh" -#include "celeritas/phys/PDGNumber.hh" +#include "corecel/Version.hh" #include "celeritas/phys/ParticleData.hh" #include "celeritas/phys/ParticleParams.hh" +#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/Quantities.hh" +#include "celeritas/Units.hh" #include "DetectorData.hh" #include "HostKNDemoRunner.hh" #include "KNDemoIO.hh" #include "LoadXs.hh" -#include "celeritas_version.hh" using std::cerr; using std::cout; diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 9b35a41eb5..ae5874da87 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -33,7 +33,8 @@ set(_DOXYGEN_EXTRA_SOURCE "${PROJECT_SOURCE_DIR}/scripts/README.md" "${PROJECT_BINARY_DIR}/include/celeritas_config.h" "${PROJECT_BINARY_DIR}/include/celeritas_cmake_strings.hh" - "${PROJECT_BINARY_DIR}/include/celeritas_version.hh" + "${PROJECT_BINARY_DIR}/include/celeritas_version.h" + "${PROJECT_BINARY_DIR}/include/corecel/Version.hh" ) if((CELERITAS_DEBUG AND CELERITAS_BUILD_TESTS) OR CELERITAS_DOXYGEN_BUILD_TESTS) diff --git a/doc/main/api/corecel.rst b/doc/main/api/corecel.rst index be208e66d9..d4f9fa6172 100644 --- a/doc/main/api/corecel.rst +++ b/doc/main/api/corecel.rst @@ -17,8 +17,10 @@ The ``celeritas_config.h`` configure file contains all-caps definitions of the CMake configuration options as 0/1 defines so they can be used with ``if constexpr`` and other C++ expressions. The ``celeritas_cmake_strings.hh`` defines static C strings with configuration options such as key dependent -library versions. Finally, ``celeritas_version.hh`` defines version numbers as +library versions. Finally, ``corecel/Version.hh`` defines version numbers as a preprocessor definition, a set of integers, and a descriptive string. +``celeritas_version.h`` is kept as an alias for backward-compatibility +and may be removed. .. doxygendefine:: CELERITAS_VERSION .. doxygenvariable:: celeritas_version diff --git a/interface/celeritas.i b/interface/celeritas.i index 9bf3caf5f6..e012152f35 100644 --- a/interface/celeritas.i +++ b/interface/celeritas.i @@ -19,12 +19,12 @@ // CONFIG FILE //---------------------------------------------------------------------------// %{ -#include "celeritas_version.hh" +#include "corecel/Version.hh" #include "celeritas_config.h" #include "celeritas_cmake_strings.hh" %} -%include "celeritas_version.hh" +%include "corecel/Version.hh" %include "celeritas_config.h" %include "celeritas_cmake_strings.hh" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 14909902d7..e42668b3eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,7 +10,8 @@ # Celeritas version celeritas_version_to_hex(CELERITAS_VERSION PROJECT_VERSION) -celeritas_configure_file("celeritas_version.hh.in" "celeritas_version.hh" @ONLY) +celeritas_configure_file("celeritas_version.h.in" "celeritas_version.h" @ONLY) +celeritas_configure_file("corecel/Version.hh.in" "corecel/Version.hh" @ONLY) #----------------------------------------------------------------------------# # Build configuration diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index a9ee1a16c8..8bf7f859c1 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -3,27 +3,27 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_version.hh +/*! \file celeritas_version.h * Version metadata for Celeritas. *---------------------------------------------------------------------------*/ #ifndef celeritas_version_h #define celeritas_version_h -/*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per - * component: (major * 256 + minor) * 256 + patch. */ -#define CELERITAS_VERSION @CELERITAS_VERSION@ #if __cplusplus >= 201703L +// uses inline variables introduced in c++17 # include "corecel/Version.hh" #else -# define CELER_INLINE_CONSTEXPR inline const -#endif +/*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per + * component: (major * 256 + minor) * 256 + patch. */ +#define CELERITAS_VERSION @CELERITAS_VERSION@ //! Celeritas version string with git metadata -CELER_INLINE_CONSTEXPR char celeritas_version[] = "@Celeritas_VERSION_STRING@"; +static const char celeritas_version[] = "@Celeritas_VERSION_STRING@"; //! Celeritas major version -CELER_INLINE_CONSTEXPR int celeritas_version_major = @PROJECT_VERSION_MAJOR@; +static const int celeritas_version_major = @PROJECT_VERSION_MAJOR@; //! Celeritas minor version -CELER_INLINE_CONSTEXPR int celeritas_version_minor = @PROJECT_VERSION_MINOR@; +static const int celeritas_version_minor = @PROJECT_VERSION_MINOR@; //! Celeritas patch version -CELER_INLINE_CONSTEXPR int celeritas_version_patch = @PROJECT_VERSION_PATCH@; -#undef CELER_INLINE_CONSTEXPR +static const int celeritas_version_patch = @PROJECT_VERSION_PATCH@; +#endif + #endif /* celeritas_version_h */ diff --git a/src/corecel/Version.hh.in b/src/corecel/Version.hh.in new file mode 100644 index 0000000000..14542e5fd4 --- /dev/null +++ b/src/corecel/Version.hh.in @@ -0,0 +1,23 @@ +//---------------------------------*-C++-*----------------------------------// +// Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. +// See the top-level COPYRIGHT file for details. +// SPDX-License-Identifier: (Apache-2.0 OR MIT) +//---------------------------------------------------------------------------// +/*! + * \file corecel/Version.hh + * \brief Celeritas version. + * + * Encoded as a big-endian hexidecimal with one byte per + * component: (major * 256 + minor) * 256 + patch. + */ +//---------------------------------------------------------------------------// +#pragma once + +//! Celeritas version string with git metadata +inline constexpr char celeritas_version[] = "@Celeritas_VERSION_STRING@"; +//! Celeritas major version +inline constexpr int celeritas_version_major = @PROJECT_VERSION_MAJOR@; +//! Celeritas minor version +inline constexpr int celeritas_version_minor = @PROJECT_VERSION_MINOR@; +//! Celeritas patch version +inline constexpr int celeritas_version_patch = @PROJECT_VERSION_PATCH@; diff --git a/src/corecel/io/BuildOutput.cc b/src/corecel/io/BuildOutput.cc index 448b13d5a1..5fd88e965a 100644 --- a/src/corecel/io/BuildOutput.cc +++ b/src/corecel/io/BuildOutput.cc @@ -13,10 +13,10 @@ #include "celeritas_config.h" #include "corecel/Macros.hh" +#include "corecel/Version.hh" -#include "JsonPimpl.hh" #include "celeritas_cmake_strings.hh" -#include "celeritas_version.hh" +#include "JsonPimpl.hh" namespace celeritas { diff --git a/src/corecel/sys/Version.cc b/src/corecel/sys/Version.cc index 61e03cb891..ba9fb5bc06 100644 --- a/src/corecel/sys/Version.cc +++ b/src/corecel/sys/Version.cc @@ -13,8 +13,7 @@ #include "corecel/Assert.hh" #include "corecel/io/Join.hh" - -#include "celeritas_version.hh" +#include "corecel/Version.hh" namespace celeritas { diff --git a/test/testdetail/TestMainImpl.cc b/test/testdetail/TestMainImpl.cc index fc896b0101..2717e5765f 100644 --- a/test/testdetail/TestMainImpl.cc +++ b/test/testdetail/TestMainImpl.cc @@ -11,18 +11,18 @@ #include #include "celeritas_config.h" -#include "corecel/Macros.hh" #include "corecel/cont/Range.hh" #include "corecel/io/ColorUtils.hh" #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/MpiOperations.hh" #include "corecel/sys/ScopedMpiInit.hh" +#include "corecel/Version.hh" #include "NonMasterResultPrinter.hh" -#include "celeritas_version.hh" using std::cout; using std::endl; From 6efb2a7996b419bf66907e83a96aa5e2c29af2e9 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 12:45:22 -0700 Subject: [PATCH 05/29] add missing macro --- src/corecel/Version.hh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corecel/Version.hh.in b/src/corecel/Version.hh.in index 14542e5fd4..fcdcd20178 100644 --- a/src/corecel/Version.hh.in +++ b/src/corecel/Version.hh.in @@ -13,6 +13,7 @@ //---------------------------------------------------------------------------// #pragma once +#define CELERITAS_VERSION @CELERITAS_VERSION@ //! Celeritas version string with git metadata inline constexpr char celeritas_version[] = "@Celeritas_VERSION_STRING@"; //! Celeritas major version From 07b4fd7ef7b6fc77743b725d6a0b3699ff105b8e Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 14:28:45 -0700 Subject: [PATCH 06/29] add warning message --- src/celeritas_version.h.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index 8bf7f859c1..b0102b4fad 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -10,6 +10,8 @@ #define celeritas_version_h #if __cplusplus >= 201703L +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/Version.hh\"" // uses inline variables introduced in c++17 # include "corecel/Version.hh" #else From d58d87ad2ca633d5fe6755eee80d6593bb79f363 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 16:11:17 -0700 Subject: [PATCH 07/29] create C++ version of config/version headers, keep old header for compatibility --- .clang-format | 22 ++++++---- doc/CMakeLists.txt | 4 +- doc/main/api/corecel.rst | 15 +++---- interface/celeritas.i | 8 ++-- scripts/dev/celeritas-gen.py | 2 +- src/CMakeLists.txt | 18 ++++++-- ...ngs.hh.in => celeritas_cmake_strings.h.in} | 14 +++++-- src/celeritas_config.h.in | 12 +++++- src/celeritas_sys_config.h.in | 11 ++++- src/celeritas_version.h.in | 5 ++- src/corecel/Config.hh.in | 42 +++++++++++++++++++ src/corecel/Version.hh.in | 8 ++-- src/corecel/sys/Config.hh.in | 15 +++++++ 13 files changed, 137 insertions(+), 39 deletions(-) rename src/{celeritas_cmake_strings.hh.in => celeritas_cmake_strings.h.in} (59%) create mode 100644 src/corecel/Config.hh.in create mode 100644 src/corecel/sys/Config.hh.in diff --git a/.clang-format b/.clang-format index 328a976a53..8e79b0b2b4 100644 --- a/.clang-format +++ b/.clang-format @@ -71,44 +71,48 @@ IncludeCategories: - Regex: '^<.+>$' Priority: 1 SortPriority: 2 +# Special group for config/version headers as they might be needed before other headers - Regex: '^"celeritas_[a-z_]+\.h"' Priority: 2 SortPriority: 3 + - Regex: '^"corecel/(sys/)?(Config|Version)\.hh"$' + Priority: 2 + SortPriority: 3 - Regex: '^"corecel/device_runtime_api\.h"$' Priority: 2 SortPriority: 3 - Regex: '^"corecel/' - Priority: 2 + Priority: 3 SortPriority: 5 CaseSensitive: true - Regex: '^"geocel/' - Priority: 2 + Priority: 3 SortPriority: 6 CaseSensitive: true - Regex: '^"orange/' - Priority: 2 + Priority: 3 SortPriority: 7 CaseSensitive: true - Regex: '^"celeritas/' - Priority: 2 + Priority: 3 SortPriority: 8 CaseSensitive: true - Regex: '^"accel/' - Priority: 2 + Priority: 3 SortPriority: 9 CaseSensitive: true - Regex: '^"[^/]+"' - Priority: 5 + Priority: 6 SortPriority: 11 - Regex: '^"detail/' - Priority: 6 + Priority: 7 SortPriority: 13 - Regex: '"(^gtest/|TestBase|\.test\.hh|celeritas_test\.hh)' - Priority: 7 + Priority: 8 CaseSensitive: true SortPriority: 14 - Regex: '.*' - Priority: 5 + Priority: 6 SortPriority: 12 # higher than detail, lower than no-slash IncludeIsMainRegex: '(\.[^.]+)?$' IncludeIsMainSourceRegex: '(\.cu|\.t\.hh)$' # Allow CU/template files as main diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index ae5874da87..f58840cc89 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -32,9 +32,11 @@ set(_DOXYGEN_EXTRA_SOURCE "${PROJECT_SOURCE_DIR}/README.md" "${PROJECT_SOURCE_DIR}/scripts/README.md" "${PROJECT_BINARY_DIR}/include/celeritas_config.h" - "${PROJECT_BINARY_DIR}/include/celeritas_cmake_strings.hh" + "${PROJECT_BINARY_DIR}/include/celeritas_cmake_strings.h" "${PROJECT_BINARY_DIR}/include/celeritas_version.h" "${PROJECT_BINARY_DIR}/include/corecel/Version.hh" + "${PROJECT_BINARY_DIR}/include/corecel/Config.hh" + "${PROJECT_BINARY_DIR}/include/corecel/sys/Config.hh" ) if((CELERITAS_DEBUG AND CELERITAS_BUILD_TESTS) OR CELERITAS_DOXYGEN_BUILD_TESTS) diff --git a/doc/main/api/corecel.rst b/doc/main/api/corecel.rst index d4f9fa6172..b11302f55a 100644 --- a/doc/main/api/corecel.rst +++ b/doc/main/api/corecel.rst @@ -13,14 +13,15 @@ primarily pertaining to GPU abstractions. Configuration ------------- -The ``celeritas_config.h`` configure file contains all-caps definitions of the +The ``corecel/Config.hh`` configure file contains all-caps definitions of the CMake configuration options as 0/1 defines so they can be used with ``if -constexpr`` and other C++ expressions. The ``celeritas_cmake_strings.hh`` -defines static C strings with configuration options such as key dependent -library versions. Finally, ``corecel/Version.hh`` defines version numbers as -a preprocessor definition, a set of integers, and a descriptive string. -``celeritas_version.h`` is kept as an alias for backward-compatibility -and may be removed. +constexpr`` and other C++ expressions. In addition, it defines static C strings +with configuration options such as key dependent library versions. +Finally, ``corecel/Version.hh`` defines version numbers as preprocessor definition, +a set of integers, and a descriptive string. ``celeritas_version.h``, +``celeritas_cmake_strings.h``, ``celeritas_sys_config.h`` and ``celeritas_config.h`` +are deprecated and kept as aliases for backward-compatibility. They may be removed +in an upcoming major version. .. doxygendefine:: CELERITAS_VERSION .. doxygenvariable:: celeritas_version diff --git a/interface/celeritas.i b/interface/celeritas.i index e012152f35..4a11d0e06a 100644 --- a/interface/celeritas.i +++ b/interface/celeritas.i @@ -20,13 +20,13 @@ //---------------------------------------------------------------------------// %{ #include "corecel/Version.hh" -#include "celeritas_config.h" -#include "celeritas_cmake_strings.hh" +#include "corecel/Config.hh" +#include "corecel/Config.hh" %} %include "corecel/Version.hh" -%include "celeritas_config.h" -%include "celeritas_cmake_strings.hh" +%include "corecel/Config.hh" +%include "corecel/Config.hh" //---------------------------------------------------------------------------// // ASSERTIONS diff --git a/scripts/dev/celeritas-gen.py b/scripts/dev/celeritas-gen.py index 6cbc3bfb42..de38679474 100755 --- a/scripts/dev/celeritas-gen.py +++ b/scripts/dev/celeritas-gen.py @@ -110,8 +110,8 @@ class {name}Test : public ::celeritas::test::Test TEST_HEADER_FILE = ''' #pragma once -#include "celeritas_config.h" #include "corecel/Assert.hh" +#include "corecel/Config.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e42668b3eb..d584898208 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -49,12 +49,17 @@ if(NOT DEFINED CELERITAS_HOSTNAME) endif() set(CELERITAS_CMAKE_STRINGS) +set(CELERITAS_CMAKE_STRINGS_COMPAT) set(CELERITAS_BUILD_TYPE ${CMAKE_BUILD_TYPE}) foreach(_var BUILD_TYPE HOSTNAME REAL_TYPE UNITS OPENMP CORE_GEO CORE_RNG) set(_var "CELERITAS_${_var}") string(TOLOWER "${_var}" _lower) + set(_var_def "char ${_lower}[] = \"${${_var}}\";\n") string(APPEND CELERITAS_CMAKE_STRINGS - "inline constexpr char ${_lower}[] = \"${${_var}}\";\n" + "inline constexpr ${_var_def}" + ) + string(APPEND CELERITAS_CMAKE_STRINGS_COMPAT + "static const ${_var_def}" ) endforeach() @@ -64,11 +69,15 @@ foreach(_var CLHEP_VERSION Geant4_VERSION VecGeom_VERSION) set(_var "${_var}_STRING") endif() set(_value "${${_var}}") + set(_var_def "char celeritas_${_lower}[] = \"${_value}\";\n") string(APPEND CELERITAS_CMAKE_STRINGS - "inline constexpr char celeritas_${_lower}[] = \"${_value}\";\n" + "inline constexpr ${_var_def}" + ) + string(APPEND CELERITAS_CMAKE_STRINGS_COMPAT + "static const ${_var_def}" ) endforeach() -celeritas_configure_file("celeritas_cmake_strings.hh.in" "celeritas_cmake_strings.hh" @ONLY) +celeritas_configure_file("celeritas_cmake_strings.h.in" "celeritas_cmake_strings.h" @ONLY) # Save dependency versions to sys_config set(CELERITAS_DEPENDENCY_VERSIONS) @@ -82,6 +91,9 @@ endforeach() string(JOIN "\n" CELERITAS_DEPENDENCY_VERSIONS ${CELERITAS_DEPENDENCY_VERSIONS}) celeritas_configure_file("celeritas_sys_config.h.in" "celeritas_sys_config.h" @ONLY) +celeritas_configure_file("corecel/Config.hh.in" "corecel/Config.hh" @ONLY) +celeritas_configure_file("corecel/sys/Config.hh.in" "corecel/sys/Config.hh" @ONLY) + #----------------------------------------------------------------------------# # LIBRARIES #----------------------------------------------------------------------------# diff --git a/src/celeritas_cmake_strings.hh.in b/src/celeritas_cmake_strings.h.in similarity index 59% rename from src/celeritas_cmake_strings.hh.in rename to src/celeritas_cmake_strings.h.in index 7b0f5e665e..694e04d007 100644 --- a/src/celeritas_cmake_strings.hh.in +++ b/src/celeritas_cmake_strings.h.in @@ -3,11 +3,19 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_cmake_strings.hh - * Detailed CMake configuration information. +/*! + * \file celeritas_cmake_strings.h + * \brief Detailed CMake configuration information. *---------------------------------------------------------------------------*/ #ifndef celeritas_cmake_strings_h #define celeritas_cmake_strings_h -@CELERITAS_CMAKE_STRINGS@ +#if __cplusplus >= 201703L +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/Config.hh\"" +// uses inline variables introduced in c++17 +# include "corecel/Config.hh" +#else +@CELERITAS_CMAKE_STRINGS_COMPAT@ +#endif #endif /* celeritas_cmake_strings_h */ diff --git a/src/celeritas_config.h.in b/src/celeritas_config.h.in index a6ccce1583..2c9b40b05e 100644 --- a/src/celeritas_config.h.in +++ b/src/celeritas_config.h.in @@ -3,8 +3,9 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_config.h - * Configuration-specific options for Celeritas. +/*! + * \file celeritas_config.h + * \brief Configuration-specific options for Celeritas. * * Note that the nonzero values for \c CELERITAS_CORE_RNG and \c * CELERITAS_CORE_GEO values *must not* be used directly: only compare between @@ -15,6 +16,12 @@ #ifndef celeritas_config_h #define celeritas_config_h +#if __cplusplus >= 201703L +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/Config.hh\"" +// uses inline variables introduced in c++17 +# include "corecel/Config.hh" +#else #cmakedefine01 CELERITAS_USE_CUDA #cmakedefine01 CELERITAS_USE_GEANT4 #cmakedefine01 CELERITAS_USE_HEPMC3 @@ -38,5 +45,6 @@ @CELERITAS_CORE_RNG_CONFIG@ #define CELERITAS_MAX_BLOCK_SIZE @CELERITAS_MAX_BLOCK_SIZE@ +#endif #endif /* celeritas_config_h */ diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index f2b71d96fe..a90f36fc1c 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -3,14 +3,21 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_sys_config.h - * System-specific configuration options for Celeritas. +/*! + * \file celeritas_sys_config.h + * \brief System-specific configuration options for Celeritas. *---------------------------------------------------------------------------*/ #ifndef celeritas_sys_config_h #define celeritas_sys_config_h +#ifdef __cplusplus +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/sys/Config.hh\"" +# include "corecel/sys/Config.hh" +#else #cmakedefine01 CELERITAS_HAVE_ROCTX @CELERITAS_DEPENDENCY_VERSIONS@ +#endif #endif /* celeritas_sys_config_h */ diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index b0102b4fad..8a6cfee827 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -3,8 +3,9 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! \file celeritas_version.h - * Version metadata for Celeritas. +/*! + * \file celeritas_version.h + * \brief Version metadata for Celeritas. *---------------------------------------------------------------------------*/ #ifndef celeritas_version_h #define celeritas_version_h diff --git a/src/corecel/Config.hh.in b/src/corecel/Config.hh.in new file mode 100644 index 0000000000..0f1d1aa458 --- /dev/null +++ b/src/corecel/Config.hh.in @@ -0,0 +1,42 @@ +//-----------------------------------*-C++-*---------------------------------// +// Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. +// See the top-level COPYRIGHT file for details. +// SPDX-License-Identifier: (Apache-2.0 OR MIT) +//---------------------------------------------------------------------------// +/*! \file corecel/Config.hh + * Configuration-specific options for Celeritas. + * + * Note that the nonzero values for \c CELERITAS_CORE_RNG and \c + * CELERITAS_CORE_GEO values *must not* be used directly: only compare between + * (e.g.) \c CELERITAS_CORE_RNG and \c CELERITAS_CORE_RNG_HIPRAND; options that + * are *invalid* (e.g. for missing libraries such as HIP) will have a value of + * zero. + */ +//---------------------------------------------------------------------------// +#pragma once + +@CELERITAS_CMAKE_STRINGS@ + +#cmakedefine01 CELERITAS_USE_CUDA +#cmakedefine01 CELERITAS_USE_GEANT4 +#cmakedefine01 CELERITAS_USE_HEPMC3 +#cmakedefine01 CELERITAS_USE_HIP +#cmakedefine01 CELERITAS_USE_MPI +#cmakedefine01 CELERITAS_USE_OPENMP +#cmakedefine01 CELERITAS_USE_ROOT +#cmakedefine01 CELERITAS_USE_VECGEOM +#cmakedefine01 CELERITAS_USE_PERFETTO + +#cmakedefine01 CELERITAS_DEBUG + +@CELERITAS_REAL_TYPE_CONFIG@ + +@CELERITAS_UNITS_CONFIG@ + +@CELERITAS_OPENMP_CONFIG@ + +@CELERITAS_CORE_GEO_CONFIG@ + +@CELERITAS_CORE_RNG_CONFIG@ + +#define CELERITAS_MAX_BLOCK_SIZE @CELERITAS_MAX_BLOCK_SIZE@ diff --git a/src/corecel/Version.hh.in b/src/corecel/Version.hh.in index fcdcd20178..4499a2473c 100644 --- a/src/corecel/Version.hh.in +++ b/src/corecel/Version.hh.in @@ -1,4 +1,4 @@ -//---------------------------------*-C++-*----------------------------------// +//-----------------------------------*-C++-*---------------------------------// // Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: (Apache-2.0 OR MIT) @@ -6,13 +6,11 @@ /*! * \file corecel/Version.hh * \brief Celeritas version. - * - * Encoded as a big-endian hexidecimal with one byte per - * component: (major * 256 + minor) * 256 + patch. */ //---------------------------------------------------------------------------// #pragma once - +/*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per + * component: (major * 256 + minor) * 256 + patch. */ #define CELERITAS_VERSION @CELERITAS_VERSION@ //! Celeritas version string with git metadata inline constexpr char celeritas_version[] = "@Celeritas_VERSION_STRING@"; diff --git a/src/corecel/sys/Config.hh.in b/src/corecel/sys/Config.hh.in new file mode 100644 index 0000000000..89a5b6b9b2 --- /dev/null +++ b/src/corecel/sys/Config.hh.in @@ -0,0 +1,15 @@ +//-----------------------------------*-C++-*---------------------------------// +// Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. +// See the top-level COPYRIGHT file for details. +// SPDX-License-Identifier: (Apache-2.0 OR MIT) +//---------------------------------------------------------------------------// +/*! + * \file corecel/sys/Config.hh + * \brief System-specific configuration options for Celeritas.. + */ +//---------------------------------------------------------------------------// +#pragma once + +#cmakedefine01 CELERITAS_HAVE_ROCTX + +@CELERITAS_DEPENDENCY_VERSIONS@ \ No newline at end of file From d33dba5df41e54537e02b9fd327664a9483f9639 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 16:12:03 -0700 Subject: [PATCH 08/29] use new version of headers --- app/celer-export-geant.cc | 3 ++- app/celer-g4/RootIO.hh | 3 ++- app/celer-g4/RunAction.cc | 5 +++-- app/celer-g4/celer-g4.cc | 5 +++-- app/celer-geo/Runner.cc | 3 ++- app/celer-geo/Types.hh | 3 ++- app/celer-geo/celer-geo.cc | 5 +++-- app/celer-sim/RootOutput.hh | 3 ++- app/celer-sim/RunnerInput.hh | 9 +++++---- app/celer-sim/RunnerInputIO.json.cc | 5 +++-- app/celer-sim/RunnerOutput.cc | 3 ++- app/celer-sim/celer-sim.cc | 5 +++-- app/demo-geo-check/GCheckKernel.hh | 3 ++- app/demo-geo-check/demo-geo-check.cc | 5 +++-- app/orange-update.cc | 3 ++- src/accel/ExceptionConverter.cc | 7 ++++--- src/accel/GeantSimpleCalo.cc | 5 +++-- src/accel/HepMC3PrimaryGenerator.hh | 3 ++- src/accel/LocalTransporter.cc | 9 +++++---- src/accel/SharedParams.cc | 7 ++++--- src/accel/detail/HitManager.cc | 5 +++-- src/accel/detail/SensDetInserter.cc | 4 ++-- src/celeritas/Types.hh | 2 +- src/celeritas/UnitTypes.hh | 3 ++- src/celeritas/Units.hh | 3 ++- src/celeritas/em/model/CoulombScatteringModel.cc | 7 ++++--- src/celeritas/em/model/LivermorePEModel.cc | 5 +++-- src/celeritas/em/model/SeltzerBergerModel.cc | 5 +++-- src/celeritas/ext/GeantImporter.cc | 11 ++++++----- src/celeritas/ext/GeantImporter.hh | 3 ++- src/celeritas/ext/GeantSetup.hh | 3 ++- src/celeritas/ext/GeantVolumeMapper.cc | 4 ++-- src/celeritas/ext/GeantVolumeMapper.hh | 3 ++- src/celeritas/ext/RootExporter.hh | 3 ++- src/celeritas/ext/RootFileManager.hh | 3 ++- src/celeritas/ext/RootImporter.hh | 3 ++- src/celeritas/ext/RootUniquePtr.hh | 3 ++- src/celeritas/ext/ScopedRootErrorHandler.hh | 3 ++- src/celeritas/field/RZMapFieldInput.hh | 3 ++- src/celeritas/geo/GeoData.hh | 2 +- src/celeritas/geo/GeoFwd.hh | 3 ++- src/celeritas/geo/GeoParams.hh | 2 +- src/celeritas/geo/GeoTrackView.hh | 2 +- src/celeritas/global/ActionLauncher.hh | 5 +++-- src/celeritas/global/ActionRegistryOutput.cc | 3 ++- src/celeritas/global/CoreParams.cc | 7 ++++--- .../global/detail/ActionLauncherKernel.device.hh | 5 +++-- src/celeritas/io/EventReader.hh | 3 ++- src/celeritas/io/EventWriter.hh | 3 ++- src/celeritas/mat/MaterialParamsOutput.cc | 3 ++- src/celeritas/phys/Interaction.hh | 5 +++-- src/celeritas/phys/ParticleParamsOutput.cc | 3 ++- src/celeritas/phys/PhysicsParamsOutput.cc | 3 ++- src/celeritas/phys/PhysicsTrackView.hh | 7 ++++--- src/celeritas/phys/detail/PreStepExecutor.hh | 7 ++++--- src/celeritas/random/CuHipRngData.hh | 7 ++++--- src/celeritas/random/RngData.hh | 2 +- src/celeritas/random/RngEngine.hh | 2 +- src/celeritas/random/RngParams.hh | 2 +- src/celeritas/random/RngParamsFwd.hh | 2 +- src/celeritas/user/ActionDiagnostic.cc | 3 ++- src/celeritas/user/RootStepWriter.hh | 3 ++- src/celeritas/user/SimpleCalo.cc | 5 ++--- src/celeritas/user/StepDiagnostic.cc | 3 ++- src/celeritas/user/detail/SimpleCaloImpl.cc | 5 +++-- src/corecel/Assert.hh | 2 +- src/corecel/Macros.hh | 2 +- src/corecel/Types.hh | 2 +- src/corecel/data/CollectionBuilder.hh | 3 ++- src/corecel/device_runtime_api.h | 2 +- src/corecel/io/BuildOutput.cc | 6 +++--- src/corecel/io/ExceptionOutput.cc | 3 ++- src/corecel/io/JsonPimpl.hh | 3 ++- src/corecel/io/OutputInterface.cc | 2 +- src/corecel/io/OutputInterfaceAdapter.hh | 3 ++- src/corecel/io/OutputRegistry.cc | 3 ++- src/corecel/math/Algorithms.hh | 3 ++- src/corecel/sys/Counter.hh | 3 ++- src/corecel/sys/Device.cc | 3 ++- src/corecel/sys/DeviceIO.json.cc | 2 +- src/corecel/sys/KernelAttributes.hh | 3 ++- src/corecel/sys/KernelRegistry.cc | 2 +- src/corecel/sys/KernelRegistryIO.json.cc | 3 ++- src/corecel/sys/MpiOperations.hh | 2 +- src/corecel/sys/ScopedMpiInit.cc | 2 +- src/corecel/sys/ScopedProfiling.cc | 7 ++++--- src/corecel/sys/ScopedProfiling.hh | 5 +++-- src/corecel/sys/ScopedProfiling.hip.cc | 3 ++- src/corecel/sys/Thrust.device.hh | 3 ++- src/corecel/sys/TracingSession.hh | 3 ++- src/corecel/sys/detail/MpiCommunicatorImpl.hh | 2 +- src/corecel/sys/detail/MpiType.hh | 2 +- src/geocel/GeantGeoUtils.hh | 5 +++-- src/geocel/GeantUtils.hh | 3 ++- src/geocel/GeoParamsOutput.cc | 3 ++- src/geocel/ScopedGeantExceptionHandler.hh | 3 ++- src/geocel/ScopedGeantLogger.hh | 3 ++- src/geocel/detail/LengthUnits.hh | 3 ++- src/geocel/g4/GeantGeoParams.cc | 3 ++- src/geocel/g4/GeantGeoTraits.hh | 3 ++- src/geocel/g4vg/Converter.hh | 3 ++- src/geocel/rasterize/RaytraceImager.cuda.t.hh | 3 ++- src/geocel/rasterize/RaytraceImager.nocuda.t.hh | 3 ++- src/geocel/vg/VecgeomGeoTraits.hh | 3 ++- src/geocel/vg/VecgeomParams.cc | 2 +- src/geocel/vg/VecgeomParamsOutput.cc | 3 ++- src/orange/OrangeParams.cc | 5 +++-- src/orange/OrangeParamsOutput.cc | 3 ++- src/orange/g4org/Converter.hh | 3 ++- src/orange/orangeinp/ObjectInterface.hh | 3 ++- src/orange/orangeinp/ProtoInterface.cc | 3 ++- src/orange/orangeinp/UnitProto.cc | 3 ++- test/Test.hh | 2 +- test/TestMacros.hh | 2 +- test/accel/SDTestBase.cc | 3 ++- test/accel/detail/HitManager.test.cc | 7 ++++--- test/celeritas/AllGeoTypedTestBase.hh | 3 ++- test/celeritas/Constants.test.cc | 3 ++- test/celeritas/CoreGeoTestBase.hh | 2 +- test/celeritas/GeantTestBase.cc | 5 ++--- test/celeritas/GlobalGeoTestBase.cc | 3 ++- test/celeritas/GlobalTestBase.cc | 3 ++- test/celeritas/InvalidOrangeTestBase.hh | 2 +- test/celeritas/ext/GeantImporter.test.cc | 8 ++++---- test/celeritas/ext/GeantVolumeMapper.test.cc | 3 ++- test/celeritas/field/FieldPropagator.test.cc | 11 ++++++----- test/celeritas/field/Steppers.test.cc | 11 ++++++----- test/celeritas/geo/Geometry.test.cc | 5 +++-- test/celeritas/global/AlongStep.test.cc | 13 +++++++------ test/celeritas/io/EventIO.test.cc | 5 +++-- test/celeritas/phys/Particle.test.cc | 5 +++-- test/celeritas/random/RngEngine.test.cc | 9 +++++---- test/celeritas/user/Diagnostic.test.cc | 9 +++++---- test/celeritas_test.hh | 2 +- test/corecel/cont/Range.test.hh | 3 ++- test/corecel/math/Integrator.test.cc | 2 +- test/corecel/math/Quantity.test.cc | 3 ++- test/corecel/sys/Environment.test.cc | 3 ++- test/geocel/BoundingBox.test.cc | 3 ++- test/geocel/GenericGeoTestBase.cc | 2 +- test/geocel/LazyGeoManager.cc | 3 ++- test/geocel/UnitUtils.hh | 5 +++-- test/geocel/g4/GeantGeo.test.cc | 13 +++++++------ test/geocel/vg/Vecgeom.test.cc | 9 +++++---- test/orange/Orange.test.cc | 5 +++-- test/orange/OrangeGeant.test.cc | 5 +++-- test/orange/OrangeGeoTestBase.cc | 7 ++++--- test/orange/orangeinp/CsgTestUtils.cc | 3 ++- test/orange/surf/ConeAligned.test.cc | 5 +++-- test/orange/univ/RectArrayTracker.test.cc | 7 ++++--- test/orange/univ/SimpleUnitTracker.test.cc | 7 ++++--- test/orange/univ/VolumeView.test.cc | 3 ++- test/testdetail/JsonComparer.hh | 3 ++- test/testdetail/TestMacrosImpl.cc | 3 ++- test/testdetail/TestMacrosImpl.hh | 5 +++-- test/testdetail/TestMainImpl.cc | 5 +++-- 156 files changed, 375 insertions(+), 254 deletions(-) diff --git a/app/celer-export-geant.cc b/app/celer-export-geant.cc index b0273f9189..e74700052c 100644 --- a/app/celer-export-geant.cc +++ b/app/celer-export-geant.cc @@ -15,7 +15,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" #include "corecel/sys/MpiCommunicator.hh" diff --git a/app/celer-g4/RootIO.hh b/app/celer-g4/RootIO.hh index 800b38b88d..f8a1b1b436 100644 --- a/app/celer-g4/RootIO.hh +++ b/app/celer-g4/RootIO.hh @@ -13,7 +13,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "celeritas/io/EventData.hh" diff --git a/app/celer-g4/RunAction.cc b/app/celer-g4/RunAction.cc index 2afbf0c3b1..20e636ba96 100644 --- a/app/celer-g4/RunAction.cc +++ b/app/celer-g4/RunAction.cc @@ -15,10 +15,11 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "celeritas/ext/GeantSetup.hh" #include "accel/ExceptionConverter.hh" diff --git a/app/celer-g4/celer-g4.cc b/app/celer-g4/celer-g4.cc index 1bfc90fb61..edb1433959 100644 --- a/app/celer-g4/celer-g4.cc +++ b/app/celer-g4/celer-g4.cc @@ -31,7 +31,9 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" +#include "corecel/Version.hh" + #include "corecel/Assert.hh" #include "corecel/io/ExceptionOutput.hh" #include "corecel/io/Logger.hh" @@ -45,7 +47,6 @@ #include "corecel/sys/ScopedMpiInit.hh" #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/TypeDemangler.hh" -#include "corecel/Version.hh" #include "geocel/GeantUtils.hh" #include "geocel/ScopedGeantExceptionHandler.hh" #include "geocel/ScopedGeantLogger.hh" diff --git a/app/celer-geo/Runner.cc b/app/celer-geo/Runner.cc index f1c56157e8..77874480c2 100644 --- a/app/celer-geo/Runner.cc +++ b/app/celer-geo/Runner.cc @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "Runner.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/StringUtils.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Stopwatch.hh" diff --git a/app/celer-geo/Types.hh b/app/celer-geo/Types.hh index f8cf258ced..238710cc85 100644 --- a/app/celer-geo/Types.hh +++ b/app/celer-geo/Types.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Types.hh" #include "geocel/g4/GeantGeoTraits.hh" #include "geocel/vg/VecgeomGeoTraits.hh" diff --git a/app/celer-geo/celer-geo.cc b/app/celer-geo/celer-geo.cc index 2efd6298ed..28b6f910fd 100644 --- a/app/celer-geo/celer-geo.cc +++ b/app/celer-geo/celer-geo.cc @@ -13,7 +13,9 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" +#include "corecel/Version.hh" + #include "corecel/io/ExceptionOutput.hh" #include "corecel/io/Logger.hh" #include "corecel/io/Repr.hh" @@ -25,7 +27,6 @@ #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMpiInit.hh" #include "corecel/sys/ScopedSignalHandler.hh" -#include "corecel/Version.hh" #include "geocel/rasterize/Image.hh" #include "geocel/rasterize/ImageIO.json.hh" diff --git a/app/celer-sim/RootOutput.hh b/app/celer-sim/RootOutput.hh index 407fca0dc4..af8b62f2d6 100644 --- a/app/celer-sim/RootOutput.hh +++ b/app/celer-sim/RootOutput.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" namespace celeritas diff --git a/app/celer-sim/RunnerInput.hh b/app/celer-sim/RunnerInput.hh index d595f16d3a..fd5dda668b 100644 --- a/app/celer-sim/RunnerInput.hh +++ b/app/celer-sim/RunnerInput.hh @@ -7,17 +7,18 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" -#include "corecel/Macros.hh" -#include "corecel/Types.hh" +#include "corecel/Config.hh" + #include "corecel/io/Label.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Environment.hh" -#include "celeritas/Types.hh" +#include "corecel/Types.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/ext/GeantSetup.hh" #include "celeritas/ext/RootFileManager.hh" #include "celeritas/field/FieldDriverOptions.hh" #include "celeritas/phys/PrimaryGeneratorOptions.hh" +#include "celeritas/Types.hh" #include "celeritas/user/RootStepWriter.hh" #ifdef _WIN32 diff --git a/app/celer-sim/RunnerInputIO.json.cc b/app/celer-sim/RunnerInputIO.json.cc index f13777124d..4dcefa4ae5 100644 --- a/app/celer-sim/RunnerInputIO.json.cc +++ b/app/celer-sim/RunnerInputIO.json.cc @@ -9,17 +9,18 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/ArrayIO.json.hh" #include "corecel/io/JsonUtils.json.hh" #include "corecel/io/LabelIO.json.hh" #include "corecel/io/StringEnumMapper.hh" #include "corecel/io/StringUtils.hh" #include "corecel/sys/EnvironmentIO.json.hh" -#include "celeritas/Types.hh" #include "celeritas/ext/GeantPhysicsOptionsIO.json.hh" #include "celeritas/field/FieldDriverOptionsIO.json.hh" #include "celeritas/phys/PrimaryGeneratorOptionsIO.json.hh" +#include "celeritas/Types.hh" #include "celeritas/user/RootStepWriterIO.json.hh" namespace celeritas diff --git a/app/celer-sim/RunnerOutput.cc b/app/celer-sim/RunnerOutput.cc index b0e530d540..da7b569201 100644 --- a/app/celer-sim/RunnerOutput.cc +++ b/app/celer-sim/RunnerOutput.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/app/celer-sim/celer-sim.cc b/app/celer-sim/celer-sim.cc index e09861e4f5..f4a1fdcc34 100644 --- a/app/celer-sim/celer-sim.cc +++ b/app/celer-sim/celer-sim.cc @@ -22,8 +22,10 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "corecel/device_runtime_api.h" +#include "corecel/Version.hh" + #include "corecel/io/BuildOutput.hh" #include "corecel/io/ExceptionOutput.hh" #include "corecel/io/Logger.hh" @@ -38,7 +40,6 @@ #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/Stopwatch.hh" #include "corecel/sys/TracingSession.hh" -#include "corecel/Version.hh" #include "celeritas/Types.hh" #include "Runner.hh" diff --git a/app/demo-geo-check/GCheckKernel.hh b/app/demo-geo-check/GCheckKernel.hh index df80b19f4f..a811eacdff 100644 --- a/app/demo-geo-check/GCheckKernel.hh +++ b/app/demo-geo-check/GCheckKernel.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" diff --git a/app/demo-geo-check/demo-geo-check.cc b/app/demo-geo-check/demo-geo-check.cc index fb0841adcf..fc612610a4 100644 --- a/app/demo-geo-check/demo-geo-check.cc +++ b/app/demo-geo-check/demo-geo-check.cc @@ -17,19 +17,20 @@ #include #include +#include "corecel/Config.hh" + #include "corecel/Assert.hh" -#include "corecel/Types.hh" #include "corecel/cont/ArrayIO.json.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Label.hh" #include "corecel/io/Logger.hh" #include "corecel/math/ArrayUtils.hh" #include "corecel/sys/Device.hh" +#include "corecel/Types.hh" #include "geocel/Types.hh" #include "celeritas/geo/GeoFwd.hh" #include "GCheckRunner.hh" -#include "celeritas_cmake_strings.hh" namespace celeritas { diff --git a/app/orange-update.cc b/app/orange-update.cc index 85047dd92a..ebd3d91952 100644 --- a/app/orange-update.cc +++ b/app/orange-update.cc @@ -13,7 +13,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" #include "corecel/sys/MpiCommunicator.hh" diff --git a/src/accel/ExceptionConverter.cc b/src/accel/ExceptionConverter.cc index 34a6c69384..a849b99580 100644 --- a/src/accel/ExceptionConverter.cc +++ b/src/accel/ExceptionConverter.cc @@ -13,13 +13,14 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" -#include "corecel/OpaqueIdIO.hh" #include "corecel/cont/ArrayIO.hh" #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "corecel/math/QuantityIO.hh" +#include "corecel/OpaqueIdIO.hh" #include "corecel/sys/Environment.hh" #include "celeritas/geo/GeoMaterialParams.hh" #include "celeritas/geo/GeoParams.hh" diff --git a/src/accel/GeantSimpleCalo.cc b/src/accel/GeantSimpleCalo.cc index 7843aba30b..792e96d67b 100644 --- a/src/accel/GeantSimpleCalo.cc +++ b/src/accel/GeantSimpleCalo.cc @@ -9,14 +9,15 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" #include "corecel/io/LabelIO.json.hh" #include "corecel/io/Logger.hh" +#include "geocel/g4/GeantGeoParams.hh" #include "geocel/GeantGeoUtils.hh" #include "geocel/GeantUtils.hh" -#include "geocel/g4/GeantGeoParams.hh" #include "SharedParams.hh" diff --git a/src/accel/HepMC3PrimaryGenerator.hh b/src/accel/HepMC3PrimaryGenerator.hh index 338173efb5..cd20f23d61 100644 --- a/src/accel/HepMC3PrimaryGenerator.hh +++ b/src/accel/HepMC3PrimaryGenerator.hh @@ -13,7 +13,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/accel/LocalTransporter.cc b/src/accel/LocalTransporter.cc index 0a06be7016..581485a525 100644 --- a/src/accel/LocalTransporter.cc +++ b/src/accel/LocalTransporter.cc @@ -21,21 +21,22 @@ # include #endif -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/ScopedSignalHandler.hh" -#include "geocel/GeantUtils.hh" #include "geocel/g4/Convert.geant.hh" -#include "celeritas/Quantities.hh" +#include "geocel/GeantUtils.hh" #include "celeritas/ext/GeantUnits.hh" #include "celeritas/global/detail/ActionSequence.hh" #include "celeritas/io/EventWriter.hh" #include "celeritas/io/RootEventWriter.hh" -#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep +#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/Quantities.hh" #include "SetupOptions.hh" #include "SharedParams.hh" diff --git a/src/accel/SharedParams.cc b/src/accel/SharedParams.cc index fbcf2ee440..78ac646ac9 100644 --- a/src/accel/SharedParams.cc +++ b/src/accel/SharedParams.cc @@ -22,7 +22,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" #include "corecel/io/OutputRegistry.hh" @@ -33,9 +34,8 @@ #include "corecel/sys/KernelRegistry.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" -#include "geocel/GeantUtils.hh" #include "geocel/g4/GeantGeoParams.hh" -#include "celeritas/Types.hh" +#include "geocel/GeantUtils.hh" #include "celeritas/em/params/WentzelOKVIParams.hh" #include "celeritas/ext/GeantImporter.hh" #include "celeritas/ext/RootExporter.hh" @@ -55,6 +55,7 @@ #include "celeritas/random/RngParams.hh" #include "celeritas/track/SimParams.hh" #include "celeritas/track/TrackInitParams.hh" +#include "celeritas/Types.hh" #include "celeritas/user/StepCollector.hh" #include "AlongStepFactory.hh" diff --git a/src/accel/detail/HitManager.cc b/src/accel/detail/HitManager.cc index ff8dccb412..9542540cf5 100644 --- a/src/accel/detail/HitManager.cc +++ b/src/accel/detail/HitManager.cc @@ -14,18 +14,19 @@ #include #include +#include "corecel/Config.hh" + #include "corecel/cont/EnumArray.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" -#include "celeritas/Types.hh" #include "celeritas/ext/GeantSetup.hh" #include "celeritas/geo/GeoParams.hh" // IWYU pragma: keep #include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep +#include "celeritas/Types.hh" #include "HitProcessor.hh" #include "SensDetInserter.hh" -#include "celeritas_cmake_strings.hh" #include "../SetupOptions.hh" namespace celeritas diff --git a/src/accel/detail/SensDetInserter.cc b/src/accel/detail/SensDetInserter.cc index 15e8f47be5..548b2eb92b 100644 --- a/src/accel/detail/SensDetInserter.cc +++ b/src/accel/detail/SensDetInserter.cc @@ -9,11 +9,11 @@ #include +#include "corecel/Config.hh" + #include "corecel/io/Logger.hh" #include "geocel/GeantGeoUtils.hh" -#include "celeritas_cmake_strings.hh" - namespace celeritas { namespace detail diff --git a/src/celeritas/Types.hh b/src/celeritas/Types.hh index 0403213186..a88ba266bd 100644 --- a/src/celeritas/Types.hh +++ b/src/celeritas/Types.hh @@ -10,7 +10,7 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" // IWYU pragma: begin_exports #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/celeritas/UnitTypes.hh b/src/celeritas/UnitTypes.hh index 4028a272ef..9894da8c7b 100644 --- a/src/celeritas/UnitTypes.hh +++ b/src/celeritas/UnitTypes.hh @@ -10,7 +10,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/math/UnitUtils.hh" #include "Constants.hh" diff --git a/src/celeritas/Units.hh b/src/celeritas/Units.hh index 1cdf9d8bee..d6bd3dfcf0 100644 --- a/src/celeritas/Units.hh +++ b/src/celeritas/Units.hh @@ -8,7 +8,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Types.hh" namespace celeritas diff --git a/src/celeritas/em/model/CoulombScatteringModel.cc b/src/celeritas/em/model/CoulombScatteringModel.cc index 2e996db875..88820221ea 100644 --- a/src/celeritas/em/model/CoulombScatteringModel.cc +++ b/src/celeritas/em/model/CoulombScatteringModel.cc @@ -9,9 +9,9 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "celeritas/Constants.hh" -#include "celeritas/Units.hh" #include "celeritas/em/data/CoulombScatteringData.hh" #include "celeritas/em/executor/CoulombScatteringExecutor.hh" #include "celeritas/em/interactor/detail/PhysicsConstants.hh" @@ -23,8 +23,9 @@ #include "celeritas/io/ImportProcess.hh" #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/InteractionApplier.hh" -#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" +#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/Units.hh" namespace celeritas { diff --git a/src/celeritas/em/model/LivermorePEModel.cc b/src/celeritas/em/model/LivermorePEModel.cc index ba6d62d7a0..aadf9831cb 100644 --- a/src/celeritas/em/model/LivermorePEModel.cc +++ b/src/celeritas/em/model/LivermorePEModel.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "celeritas/em/data/LivermorePEData.hh" #include "celeritas/em/executor/LivermorePEExecutor.hh" @@ -24,9 +25,9 @@ #include "celeritas/mat/ElementView.hh" #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/InteractionApplier.hh" -#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/ParticleView.hh" +#include "celeritas/phys/PDGNumber.hh" #include "detail/LivermoreXsInserter.hh" diff --git a/src/celeritas/em/model/SeltzerBergerModel.cc b/src/celeritas/em/model/SeltzerBergerModel.cc index d33d31abb7..54afac3542 100644 --- a/src/celeritas/em/model/SeltzerBergerModel.cc +++ b/src/celeritas/em/model/SeltzerBergerModel.cc @@ -12,7 +12,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/data/Collection.hh" #include "corecel/data/CollectionBuilder.hh" @@ -28,9 +29,9 @@ #include "celeritas/io/ImportProcess.hh" #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/InteractionApplier.hh" // IWYU pragma: associated -#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/ParticleView.hh" +#include "celeritas/phys/PDGNumber.hh" namespace celeritas { diff --git a/src/celeritas/ext/GeantImporter.cc b/src/celeritas/ext/GeantImporter.cc index d6d82aeef3..6628420c66 100644 --- a/src/celeritas/ext/GeantImporter.cc +++ b/src/celeritas/ext/GeantImporter.cc @@ -38,24 +38,25 @@ #include #include #include +#include +#include #include #include #include #include -#include -#include #include #include #include #include #include +#include #include #include #include #include -#include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Logger.hh" @@ -64,9 +65,9 @@ #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/TypeDemangler.hh" +#include "geocel/g4/VisitGeantVolumes.hh" #include "geocel/GeantGeoUtils.hh" #include "geocel/ScopedGeantExceptionHandler.hh" -#include "geocel/g4/VisitGeantVolumes.hh" #include "celeritas/io/AtomicRelaxationReader.hh" #include "celeritas/io/ImportData.hh" #include "celeritas/io/LivermorePEReader.hh" diff --git a/src/celeritas/ext/GeantImporter.hh b/src/celeritas/ext/GeantImporter.hh index 5c01135b2b..41e4912c2b 100644 --- a/src/celeritas/ext/GeantImporter.hh +++ b/src/celeritas/ext/GeantImporter.hh @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "celeritas/io/ImportData.hh" #include "celeritas/io/ImporterInterface.hh" diff --git a/src/celeritas/ext/GeantSetup.hh b/src/celeritas/ext/GeantSetup.hh index 4bd911673a..c18c0dfbde 100644 --- a/src/celeritas/ext/GeantSetup.hh +++ b/src/celeritas/ext/GeantSetup.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "GeantPhysicsOptions.hh" diff --git a/src/celeritas/ext/GeantVolumeMapper.cc b/src/celeritas/ext/GeantVolumeMapper.cc index 3987ce99be..e6ef47292e 100644 --- a/src/celeritas/ext/GeantVolumeMapper.cc +++ b/src/celeritas/ext/GeantVolumeMapper.cc @@ -9,12 +9,12 @@ #include +#include "corecel/Config.hh" + #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" #include "geocel/GeantGeoUtils.hh" -#include "celeritas_cmake_strings.hh" - namespace celeritas { //---------------------------------------------------------------------------// diff --git a/src/celeritas/ext/GeantVolumeMapper.hh b/src/celeritas/ext/GeantVolumeMapper.hh index a92dff7899..37e3b497ba 100644 --- a/src/celeritas/ext/GeantVolumeMapper.hh +++ b/src/celeritas/ext/GeantVolumeMapper.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "geocel/GeoParamsInterface.hh" #include "celeritas/Types.hh" diff --git a/src/celeritas/ext/RootExporter.hh b/src/celeritas/ext/RootExporter.hh index d65646bb98..e3cddf96bb 100644 --- a/src/celeritas/ext/RootExporter.hh +++ b/src/celeritas/ext/RootExporter.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "RootUniquePtr.hh" diff --git a/src/celeritas/ext/RootFileManager.hh b/src/celeritas/ext/RootFileManager.hh index bdded3a295..f6479bf485 100644 --- a/src/celeritas/ext/RootFileManager.hh +++ b/src/celeritas/ext/RootFileManager.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "RootUniquePtr.hh" diff --git a/src/celeritas/ext/RootImporter.hh b/src/celeritas/ext/RootImporter.hh index a4a90cb04c..8611d0c34f 100644 --- a/src/celeritas/ext/RootImporter.hh +++ b/src/celeritas/ext/RootImporter.hh @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "celeritas/io/ImportData.hh" #include "celeritas/io/ImporterInterface.hh" diff --git a/src/celeritas/ext/RootUniquePtr.hh b/src/celeritas/ext/RootUniquePtr.hh index a47a238c96..4a1d1add99 100644 --- a/src/celeritas/ext/RootUniquePtr.hh +++ b/src/celeritas/ext/RootUniquePtr.hh @@ -10,7 +10,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" class TFile; diff --git a/src/celeritas/ext/ScopedRootErrorHandler.hh b/src/celeritas/ext/ScopedRootErrorHandler.hh index 00ea2c23dd..18bd844fb9 100644 --- a/src/celeritas/ext/ScopedRootErrorHandler.hh +++ b/src/celeritas/ext/ScopedRootErrorHandler.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" namespace celeritas diff --git a/src/celeritas/field/RZMapFieldInput.hh b/src/celeritas/field/RZMapFieldInput.hh index 94bb359dac..77c7b76cde 100644 --- a/src/celeritas/field/RZMapFieldInput.hh +++ b/src/celeritas/field/RZMapFieldInput.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/celeritas/geo/GeoData.hh b/src/celeritas/geo/GeoData.hh index 45ce0aae60..bd0eb6c8c6 100644 --- a/src/celeritas/geo/GeoData.hh +++ b/src/celeritas/geo/GeoData.hh @@ -8,7 +8,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_VECGEOM # include "geocel/vg/VecgeomData.hh" #elif CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_ORANGE diff --git a/src/celeritas/geo/GeoFwd.hh b/src/celeritas/geo/GeoFwd.hh index cf981d9e6c..726e414b25 100644 --- a/src/celeritas/geo/GeoFwd.hh +++ b/src/celeritas/geo/GeoFwd.hh @@ -8,7 +8,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Types.hh" #include "geocel/g4/GeantGeoTraits.hh" #include "geocel/vg/VecgeomGeoTraits.hh" diff --git a/src/celeritas/geo/GeoParams.hh b/src/celeritas/geo/GeoParams.hh index 7a11fde8ff..7cb7f42adc 100644 --- a/src/celeritas/geo/GeoParams.hh +++ b/src/celeritas/geo/GeoParams.hh @@ -8,7 +8,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_VECGEOM # include "geocel/vg/VecgeomParams.hh" // IWYU pragma: export #elif CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_ORANGE diff --git a/src/celeritas/geo/GeoTrackView.hh b/src/celeritas/geo/GeoTrackView.hh index 59b50ed3d8..86916becb0 100644 --- a/src/celeritas/geo/GeoTrackView.hh +++ b/src/celeritas/geo/GeoTrackView.hh @@ -8,7 +8,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_VECGEOM # include "geocel/vg/VecgeomTrackView.hh" #elif CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_ORANGE diff --git a/src/celeritas/global/ActionLauncher.hh b/src/celeritas/global/ActionLauncher.hh index 692888c290..f09c56402b 100644 --- a/src/celeritas/global/ActionLauncher.hh +++ b/src/celeritas/global/ActionLauncher.hh @@ -7,11 +7,12 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" -#include "corecel/Types.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "corecel/sys/ThreadId.hh" +#include "corecel/Types.hh" #include "ActionInterface.hh" #include "CoreParams.hh" diff --git a/src/celeritas/global/ActionRegistryOutput.cc b/src/celeritas/global/ActionRegistryOutput.cc index e4fe2bc99c..bb2f9b42de 100644 --- a/src/celeritas/global/ActionRegistryOutput.cc +++ b/src/celeritas/global/ActionRegistryOutput.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/src/celeritas/global/CoreParams.cc b/src/celeritas/global/CoreParams.cc index 043220f5b3..370c1e2643 100644 --- a/src/celeritas/global/CoreParams.cc +++ b/src/celeritas/global/CoreParams.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/data/AuxParamsRegistry.hh" // IWYU pragma: keep #include "corecel/data/Ref.hh" @@ -30,17 +31,17 @@ #include "corecel/sys/ScopedMem.hh" #include "geocel/GeoParamsOutput.hh" #include "celeritas/em/params/WentzelOKVIParams.hh" +#include "celeritas/geo/detail/BoundaryAction.hh" #include "celeritas/geo/GeoMaterialParams.hh" // IWYU pragma: keep #include "celeritas/geo/GeoParams.hh" // IWYU pragma: keep -#include "celeritas/geo/detail/BoundaryAction.hh" #include "celeritas/mat/MaterialParams.hh" // IWYU pragma: keep #include "celeritas/mat/MaterialParamsOutput.hh" #include "celeritas/phys/CutoffParams.hh" // IWYU pragma: keep +#include "celeritas/phys/detail/TrackingCutAction.hh" #include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep #include "celeritas/phys/ParticleParamsOutput.hh" #include "celeritas/phys/PhysicsParams.hh" // IWYU pragma: keep #include "celeritas/phys/PhysicsParamsOutput.hh" -#include "celeritas/phys/detail/TrackingCutAction.hh" #include "celeritas/random/RngParams.hh" // IWYU pragma: keep #include "celeritas/track/ExtendFromPrimariesAction.hh" #include "celeritas/track/ExtendFromSecondariesAction.hh" diff --git a/src/celeritas/global/detail/ActionLauncherKernel.device.hh b/src/celeritas/global/detail/ActionLauncherKernel.device.hh index 3548517608..a389ab7899 100644 --- a/src/celeritas/global/detail/ActionLauncherKernel.device.hh +++ b/src/celeritas/global/detail/ActionLauncherKernel.device.hh @@ -7,9 +7,10 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" -#include "corecel/Macros.hh" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" +#include "corecel/Macros.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/ThreadId.hh" diff --git a/src/celeritas/io/EventReader.hh b/src/celeritas/io/EventReader.hh index f09db7b047..77a4b2cc9f 100644 --- a/src/celeritas/io/EventReader.hh +++ b/src/celeritas/io/EventReader.hh @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" diff --git a/src/celeritas/io/EventWriter.hh b/src/celeritas/io/EventWriter.hh index 05684ce821..b17b36e56f 100644 --- a/src/celeritas/io/EventWriter.hh +++ b/src/celeritas/io/EventWriter.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "celeritas/Types.hh" diff --git a/src/celeritas/mat/MaterialParamsOutput.cc b/src/celeritas/mat/MaterialParamsOutput.cc index 8b0a45923f..a49f0404be 100644 --- a/src/celeritas/mat/MaterialParamsOutput.cc +++ b/src/celeritas/mat/MaterialParamsOutput.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/src/celeritas/phys/Interaction.hh b/src/celeritas/phys/Interaction.hh index 82cacf922f..2bcfa6c0e2 100644 --- a/src/celeritas/phys/Interaction.hh +++ b/src/celeritas/phys/Interaction.hh @@ -7,12 +7,13 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" -#include "corecel/Types.hh" +#include "corecel/Config.hh" + #include "corecel/cont/Array.hh" #include "corecel/cont/Span.hh" #include "corecel/math/ArrayUtils.hh" #include "corecel/math/SoftEqual.hh" +#include "corecel/Types.hh" #include "celeritas/Quantities.hh" #include "celeritas/Types.hh" diff --git a/src/celeritas/phys/ParticleParamsOutput.cc b/src/celeritas/phys/ParticleParamsOutput.cc index c9d3e14e96..039935003f 100644 --- a/src/celeritas/phys/ParticleParamsOutput.cc +++ b/src/celeritas/phys/ParticleParamsOutput.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/JsonPimpl.hh" #include "corecel/math/Quantity.hh" diff --git a/src/celeritas/phys/PhysicsParamsOutput.cc b/src/celeritas/phys/PhysicsParamsOutput.cc index 0c86c55350..f0705109be 100644 --- a/src/celeritas/phys/PhysicsParamsOutput.cc +++ b/src/celeritas/phys/PhysicsParamsOutput.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" #include "corecel/math/QuantityIO.json.hh" diff --git a/src/celeritas/phys/PhysicsTrackView.hh b/src/celeritas/phys/PhysicsTrackView.hh index a5cbef3e4d..6f09e7f398 100644 --- a/src/celeritas/phys/PhysicsTrackView.hh +++ b/src/celeritas/phys/PhysicsTrackView.hh @@ -7,12 +7,11 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" -#include "celeritas/Quantities.hh" -#include "celeritas/Types.hh" #include "celeritas/em/xs/EPlusGGMacroXsCalculator.hh" #include "celeritas/em/xs/LivermorePEMicroXsCalculator.hh" #include "celeritas/grid/GridIdFinder.hh" @@ -21,6 +20,8 @@ #include "celeritas/mat/TabulatedElementSelector.hh" #include "celeritas/neutron/xs/NeutronElasticMicroXsCalculator.hh" #include "celeritas/phys/MacroXsCalculator.hh" +#include "celeritas/Quantities.hh" +#include "celeritas/Types.hh" #include "PhysicsData.hh" diff --git a/src/celeritas/phys/detail/PreStepExecutor.hh b/src/celeritas/phys/detail/PreStepExecutor.hh index a437accefd..796412fa62 100644 --- a/src/celeritas/phys/detail/PreStepExecutor.hh +++ b/src/celeritas/phys/detail/PreStepExecutor.hh @@ -7,14 +7,15 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" #include "corecel/math/Quantity.hh" -#include "celeritas/Types.hh" #include "celeritas/global/CoreTrackView.hh" -#include "celeritas/random/RngEngine.hh" #include "celeritas/random/distribution/ExponentialDistribution.hh" +#include "celeritas/random/RngEngine.hh" #include "celeritas/track/SimTrackView.hh" +#include "celeritas/Types.hh" #include "../PhysicsStepUtils.hh" // IWYU pragma: associated #include "../PhysicsStepView.hh" diff --git a/src/celeritas/random/CuHipRngData.hh b/src/celeritas/random/CuHipRngData.hh index 978019bac5..b0bf173715 100644 --- a/src/celeritas/random/CuHipRngData.hh +++ b/src/celeritas/random/CuHipRngData.hh @@ -9,13 +9,14 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "corecel/device_runtime_api.h" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" -#include "corecel/Types.hh" #include "corecel/data/Collection.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" +#include "corecel/Types.hh" /*! * \def CELER_RNG_PREFIX diff --git a/src/celeritas/random/RngData.hh b/src/celeritas/random/RngData.hh index f7c5d9c78f..7715babfe2 100644 --- a/src/celeritas/random/RngData.hh +++ b/src/celeritas/random/RngData.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" // IWYU pragma: begin_exports // Alias core RNG type using on compile-time RNG selection diff --git a/src/celeritas/random/RngEngine.hh b/src/celeritas/random/RngEngine.hh index 1f920c8570..d0f67419ab 100644 --- a/src/celeritas/random/RngEngine.hh +++ b/src/celeritas/random/RngEngine.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" // IWYU pragma: begin_exports // Alias core RNG type using on compile-time RNG selection diff --git a/src/celeritas/random/RngParams.hh b/src/celeritas/random/RngParams.hh index d55fe4e109..1b0859d68e 100644 --- a/src/celeritas/random/RngParams.hh +++ b/src/celeritas/random/RngParams.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" // IWYU pragma: begin_exports #if (CELERITAS_CORE_RNG == CELERITAS_CORE_RNG_CURAND) \ diff --git a/src/celeritas/random/RngParamsFwd.hh b/src/celeritas/random/RngParamsFwd.hh index 343bfe20d2..23835e9583 100644 --- a/src/celeritas/random/RngParamsFwd.hh +++ b/src/celeritas/random/RngParamsFwd.hh @@ -8,7 +8,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" namespace celeritas { diff --git a/src/celeritas/user/ActionDiagnostic.cc b/src/celeritas/user/ActionDiagnostic.cc index 258e7f573e..1faf424dd1 100644 --- a/src/celeritas/user/ActionDiagnostic.cc +++ b/src/celeritas/user/ActionDiagnostic.cc @@ -12,7 +12,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/cont/Span.hh" #include "corecel/data/CollectionAlgorithms.hh" diff --git a/src/celeritas/user/RootStepWriter.hh b/src/celeritas/user/RootStepWriter.hh index b9d057e449..d8354b5bfe 100644 --- a/src/celeritas/user/RootStepWriter.hh +++ b/src/celeritas/user/RootStepWriter.hh @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "celeritas/ext/RootUniquePtr.hh" diff --git a/src/celeritas/user/SimpleCalo.cc b/src/celeritas/user/SimpleCalo.cc index 85100ae9bc..1c96d7674e 100644 --- a/src/celeritas/user/SimpleCalo.cc +++ b/src/celeritas/user/SimpleCalo.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/data/CollectionAlgorithms.hh" #include "corecel/io/Join.hh" #include "corecel/io/JsonPimpl.hh" @@ -20,8 +21,6 @@ #include "corecel/io/Logger.hh" #include "geocel/GeoParamsInterface.hh" // IWYU pragma: keep -#include "celeritas_cmake_strings.hh" - #include "detail/SimpleCaloImpl.hh" namespace celeritas diff --git a/src/celeritas/user/StepDiagnostic.cc b/src/celeritas/user/StepDiagnostic.cc index c8a6b66ec3..5788d0bece 100644 --- a/src/celeritas/user/StepDiagnostic.cc +++ b/src/celeritas/user/StepDiagnostic.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/cont/Span.hh" #include "corecel/data/CollectionAlgorithms.hh" diff --git a/src/celeritas/user/detail/SimpleCaloImpl.cc b/src/celeritas/user/detail/SimpleCaloImpl.cc index 0549a27fe2..6852e3da59 100644 --- a/src/celeritas/user/detail/SimpleCaloImpl.cc +++ b/src/celeritas/user/detail/SimpleCaloImpl.cc @@ -7,10 +7,11 @@ //---------------------------------------------------------------------------// #include "SimpleCaloImpl.hh" -#include "celeritas_config.h" -#include "corecel/Types.hh" +#include "corecel/Config.hh" + #include "corecel/sys/MultiExceptionHandler.hh" #include "corecel/sys/ThreadId.hh" +#include "corecel/Types.hh" #include "SimpleCaloExecutor.hh" // IWYU pragma: associated diff --git a/src/corecel/Assert.hh b/src/corecel/Assert.hh index 3d8ae9886a..b54bbcbae8 100644 --- a/src/corecel/Assert.hh +++ b/src/corecel/Assert.hh @@ -24,7 +24,7 @@ # include // IWYU pragma: keep #endif -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "Macros.hh" diff --git a/src/corecel/Macros.hh b/src/corecel/Macros.hh index 1df8d30028..30c93596f5 100644 --- a/src/corecel/Macros.hh +++ b/src/corecel/Macros.hh @@ -13,7 +13,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" //---------------------------------------------------------------------------// // MACROS diff --git a/src/corecel/Types.hh b/src/corecel/Types.hh index cd71110420..835eb36709 100644 --- a/src/corecel/Types.hh +++ b/src/corecel/Types.hh @@ -16,7 +16,7 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "Macros.hh" diff --git a/src/corecel/data/CollectionBuilder.hh b/src/corecel/data/CollectionBuilder.hh index 2c6ab438b3..c41d216f36 100644 --- a/src/corecel/data/CollectionBuilder.hh +++ b/src/corecel/data/CollectionBuilder.hh @@ -10,9 +10,10 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "Collection.hh" + #include "detail/FillInvalid.hh" namespace celeritas diff --git a/src/corecel/device_runtime_api.h b/src/corecel/device_runtime_api.h index f7da89f0d6..0e4c4112c6 100644 --- a/src/corecel/device_runtime_api.h +++ b/src/corecel/device_runtime_api.h @@ -10,7 +10,7 @@ #ifndef CELERITAS_DEVICE_RUNTIME_API_H #define CELERITAS_DEVICE_RUNTIME_API_H -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_HIP && !defined(__HIPCC__) /* Assume we're on an AMD system but not being invoked by the rocm compiler */ diff --git a/src/corecel/io/BuildOutput.cc b/src/corecel/io/BuildOutput.cc index 5fd88e965a..29b15ae6e4 100644 --- a/src/corecel/io/BuildOutput.cc +++ b/src/corecel/io/BuildOutput.cc @@ -11,11 +11,11 @@ #include #include -#include "celeritas_config.h" -#include "corecel/Macros.hh" +#include "corecel/Config.hh" #include "corecel/Version.hh" -#include "celeritas_cmake_strings.hh" +#include "corecel/Macros.hh" + #include "JsonPimpl.hh" namespace celeritas diff --git a/src/corecel/io/ExceptionOutput.cc b/src/corecel/io/ExceptionOutput.cc index 7ead5fda1f..b015918276 100644 --- a/src/corecel/io/ExceptionOutput.cc +++ b/src/corecel/io/ExceptionOutput.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/AssertIO.json.hh" #include "corecel/sys/TypeDemangler.hh" diff --git a/src/corecel/io/JsonPimpl.hh b/src/corecel/io/JsonPimpl.hh index 73f4fe6fbf..200f4ce4e2 100644 --- a/src/corecel/io/JsonPimpl.hh +++ b/src/corecel/io/JsonPimpl.hh @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" namespace celeritas diff --git a/src/corecel/io/OutputInterface.cc b/src/corecel/io/OutputInterface.cc index 2915ce52a6..28515ec181 100644 --- a/src/corecel/io/OutputInterface.cc +++ b/src/corecel/io/OutputInterface.cc @@ -10,7 +10,7 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "EnumStringMapper.hh" #include "JsonPimpl.hh" diff --git a/src/corecel/io/OutputInterfaceAdapter.hh b/src/corecel/io/OutputInterfaceAdapter.hh index 6ef114eb6e..a1b8df773b 100644 --- a/src/corecel/io/OutputInterfaceAdapter.hh +++ b/src/corecel/io/OutputInterfaceAdapter.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "JsonPimpl.hh" diff --git a/src/corecel/io/OutputRegistry.cc b/src/corecel/io/OutputRegistry.cc index 501cc56097..5ec1f26bab 100644 --- a/src/corecel/io/OutputRegistry.cc +++ b/src/corecel/io/OutputRegistry.cc @@ -13,7 +13,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" diff --git a/src/corecel/math/Algorithms.hh b/src/corecel/math/Algorithms.hh index 78c963d675..8bfbca7e00 100644 --- a/src/corecel/math/Algorithms.hh +++ b/src/corecel/math/Algorithms.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/corecel/sys/Counter.hh b/src/corecel/sys/Counter.hh index 90382e48b0..47cbfdaaa8 100644 --- a/src/corecel/sys/Counter.hh +++ b/src/corecel/sys/Counter.hh @@ -8,7 +8,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" namespace celeritas diff --git a/src/corecel/sys/Device.cc b/src/corecel/sys/Device.cc index 53755736e9..41ca5bf5d3 100644 --- a/src/corecel/sys/Device.cc +++ b/src/corecel/sys/Device.cc @@ -12,7 +12,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" #if CELERITAS_USE_OPENMP # include diff --git a/src/corecel/sys/DeviceIO.json.cc b/src/corecel/sys/DeviceIO.json.cc index 8fab19ecd4..1dbb656dce 100644 --- a/src/corecel/sys/DeviceIO.json.cc +++ b/src/corecel/sys/DeviceIO.json.cc @@ -9,7 +9,7 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "Device.hh" #include "Stream.hh" diff --git a/src/corecel/sys/KernelAttributes.hh b/src/corecel/sys/KernelAttributes.hh index 88351f3aa5..5ef6428c55 100644 --- a/src/corecel/sys/KernelAttributes.hh +++ b/src/corecel/sys/KernelAttributes.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/corecel/sys/KernelRegistry.cc b/src/corecel/sys/KernelRegistry.cc index 5823e5836d..204db63bdf 100644 --- a/src/corecel/sys/KernelRegistry.cc +++ b/src/corecel/sys/KernelRegistry.cc @@ -10,7 +10,7 @@ #include // IWYU pragma: keep #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "Environment.hh" #include "KernelAttributes.hh" diff --git a/src/corecel/sys/KernelRegistryIO.json.cc b/src/corecel/sys/KernelRegistryIO.json.cc index 7c5224cb9c..143d9ab9f8 100644 --- a/src/corecel/sys/KernelRegistryIO.json.cc +++ b/src/corecel/sys/KernelRegistryIO.json.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "KernelAttributes.hh" diff --git a/src/corecel/sys/MpiOperations.hh b/src/corecel/sys/MpiOperations.hh index 15efde9f47..77f38797a5 100644 --- a/src/corecel/sys/MpiOperations.hh +++ b/src/corecel/sys/MpiOperations.hh @@ -11,7 +11,7 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_MPI # include diff --git a/src/corecel/sys/ScopedMpiInit.cc b/src/corecel/sys/ScopedMpiInit.cc index 5218e5814f..558ab70fa4 100644 --- a/src/corecel/sys/ScopedMpiInit.cc +++ b/src/corecel/sys/ScopedMpiInit.cc @@ -10,7 +10,7 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_MPI # include #endif diff --git a/src/corecel/sys/ScopedProfiling.cc b/src/corecel/sys/ScopedProfiling.cc index 5f8bb02fc6..26fa6279db 100644 --- a/src/corecel/sys/ScopedProfiling.cc +++ b/src/corecel/sys/ScopedProfiling.cc @@ -8,10 +8,11 @@ //---------------------------------------------------------------------------// #include "ScopedProfiling.hh" -#include "celeritas_config.h" -#include "celeritas_sys_config.h" -#include "corecel/Macros.hh" +#include "corecel/Config.hh" +#include "corecel/sys/Config.hh" + #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "Environment.hh" diff --git a/src/corecel/sys/ScopedProfiling.hh b/src/corecel/sys/ScopedProfiling.hh index 28cd54500e..a14848fab7 100644 --- a/src/corecel/sys/ScopedProfiling.hh +++ b/src/corecel/sys/ScopedProfiling.hh @@ -10,9 +10,10 @@ #include #include -#include "celeritas_config.h" -#include "corecel/Macros.hh" +#include "corecel/Config.hh" + #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "Environment.hh" diff --git a/src/corecel/sys/ScopedProfiling.hip.cc b/src/corecel/sys/ScopedProfiling.hip.cc index 8034caf47c..c16436de00 100644 --- a/src/corecel/sys/ScopedProfiling.hip.cc +++ b/src/corecel/sys/ScopedProfiling.hip.cc @@ -10,7 +10,8 @@ #include -#include "celeritas_sys_config.h" +#include "corecel/sys/Config.hh" + #include "corecel/io/Logger.hh" #include "Environment.hh" diff --git a/src/corecel/sys/Thrust.device.hh b/src/corecel/sys/Thrust.device.hh index de574b06c0..68f9af2932 100644 --- a/src/corecel/sys/Thrust.device.hh +++ b/src/corecel/sys/Thrust.device.hh @@ -12,7 +12,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "Device.hh" diff --git a/src/corecel/sys/TracingSession.hh b/src/corecel/sys/TracingSession.hh index 60c3c52c11..077d4eed2a 100644 --- a/src/corecel/sys/TracingSession.hh +++ b/src/corecel/sys/TracingSession.hh @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" //---------------------------------------------------------------------------// diff --git a/src/corecel/sys/detail/MpiCommunicatorImpl.hh b/src/corecel/sys/detail/MpiCommunicatorImpl.hh index a2d9276be8..92918dec96 100644 --- a/src/corecel/sys/detail/MpiCommunicatorImpl.hh +++ b/src/corecel/sys/detail/MpiCommunicatorImpl.hh @@ -8,7 +8,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_MPI # include diff --git a/src/corecel/sys/detail/MpiType.hh b/src/corecel/sys/detail/MpiType.hh index a848aed07a..85a72b1ffe 100644 --- a/src/corecel/sys/detail/MpiType.hh +++ b/src/corecel/sys/detail/MpiType.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_MPI # include diff --git a/src/geocel/GeantGeoUtils.hh b/src/geocel/GeantGeoUtils.hh index f3126bc2c6..2789ad0abe 100644 --- a/src/geocel/GeantGeoUtils.hh +++ b/src/geocel/GeantGeoUtils.hh @@ -11,8 +11,9 @@ #include #include -#include "celeritas_config.h" -#include "celeritas_sys_config.h" +#include "corecel/Config.hh" +#include "corecel/sys/Config.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Span.hh" diff --git a/src/geocel/GeantUtils.hh b/src/geocel/GeantUtils.hh index 869dcb7da8..e3224ed950 100644 --- a/src/geocel/GeantUtils.hh +++ b/src/geocel/GeantUtils.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" class G4RunManager; diff --git a/src/geocel/GeoParamsOutput.cc b/src/geocel/GeoParamsOutput.cc index 1807c4a0bd..d1944b4bcc 100644 --- a/src/geocel/GeoParamsOutput.cc +++ b/src/geocel/GeoParamsOutput.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/src/geocel/ScopedGeantExceptionHandler.hh b/src/geocel/ScopedGeantExceptionHandler.hh index cd626c700e..1146790dfb 100644 --- a/src/geocel/ScopedGeantExceptionHandler.hh +++ b/src/geocel/ScopedGeantExceptionHandler.hh @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" class G4VExceptionHandler; diff --git a/src/geocel/ScopedGeantLogger.hh b/src/geocel/ScopedGeantLogger.hh index 5487a28c12..732e3f3a7a 100644 --- a/src/geocel/ScopedGeantLogger.hh +++ b/src/geocel/ScopedGeantLogger.hh @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" class G4coutDestination; diff --git a/src/geocel/detail/LengthUnits.hh b/src/geocel/detail/LengthUnits.hh index 2777f660a7..e7a8538b49 100644 --- a/src/geocel/detail/LengthUnits.hh +++ b/src/geocel/detail/LengthUnits.hh @@ -8,7 +8,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Types.hh" #define CELER_ICRT inline constexpr real_type diff --git a/src/geocel/g4/GeantGeoParams.cc b/src/geocel/g4/GeantGeoParams.cc index 6476922ee4..8be5f396b3 100644 --- a/src/geocel/g4/GeantGeoParams.cc +++ b/src/geocel/g4/GeantGeoParams.cc @@ -20,7 +20,8 @@ # include #endif -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" diff --git a/src/geocel/g4/GeantGeoTraits.hh b/src/geocel/g4/GeantGeoTraits.hh index 8e9e1dfcd4..704ff1d21a 100644 --- a/src/geocel/g4/GeantGeoTraits.hh +++ b/src/geocel/g4/GeantGeoTraits.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "geocel/GeoTraits.hh" namespace celeritas diff --git a/src/geocel/g4vg/Converter.hh b/src/geocel/g4vg/Converter.hh index e40602ab2a..9e8846c16b 100644 --- a/src/geocel/g4vg/Converter.hh +++ b/src/geocel/g4vg/Converter.hh @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "geocel/Types.hh" //---------------------------------------------------------------------------// diff --git a/src/geocel/rasterize/RaytraceImager.cuda.t.hh b/src/geocel/rasterize/RaytraceImager.cuda.t.hh index 40f9299c3a..f5d2493ac4 100644 --- a/src/geocel/rasterize/RaytraceImager.cuda.t.hh +++ b/src/geocel/rasterize/RaytraceImager.cuda.t.hh @@ -16,7 +16,8 @@ #include "geocel/rasterize/RaytraceImager.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/ThreadId.hh" diff --git a/src/geocel/rasterize/RaytraceImager.nocuda.t.hh b/src/geocel/rasterize/RaytraceImager.nocuda.t.hh index 21b7a73ed2..f38482bac6 100644 --- a/src/geocel/rasterize/RaytraceImager.nocuda.t.hh +++ b/src/geocel/rasterize/RaytraceImager.nocuda.t.hh @@ -16,7 +16,8 @@ #include "geocel/rasterize/RaytraceImager.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" namespace celeritas diff --git a/src/geocel/vg/VecgeomGeoTraits.hh b/src/geocel/vg/VecgeomGeoTraits.hh index bb2ef84683..d440a1227a 100644 --- a/src/geocel/vg/VecgeomGeoTraits.hh +++ b/src/geocel/vg/VecgeomGeoTraits.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "geocel/GeoTraits.hh" namespace celeritas diff --git a/src/geocel/vg/VecgeomParams.cc b/src/geocel/vg/VecgeomParams.cc index bf62fed4f7..c310e9ea00 100644 --- a/src/geocel/vg/VecgeomParams.cc +++ b/src/geocel/vg/VecgeomParams.cc @@ -16,7 +16,7 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_CUDA # include # include diff --git a/src/geocel/vg/VecgeomParamsOutput.cc b/src/geocel/vg/VecgeomParamsOutput.cc index 7e4f6804bc..7c385b6b5f 100644 --- a/src/geocel/vg/VecgeomParamsOutput.cc +++ b/src/geocel/vg/VecgeomParamsOutput.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/src/orange/OrangeParams.cc b/src/orange/OrangeParams.cc index af48d7b2ca..bc6fb65724 100644 --- a/src/orange/OrangeParams.cc +++ b/src/orange/OrangeParams.cc @@ -15,9 +15,9 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" -#include "corecel/OpaqueId.hh" #include "corecel/cont/Range.hh" #include "corecel/cont/VariantUtils.hh" #include "corecel/data/Collection.hh" @@ -25,6 +25,7 @@ #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeLog.hh" #include "corecel/io/StringUtils.hh" +#include "corecel/OpaqueId.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" #include "geocel/BoundingBox.hh" diff --git a/src/orange/OrangeParamsOutput.cc b/src/orange/OrangeParamsOutput.cc index 3973e5cd54..a55a1f211e 100644 --- a/src/orange/OrangeParamsOutput.cc +++ b/src/orange/OrangeParamsOutput.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/src/orange/g4org/Converter.hh b/src/orange/g4org/Converter.hh index 7f4a37cb04..279f20707b 100644 --- a/src/orange/g4org/Converter.hh +++ b/src/orange/g4org/Converter.hh @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "orange/OrangeInput.hh" #include "orange/OrangeTypes.hh" diff --git a/src/orange/orangeinp/ObjectInterface.hh b/src/orange/orangeinp/ObjectInterface.hh index cc6f9edbc6..5eea705b79 100644 --- a/src/orange/orangeinp/ObjectInterface.hh +++ b/src/orange/orangeinp/ObjectInterface.hh @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" #include "CsgTypes.hh" diff --git a/src/orange/orangeinp/ProtoInterface.cc b/src/orange/orangeinp/ProtoInterface.cc index 40c77fb140..424888d86e 100644 --- a/src/orange/orangeinp/ProtoInterface.cc +++ b/src/orange/orangeinp/ProtoInterface.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/JsonPimpl.hh" namespace celeritas diff --git a/src/orange/orangeinp/UnitProto.cc b/src/orange/orangeinp/UnitProto.cc index b2494ebfa0..b014fa6f79 100644 --- a/src/orange/orangeinp/UnitProto.cc +++ b/src/orange/orangeinp/UnitProto.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/Join.hh" #include "corecel/io/JsonPimpl.hh" #include "corecel/io/LabelIO.json.hh" diff --git a/test/Test.hh b/test/Test.hh index 770bf0f4fd..168f4bf321 100644 --- a/test/Test.hh +++ b/test/Test.hh @@ -12,7 +12,7 @@ #include #include // IWYU pragma: export -#include "celeritas_config.h" +#include "corecel/Config.hh" namespace celeritas { diff --git a/test/TestMacros.hh b/test/TestMacros.hh index a80e49c986..2047d5ea5e 100644 --- a/test/TestMacros.hh +++ b/test/TestMacros.hh @@ -9,7 +9,7 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "testdetail/TestMacrosImpl.hh" diff --git a/test/accel/SDTestBase.cc b/test/accel/SDTestBase.cc index d37b6dd14b..f884c300e2 100644 --- a/test/accel/SDTestBase.cc +++ b/test/accel/SDTestBase.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/Join.hh" #include "SimpleSensitiveDetector.hh" diff --git a/test/accel/detail/HitManager.test.cc b/test/accel/detail/HitManager.test.cc index 921894d126..503350e31f 100644 --- a/test/accel/detail/HitManager.test.cc +++ b/test/accel/detail/HitManager.test.cc @@ -13,12 +13,13 @@ #include #include -#include "celeritas_config.h" -#include "corecel/ScopedLogStorer.hh" +#include "corecel/Config.hh" + #include "corecel/io/Logger.hh" +#include "corecel/ScopedLogStorer.hh" #include "geocel/GeantGeoUtils.hh" -#include "celeritas/SimpleCmsTestBase.hh" #include "celeritas/geo/GeoParams.hh" +#include "celeritas/SimpleCmsTestBase.hh" #include "accel/SDTestBase.hh" #include "accel/SetupOptions.hh" diff --git a/test/celeritas/AllGeoTypedTestBase.hh b/test/celeritas/AllGeoTypedTestBase.hh index 503641e71e..0ee5774169 100644 --- a/test/celeritas/AllGeoTypedTestBase.hh +++ b/test/celeritas/AllGeoTypedTestBase.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "orange/OrangeTestBase.hh" #if CELERITAS_USE_VECGEOM # include "geocel/vg/VecgeomTestBase.hh" diff --git a/test/celeritas/Constants.test.cc b/test/celeritas/Constants.test.cc index 5b3a41580f..09d48f6547 100644 --- a/test/celeritas/Constants.test.cc +++ b/test/celeritas/Constants.test.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "celeritas/Units.hh" #include "celeritas_test.hh" diff --git a/test/celeritas/CoreGeoTestBase.hh b/test/celeritas/CoreGeoTestBase.hh index 21e9aac854..01ac308d0c 100644 --- a/test/celeritas/CoreGeoTestBase.hh +++ b/test/celeritas/CoreGeoTestBase.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_VECGEOM # include "geocel/vg/VecgeomTestBase.hh" #elif CELERITAS_CORE_GEO == CELERITAS_CORE_GEO_ORANGE diff --git a/test/celeritas/GeantTestBase.cc b/test/celeritas/GeantTestBase.cc index d8c3f97319..ab9944f0cd 100644 --- a/test/celeritas/GeantTestBase.cc +++ b/test/celeritas/GeantTestBase.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/Logger.hh" #include "geocel/ScopedGeantExceptionHandler.hh" #include "celeritas/em/params/UrbanMscParams.hh" @@ -22,8 +23,6 @@ #include "celeritas/io/ImportData.hh" #include "celeritas/track/TrackInitParams.hh" -#include "celeritas_cmake_strings.hh" - namespace celeritas { namespace test diff --git a/test/celeritas/GlobalGeoTestBase.cc b/test/celeritas/GlobalGeoTestBase.cc index b8ed71878e..381ff059b4 100644 --- a/test/celeritas/GlobalGeoTestBase.cc +++ b/test/celeritas/GlobalGeoTestBase.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "celeritas/geo/GeoParams.hh" namespace celeritas diff --git a/test/celeritas/GlobalTestBase.cc b/test/celeritas/GlobalTestBase.cc index 9c0e25dfac..63e598a829 100644 --- a/test/celeritas/GlobalTestBase.cc +++ b/test/celeritas/GlobalTestBase.cc @@ -12,7 +12,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/data/AuxParamsRegistry.hh" #include "corecel/io/ColorUtils.hh" #include "corecel/io/JsonPimpl.hh" diff --git a/test/celeritas/InvalidOrangeTestBase.hh b/test/celeritas/InvalidOrangeTestBase.hh index 7d03839356..ce79537419 100644 --- a/test/celeritas/InvalidOrangeTestBase.hh +++ b/test/celeritas/InvalidOrangeTestBase.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "SimpleTestBase.hh" diff --git a/test/celeritas/ext/GeantImporter.test.cc b/test/celeritas/ext/GeantImporter.test.cc index 5fe5bd2ece..1d84c67f56 100644 --- a/test/celeritas/ext/GeantImporter.test.cc +++ b/test/celeritas/ext/GeantImporter.test.cc @@ -7,12 +7,13 @@ //---------------------------------------------------------------------------// #include "celeritas/ext/GeantImporter.hh" -#include "celeritas_config.h" -#include "corecel/ScopedLogStorer.hh" +#include "corecel/Config.hh" +#include "corecel/sys/Version.hh" + #include "corecel/io/Logger.hh" #include "corecel/io/Repr.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/sys/Version.hh" +#include "corecel/ScopedLogStorer.hh" #include "geocel/UnitUtils.hh" #include "celeritas/ext/GeantPhysicsOptionsIO.json.hh" #include "celeritas/ext/GeantSetup.hh" @@ -20,7 +21,6 @@ #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/PDGNumber.hh" -#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" #include "../GeantTestBase.hh" diff --git a/test/celeritas/ext/GeantVolumeMapper.test.cc b/test/celeritas/ext/GeantVolumeMapper.test.cc index ea964a3885..f19db8dc10 100644 --- a/test/celeritas/ext/GeantVolumeMapper.test.cc +++ b/test/celeritas/ext/GeantVolumeMapper.test.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "geocel/GeantGeoUtils.hh" #include "celeritas/geo/GeoParams.hh" diff --git a/test/celeritas/field/FieldPropagator.test.cc b/test/celeritas/field/FieldPropagator.test.cc index 21ede11a0e..bd40d0f259 100644 --- a/test/celeritas/field/FieldPropagator.test.cc +++ b/test/celeritas/field/FieldPropagator.test.cc @@ -10,16 +10,17 @@ #include #include -#include "corecel/ScopedLogStorer.hh" +#include "corecel/Config.hh" + #include "corecel/cont/ArrayIO.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" #include "corecel/math/Algorithms.hh" #include "corecel/math/ArrayUtils.hh" +#include "corecel/ScopedLogStorer.hh" #include "geocel/CheckedGeoTrackView.hh" #include "celeritas/Constants.hh" #include "celeritas/CoreGeoTestBase.hh" -#include "celeritas/Quantities.hh" #include "celeritas/field/DormandPrinceStepper.hh" #include "celeritas/field/FieldDriverOptions.hh" #include "celeritas/field/MakeMagFieldPropagator.hh" @@ -27,14 +28,14 @@ #include "celeritas/geo/GeoData.hh" #include "celeritas/geo/GeoParams.hh" #include "celeritas/geo/GeoTrackView.hh" -#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" +#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/Quantities.hh" +#include "celeritas_test.hh" #include "CMSParameterizedField.hh" #include "DiagnosticStepper.hh" #include "FieldTestBase.hh" -#include "celeritas_cmake_strings.hh" -#include "celeritas_test.hh" namespace celeritas { diff --git a/test/celeritas/field/Steppers.test.cc b/test/celeritas/field/Steppers.test.cc index 0de879fb9d..89aeae9286 100644 --- a/test/celeritas/field/Steppers.test.cc +++ b/test/celeritas/field/Steppers.test.cc @@ -6,14 +6,13 @@ //! \file celeritas/field/Steppers.test.cc //---------------------------------------------------------------------------// -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" +#include "corecel/cont/Range.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" -#include "corecel/cont/Range.hh" #include "celeritas/Constants.hh" -#include "celeritas/Quantities.hh" -#include "celeritas/Units.hh" #include "celeritas/field/DormandPrinceStepper.hh" #include "celeritas/field/MagFieldEquation.hh" #include "celeritas/field/MakeMagFieldPropagator.hh" @@ -21,9 +20,11 @@ #include "celeritas/field/UniformField.hh" #include "celeritas/field/UniformZField.hh" #include "celeritas/field/ZHelixStepper.hh" +#include "celeritas/Quantities.hh" +#include "celeritas/Units.hh" -#include "FieldTestParams.hh" #include "celeritas_test.hh" +#include "FieldTestParams.hh" namespace celeritas { diff --git a/test/celeritas/geo/Geometry.test.cc b/test/celeritas/geo/Geometry.test.cc index fc34cea831..1e80ba3337 100644 --- a/test/celeritas/geo/Geometry.test.cc +++ b/test/celeritas/geo/Geometry.test.cc @@ -5,12 +5,13 @@ //---------------------------------------------------------------------------// //! \file celeritas/geo/Geometry.test.cc //---------------------------------------------------------------------------// -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "geocel/GeoParamsOutput.hh" #include "celeritas/geo/GeoParams.hh" -#include "HeuristicGeoTestBase.hh" #include "celeritas_test.hh" +#include "HeuristicGeoTestBase.hh" namespace celeritas { diff --git a/test/celeritas/global/AlongStep.test.cc b/test/celeritas/global/AlongStep.test.cc index 36313d5b4a..c360c9e761 100644 --- a/test/celeritas/global/AlongStep.test.cc +++ b/test/celeritas/global/AlongStep.test.cc @@ -7,13 +7,11 @@ //---------------------------------------------------------------------------// #include -#include "celeritas_sys_config.h" -#include "corecel/ScopedLogStorer.hh" +#include "corecel/sys/Config.hh" + #include "corecel/io/Logger.hh" +#include "corecel/ScopedLogStorer.hh" #include "geocel/UnitUtils.hh" -#include "celeritas/LeadBoxTestBase.hh" -#include "celeritas/SimpleCmsTestBase.hh" -#include "celeritas/TestEm3Base.hh" #include "celeritas/em/params/UrbanMscParams.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/field/RZMapFieldInput.hh" @@ -21,8 +19,11 @@ #include "celeritas/global/ActionRegistry.hh" #include "celeritas/global/alongstep/AlongStepRZMapFieldMscAction.hh" #include "celeritas/global/alongstep/AlongStepUniformMscAction.hh" -#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/LeadBoxTestBase.hh" #include "celeritas/phys/ParticleParams.hh" +#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/SimpleCmsTestBase.hh" +#include "celeritas/TestEm3Base.hh" #include "AlongStepTestBase.hh" #include "celeritas_test.hh" diff --git a/test/celeritas/io/EventIO.test.cc b/test/celeritas/io/EventIO.test.cc index 3490e3dcb2..065a9e8f4a 100644 --- a/test/celeritas/io/EventIO.test.cc +++ b/test/celeritas/io/EventIO.test.cc @@ -7,12 +7,13 @@ //---------------------------------------------------------------------------// #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "celeritas/io/EventReader.hh" #include "celeritas/io/EventWriter.hh" -#include "EventIOTestBase.hh" #include "celeritas_test.hh" +#include "EventIOTestBase.hh" #if CELERITAS_USE_HEPMC3 # include diff --git a/test/celeritas/phys/Particle.test.cc b/test/celeritas/phys/Particle.test.cc index 4f142155f6..597859ecb9 100644 --- a/test/celeritas/phys/Particle.test.cc +++ b/test/celeritas/phys/Particle.test.cc @@ -7,10 +7,10 @@ //---------------------------------------------------------------------------// #include "Particle.test.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Array.hh" #include "corecel/data/CollectionStateStore.hh" -#include "celeritas/Quantities.hh" #include "celeritas/ext/RootImporter.hh" #include "celeritas/ext/ScopedRootErrorHandler.hh" #include "celeritas/io/ImportData.hh" @@ -18,6 +18,7 @@ #include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/ParticleParamsOutput.hh" #include "celeritas/phys/ParticleTrackView.hh" +#include "celeritas/Quantities.hh" #include "celeritas_test.hh" diff --git a/test/celeritas/random/RngEngine.test.cc b/test/celeritas/random/RngEngine.test.cc index 8e537ab8f7..7447c40188 100644 --- a/test/celeritas/random/RngEngine.test.cc +++ b/test/celeritas/random/RngEngine.test.cc @@ -12,16 +12,17 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" -#include "corecel/Types.hh" #include "corecel/data/CollectionStateStore.hh" -#include "celeritas/random/RngParams.hh" +#include "corecel/Types.hh" #include "celeritas/random/distribution/GenerateCanonical.hh" +#include "celeritas/random/RngParams.hh" +#include "celeritas_test.hh" #include "DiagnosticRngEngine.hh" #include "SequenceEngine.hh" -#include "celeritas_test.hh" namespace celeritas { diff --git a/test/celeritas/user/Diagnostic.test.cc b/test/celeritas/user/Diagnostic.test.cc index 417e6d01d6..5947176513 100644 --- a/test/celeritas/user/Diagnostic.test.cc +++ b/test/celeritas/user/Diagnostic.test.cc @@ -5,21 +5,22 @@ //---------------------------------------------------------------------------// //! \file celeritas/user/Diagnostic.test.cc //---------------------------------------------------------------------------// +#include "corecel/Config.hh" + #include "corecel/cont/Span.hh" #include "corecel/io/StringUtils.hh" #include "geocel/UnitUtils.hh" #include "celeritas/em/params/UrbanMscParams.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/global/ActionRegistry.hh" -#include "celeritas/global/Stepper.hh" #include "celeritas/global/alongstep/AlongStepUniformMscAction.hh" -#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/global/Stepper.hh" #include "celeritas/phys/ParticleParams.hh" +#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/Primary.hh" -#include "DiagnosticTestBase.hh" -#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" +#include "DiagnosticTestBase.hh" #include "../SimpleTestBase.hh" #include "../TestEm3Base.hh" diff --git a/test/celeritas_test.hh b/test/celeritas_test.hh index 14ace3d6ac..2546890764 100644 --- a/test/celeritas_test.hh +++ b/test/celeritas_test.hh @@ -12,7 +12,7 @@ #include // IWYU pragma: begin_exports -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "Test.hh" #include "TestMacros.hh" diff --git a/test/corecel/cont/Range.test.hh b/test/corecel/cont/Range.test.hh index e08bd1adb9..824206bb70 100644 --- a/test/corecel/cont/Range.test.hh +++ b/test/corecel/cont/Range.test.hh @@ -8,7 +8,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Macros.hh" namespace celeritas diff --git a/test/corecel/math/Integrator.test.cc b/test/corecel/math/Integrator.test.cc index e75423b2f4..01f18502ca 100644 --- a/test/corecel/math/Integrator.test.cc +++ b/test/corecel/math/Integrator.test.cc @@ -10,7 +10,7 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" #include "celeritas_test.hh" diff --git a/test/corecel/math/Quantity.test.cc b/test/corecel/math/Quantity.test.cc index 7667aef397..742e637777 100644 --- a/test/corecel/math/Quantity.test.cc +++ b/test/corecel/math/Quantity.test.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/math/QuantityIO.json.hh" #include "corecel/math/Turn.hh" diff --git a/test/corecel/sys/Environment.test.cc b/test/corecel/sys/Environment.test.cc index 0007c8c690..d37e55ae07 100644 --- a/test/corecel/sys/Environment.test.cc +++ b/test/corecel/sys/Environment.test.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/sys/EnvironmentIO.json.hh" #include "celeritas_test.hh" diff --git a/test/geocel/BoundingBox.test.cc b/test/geocel/BoundingBox.test.cc index 29d1b8051c..d1bda680df 100644 --- a/test/geocel/BoundingBox.test.cc +++ b/test/geocel/BoundingBox.test.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/ArrayIO.hh" #include "geocel/BoundingBoxIO.json.hh" diff --git a/test/geocel/GenericGeoTestBase.cc b/test/geocel/GenericGeoTestBase.cc index ae8183a4e4..0fbcf6bbd4 100644 --- a/test/geocel/GenericGeoTestBase.cc +++ b/test/geocel/GenericGeoTestBase.cc @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "GenericGeoTestBase.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" #if CELERITAS_USE_GEANT4 # include # include diff --git a/test/geocel/LazyGeoManager.cc b/test/geocel/LazyGeoManager.cc index 08f133859c..6c3196e64e 100644 --- a/test/geocel/LazyGeoManager.cc +++ b/test/geocel/LazyGeoManager.cc @@ -9,7 +9,8 @@ #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/Logger.hh" namespace celeritas diff --git a/test/geocel/UnitUtils.hh b/test/geocel/UnitUtils.hh index 1f9ac64a96..069c5ba860 100644 --- a/test/geocel/UnitUtils.hh +++ b/test/geocel/UnitUtils.hh @@ -7,9 +7,10 @@ //---------------------------------------------------------------------------// #pragma once -#include "celeritas_config.h" -#include "corecel/Types.hh" +#include "corecel/Config.hh" + #include "corecel/cont/Array.hh" +#include "corecel/Types.hh" #include "geocel/detail/LengthUnits.hh" namespace celeritas diff --git a/test/geocel/g4/GeantGeo.test.cc b/test/geocel/g4/GeantGeo.test.cc index 40a9826ff7..b47c25bc14 100644 --- a/test/geocel/g4/GeantGeo.test.cc +++ b/test/geocel/g4/GeantGeo.test.cc @@ -8,20 +8,21 @@ #include #include -#include "corecel/ScopedLogStorer.hh" +#include "corecel/Config.hh" +#include "corecel/sys/Version.hh" + #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/sys/Version.hh" -#include "geocel/GeoParamsOutput.hh" -#include "geocel/UnitUtils.hh" +#include "corecel/ScopedLogStorer.hh" #include "geocel/g4/GeantGeoData.hh" #include "geocel/g4/GeantGeoParams.hh" #include "geocel/g4/GeantGeoTrackView.hh" +#include "geocel/GeoParamsOutput.hh" +#include "geocel/UnitUtils.hh" -#include "GeantGeoTestBase.hh" -#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" +#include "GeantGeoTestBase.hh" namespace celeritas { diff --git a/test/geocel/vg/Vecgeom.test.cc b/test/geocel/vg/Vecgeom.test.cc index 9c822589b8..c76e767e34 100644 --- a/test/geocel/vg/Vecgeom.test.cc +++ b/test/geocel/vg/Vecgeom.test.cc @@ -9,14 +9,16 @@ #include -#include "corecel/ScopedLogStorer.hh" +#include "corecel/Config.hh" +#include "corecel/sys/Version.hh" + #include "corecel/cont/ArrayIO.hh" #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" +#include "corecel/ScopedLogStorer.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" -#include "corecel/sys/Version.hh" #include "geocel/GeantGeoUtils.hh" #include "geocel/GeoParamsOutput.hh" #include "geocel/UnitUtils.hh" @@ -24,9 +26,8 @@ #include "geocel/vg/VecgeomParams.hh" #include "geocel/vg/VecgeomTrackView.hh" -#include "VecgeomTestBase.hh" -#include "celeritas_cmake_strings.hh" #include "celeritas_test.hh" +#include "VecgeomTestBase.hh" namespace celeritas { diff --git a/test/orange/Orange.test.cc b/test/orange/Orange.test.cc index 76e6976830..29cba6c84d 100644 --- a/test/orange/Orange.test.cc +++ b/test/orange/Orange.test.cc @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Constants.hh" #include "corecel/io/Label.hh" #include "orange/OrangeParams.hh" @@ -15,9 +16,9 @@ #include "orange/OrangeTypes.hh" #include "celeritas/Types.hh" +#include "celeritas_test.hh" #include "OrangeGeoTestBase.hh" #include "TestMacros.hh" -#include "celeritas_test.hh" using celeritas::constants::sqrt_two; diff --git a/test/orange/OrangeGeant.test.cc b/test/orange/OrangeGeant.test.cc index 9f648e5282..c917354fc4 100644 --- a/test/orange/OrangeGeant.test.cc +++ b/test/orange/OrangeGeant.test.cc @@ -7,13 +7,14 @@ //---------------------------------------------------------------------------// #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Types.hh" #include "geocel/detail/LengthUnits.hh" +#include "celeritas_test.hh" #include "OrangeGeoTestBase.hh" #include "TestMacros.hh" -#include "celeritas_test.hh" namespace celeritas { diff --git a/test/orange/OrangeGeoTestBase.cc b/test/orange/OrangeGeoTestBase.cc index 741b7e2532..f99fb0b950 100644 --- a/test/orange/OrangeGeoTestBase.cc +++ b/test/orange/OrangeGeoTestBase.cc @@ -11,15 +11,16 @@ #include #include -#include "celeritas_config.h" -#include "corecel/ScopedLogStorer.hh" +#include "corecel/Config.hh" + #include "corecel/data/Ref.hh" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" +#include "corecel/ScopedLogStorer.hh" #include "geocel/Types.hh" +#include "orange/detail/UniverseIndexer.hh" #include "orange/OrangeInput.hh" #include "orange/OrangeParams.hh" -#include "orange/detail/UniverseIndexer.hh" #include "orange/surf/LocalSurfaceVisitor.hh" #include "orange/surf/Sphere.hh" #include "orange/surf/SurfaceIO.hh" diff --git a/test/orange/orangeinp/CsgTestUtils.cc b/test/orange/orangeinp/CsgTestUtils.cc index 0b4750b879..ffe39fb23d 100644 --- a/test/orange/orangeinp/CsgTestUtils.cc +++ b/test/orange/orangeinp/CsgTestUtils.cc @@ -14,7 +14,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/io/Join.hh" #include "corecel/io/Repr.hh" #include "corecel/io/StreamableVariant.hh" diff --git a/test/orange/surf/ConeAligned.test.cc b/test/orange/surf/ConeAligned.test.cc index 45d4840b32..4fb312d834 100644 --- a/test/orange/surf/ConeAligned.test.cc +++ b/test/orange/surf/ConeAligned.test.cc @@ -7,12 +7,13 @@ //---------------------------------------------------------------------------// #include "orange/surf/ConeAligned.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/math/Algorithms.hh" #include "corecel/math/ArrayUtils.hh" -#include "SurfaceTestUtils.hh" #include "celeritas_test.hh" +#include "SurfaceTestUtils.hh" namespace celeritas { diff --git a/test/orange/univ/RectArrayTracker.test.cc b/test/orange/univ/RectArrayTracker.test.cc index e1196228a7..1093989ebd 100644 --- a/test/orange/univ/RectArrayTracker.test.cc +++ b/test/orange/univ/RectArrayTracker.test.cc @@ -10,22 +10,23 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/data/CollectionAlgorithms.hh" #include "corecel/data/CollectionStateStore.hh" #include "corecel/data/Ref.hh" #include "corecel/io/Repr.hh" #include "corecel/math/ArrayUtils.hh" #include "corecel/sys/Stopwatch.hh" +#include "orange/detail/UniverseIndexer.hh" #include "orange/OrangeGeoTestBase.hh" #include "orange/OrangeParams.hh" -#include "orange/detail/UniverseIndexer.hh" #include "celeritas/Constants.hh" #include "celeritas/random/distribution/IsotropicDistribution.hh" #include "celeritas/random/distribution/UniformBoxDistribution.hh" -#include "SimpleUnitTracker.test.hh" #include "celeritas_test.hh" +#include "SimpleUnitTracker.test.hh" namespace celeritas { diff --git a/test/orange/univ/SimpleUnitTracker.test.cc b/test/orange/univ/SimpleUnitTracker.test.cc index 232f0cd4bf..b3001ee793 100644 --- a/test/orange/univ/SimpleUnitTracker.test.cc +++ b/test/orange/univ/SimpleUnitTracker.test.cc @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/data/CollectionAlgorithms.hh" #include "corecel/data/CollectionStateStore.hh" #include "corecel/data/Ref.hh" @@ -18,15 +19,15 @@ #include "corecel/math/ArrayUtils.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Stopwatch.hh" +#include "orange/detail/UniverseIndexer.hh" #include "orange/OrangeGeoTestBase.hh" #include "orange/OrangeParams.hh" -#include "orange/detail/UniverseIndexer.hh" #include "celeritas/Constants.hh" #include "celeritas/random/distribution/IsotropicDistribution.hh" #include "celeritas/random/distribution/UniformBoxDistribution.hh" -#include "SimpleUnitTracker.test.hh" #include "celeritas_test.hh" +#include "SimpleUnitTracker.test.hh" using celeritas::constants::sqrt_three; using celeritas::constants::sqrt_two; diff --git a/test/orange/univ/VolumeView.test.cc b/test/orange/univ/VolumeView.test.cc index c390acd5e5..f235da399d 100644 --- a/test/orange/univ/VolumeView.test.cc +++ b/test/orange/univ/VolumeView.test.cc @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "orange/univ/VolumeView.hh" -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/cont/Range.hh" #include "orange/OrangeGeoTestBase.hh" diff --git a/test/testdetail/JsonComparer.hh b/test/testdetail/JsonComparer.hh index b746531bc1..ce4f44175c 100644 --- a/test/testdetail/JsonComparer.hh +++ b/test/testdetail/JsonComparer.hh @@ -12,7 +12,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/math/SoftEqual.hh" namespace celeritas diff --git a/test/testdetail/TestMacrosImpl.cc b/test/testdetail/TestMacrosImpl.cc index 2ea9ee869a..8f42dd82e9 100644 --- a/test/testdetail/TestMacrosImpl.cc +++ b/test/testdetail/TestMacrosImpl.cc @@ -11,7 +11,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/io/ColorUtils.hh" diff --git a/test/testdetail/TestMacrosImpl.hh b/test/testdetail/TestMacrosImpl.hh index cc20af6b1d..f180f3f9e3 100644 --- a/test/testdetail/TestMacrosImpl.hh +++ b/test/testdetail/TestMacrosImpl.hh @@ -12,9 +12,10 @@ #include #include -#include "celeritas_config.h" -#include "corecel/Macros.hh" +#include "corecel/Config.hh" + #include "corecel/io/Repr.hh" +#include "corecel/Macros.hh" #include "corecel/math/SoftEqual.hh" namespace celeritas diff --git a/test/testdetail/TestMainImpl.cc b/test/testdetail/TestMainImpl.cc index 2717e5765f..e1fc3a5947 100644 --- a/test/testdetail/TestMainImpl.cc +++ b/test/testdetail/TestMainImpl.cc @@ -10,7 +10,9 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" +#include "corecel/Version.hh" + #include "corecel/cont/Range.hh" #include "corecel/io/ColorUtils.hh" #include "corecel/io/Logger.hh" @@ -20,7 +22,6 @@ #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/MpiOperations.hh" #include "corecel/sys/ScopedMpiInit.hh" -#include "corecel/Version.hh" #include "NonMasterResultPrinter.hh" From afe200ec35258f82c7b305cf92b946bc0014eb05 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 16:23:40 -0700 Subject: [PATCH 09/29] rename device_runtime_api.h --- .clang-format | 2 +- app/celer-sim/celer-sim.cc | 2 +- app/demo-interactor/KNDemoKernel.thrust.cu | 2 +- doc/appendix/development.rst | 2 +- scripts/dev/celeritas-gen.py | 4 ++-- src/celeritas/global/ActionLauncher.device.hh | 6 ++++-- src/celeritas/global/detail/ActionSequence.cc | 5 +++-- src/celeritas/random/CuHipRngData.hh | 2 +- src/celeritas/random/RngReseed.cu | 3 ++- src/celeritas/random/detail/CuHipRngStateInit.cu | 3 ++- src/celeritas/track/StatusChecker.cu | 3 ++- src/celeritas/user/detail/SimpleCaloImpl.cu | 5 +++-- src/corecel/Assert.hh | 6 +++--- src/corecel/data/Copier.cc | 3 ++- src/corecel/data/DeviceAllocation.cc | 7 ++++--- src/corecel/data/PinnedAllocator.t.hh | 5 +++-- src/corecel/data/detail/Filler.device.t.hh | 3 ++- .../{device_runtime_api.h => device_runtime_api.hh} | 9 +++------ src/corecel/sys/Device.cc | 6 ++++-- src/corecel/sys/KernelAttributes.hh | 2 +- src/corecel/sys/KernelParamCalculator.device.hh | 5 +++-- src/corecel/sys/ScopedLimitSaver.hh | 5 +++-- src/corecel/sys/ScopedMem.cc | 3 ++- src/corecel/sys/Stream.hh | 3 ++- src/geocel/vg/VecgeomParams.cc | 8 +++++--- test/celeritas/geo/HeuristicGeoTestBase.cu | 5 +++-- test/celeritas/mat/Material.test.cu | 5 +++-- test/celeritas/phys/Particle.test.cu | 5 +++-- test/celeritas/phys/Physics.test.cu | 5 +++-- test/celeritas/random/RngEngine.test.cu | 3 ++- test/corecel/cont/Range.test.cu | 3 ++- test/corecel/data/Collection.test.cu | 3 ++- test/corecel/data/ObserverPtr.test.cu | 3 ++- test/corecel/data/StackAllocator.test.cu | 3 ++- test/corecel/math/NumericLimits.test.cu | 3 ++- test/orange/surf/LocalSurfaceVisitor.test.cu | 3 ++- 36 files changed, 86 insertions(+), 59 deletions(-) rename src/corecel/{device_runtime_api.h => device_runtime_api.hh} (89%) diff --git a/.clang-format b/.clang-format index 8e79b0b2b4..b4a39967bf 100644 --- a/.clang-format +++ b/.clang-format @@ -78,7 +78,7 @@ IncludeCategories: - Regex: '^"corecel/(sys/)?(Config|Version)\.hh"$' Priority: 2 SortPriority: 3 - - Regex: '^"corecel/device_runtime_api\.h"$' + - Regex: '^"corecel/device_runtime_api\.hh"$' Priority: 2 SortPriority: 3 - Regex: '^"corecel/' diff --git a/app/celer-sim/celer-sim.cc b/app/celer-sim/celer-sim.cc index f4a1fdcc34..0c11f477c8 100644 --- a/app/celer-sim/celer-sim.cc +++ b/app/celer-sim/celer-sim.cc @@ -23,7 +23,7 @@ #include #include "corecel/Config.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" #include "corecel/Version.hh" #include "corecel/io/BuildOutput.hh" diff --git a/app/demo-interactor/KNDemoKernel.thrust.cu b/app/demo-interactor/KNDemoKernel.thrust.cu index 9bdc7a1f84..30aa4eb94d 100644 --- a/app/demo-interactor/KNDemoKernel.thrust.cu +++ b/app/demo-interactor/KNDemoKernel.thrust.cu @@ -10,7 +10,7 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" namespace celeritas { diff --git a/doc/appendix/development.rst b/doc/appendix/development.rst index 259cf2aa3e..99069044f2 100644 --- a/doc/appendix/development.rst +++ b/doc/appendix/development.rst @@ -276,7 +276,7 @@ such as ``cudaMalloc`` does *not* have to be compiled with NVCC. Instead, it only has to be linked against the CUDA runtime library and include ``cuda_runtime_api.h``. The platform-agnostic Celeritas include file to use is -``corecel/device_runtime_api.h``. +``corecel/device_runtime_api.hh``. Note that VecGeom compiles differently when run through NVCC (macro magic puts much of the code in a different namespace) so its inclusion must be very carefully managed. diff --git a/scripts/dev/celeritas-gen.py b/scripts/dev/celeritas-gen.py index de38679474..76dcce8400 100755 --- a/scripts/dev/celeritas-gen.py +++ b/scripts/dev/celeritas-gen.py @@ -240,8 +240,8 @@ class {name}Test : public ::celeritas::test::Test TEST_CODE_FILE = '''\ #include "{name}.test.hh" -#include "corecel/device_runtime_api.h" -#include "corecel/Types.h" +#include "corecel/device_runtime_api.hh" +#include "corecel/Types.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/Device.hh" diff --git a/src/celeritas/global/ActionLauncher.device.hh b/src/celeritas/global/ActionLauncher.device.hh index eb19af4b0e..e18861bafa 100644 --- a/src/celeritas/global/ActionLauncher.device.hh +++ b/src/celeritas/global/ActionLauncher.device.hh @@ -9,21 +9,23 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" -#include "corecel/Types.hh" #include "corecel/cont/Range.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "corecel/sys/Stream.hh" #include "corecel/sys/ThreadId.hh" +#include "corecel/Types.hh" #include "celeritas/track/TrackInitParams.hh" #include "ActionInterface.hh" #include "CoreParams.hh" #include "CoreState.hh" #include "KernelContextException.hh" + #include "detail/ActionLauncherKernel.device.hh" #include "detail/ApplierTraits.hh" diff --git a/src/celeritas/global/detail/ActionSequence.cc b/src/celeritas/global/detail/ActionSequence.cc index 7dd2e4ed7c..c11dca3e5c 100644 --- a/src/celeritas/global/detail/ActionSequence.cc +++ b/src/celeritas/global/detail/ActionSequence.cc @@ -11,14 +11,15 @@ #include #include -#include "corecel/device_runtime_api.h" -#include "corecel/Types.hh" +#include "corecel/device_runtime_api.hh" + #include "corecel/cont/EnumArray.hh" #include "corecel/cont/Range.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/Stopwatch.hh" #include "corecel/sys/Stream.hh" +#include "corecel/Types.hh" #include "celeritas/global/CoreParams.hh" #include "celeritas/track/StatusChecker.hh" diff --git a/src/celeritas/random/CuHipRngData.hh b/src/celeritas/random/CuHipRngData.hh index b0bf173715..918271361c 100644 --- a/src/celeritas/random/CuHipRngData.hh +++ b/src/celeritas/random/CuHipRngData.hh @@ -10,7 +10,7 @@ #include #include "corecel/Config.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" #include "corecel/data/Collection.hh" diff --git a/src/celeritas/random/RngReseed.cu b/src/celeritas/random/RngReseed.cu index d8675b2b1a..2bd2264997 100644 --- a/src/celeritas/random/RngReseed.cu +++ b/src/celeritas/random/RngReseed.cu @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "RngReseed.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/src/celeritas/random/detail/CuHipRngStateInit.cu b/src/celeritas/random/detail/CuHipRngStateInit.cu index 5e7472bdc7..d82b109288 100644 --- a/src/celeritas/random/detail/CuHipRngStateInit.cu +++ b/src/celeritas/random/detail/CuHipRngStateInit.cu @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "CuHipRngStateInit.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/src/celeritas/track/StatusChecker.cu b/src/celeritas/track/StatusChecker.cu index fb53f4ce49..a4f798709e 100644 --- a/src/celeritas/track/StatusChecker.cu +++ b/src/celeritas/track/StatusChecker.cu @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "StatusChecker.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/sys/Stream.hh" #include "celeritas/global/ActionLauncher.device.hh" diff --git a/src/celeritas/user/detail/SimpleCaloImpl.cu b/src/celeritas/user/detail/SimpleCaloImpl.cu index 292f7e8f54..971b706929 100644 --- a/src/celeritas/user/detail/SimpleCaloImpl.cu +++ b/src/celeritas/user/detail/SimpleCaloImpl.cu @@ -7,11 +7,12 @@ //---------------------------------------------------------------------------// #include "SimpleCaloImpl.hh" -#include "corecel/device_runtime_api.h" -#include "corecel/Types.hh" +#include "corecel/device_runtime_api.hh" + #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/Stream.hh" +#include "corecel/Types.hh" #include "SimpleCaloExecutor.hh" // IWYU pragma: associated diff --git a/src/corecel/Assert.hh b/src/corecel/Assert.hh index b54bbcbae8..0c0bd6e311 100644 --- a/src/corecel/Assert.hh +++ b/src/corecel/Assert.hh @@ -259,7 +259,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/device_runtime_api.h . + * corecel/device_runtime_api.hh . */ #if CELERITAS_USE_CUDA # define CELER_CUDA_CALL(STATEMENT) \ @@ -296,7 +296,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/device_runtime_api.h . The \c celeritas_device_runtime_api_h_ + * corecel/device_runtime_api.hh . The \c celeritas_device_runtime_api_h_ * declaration enforces this when HIP is disabled. */ #if CELERITAS_USE_HIP @@ -334,7 +334,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/device_runtime_api.h . The \c celeritas_device_runtime_api_h_ + * corecel/device_runtime_api.hh . The \c celeritas_device_runtime_api_h_ * declaration enforces this when CUDA/HIP are disabled. */ #if CELERITAS_USE_CUDA diff --git a/src/corecel/data/Copier.cc b/src/corecel/data/Copier.cc index d3838b4840..9ae9825ad6 100644 --- a/src/corecel/data/Copier.cc +++ b/src/corecel/data/Copier.cc @@ -9,7 +9,8 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Macros.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Stream.hh" diff --git a/src/corecel/data/DeviceAllocation.cc b/src/corecel/data/DeviceAllocation.cc index d96dd1782d..2e96500b52 100644 --- a/src/corecel/data/DeviceAllocation.cc +++ b/src/corecel/data/DeviceAllocation.cc @@ -7,13 +7,14 @@ //---------------------------------------------------------------------------// #include "DeviceAllocation.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" -#include "corecel/Types.hh" #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Stream.hh" +#include "corecel/Types.hh" namespace celeritas { diff --git a/src/corecel/data/PinnedAllocator.t.hh b/src/corecel/data/PinnedAllocator.t.hh index 3c38ffcfb4..5b806e24a6 100644 --- a/src/corecel/data/PinnedAllocator.t.hh +++ b/src/corecel/data/PinnedAllocator.t.hh @@ -12,10 +12,11 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" namespace celeritas diff --git a/src/corecel/data/detail/Filler.device.t.hh b/src/corecel/data/detail/Filler.device.t.hh index ce1eaf594c..d5d160ca21 100644 --- a/src/corecel/data/detail/Filler.device.t.hh +++ b/src/corecel/data/detail/Filler.device.t.hh @@ -14,7 +14,8 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/sys/Thrust.device.hh" namespace celeritas diff --git a/src/corecel/device_runtime_api.h b/src/corecel/device_runtime_api.hh similarity index 89% rename from src/corecel/device_runtime_api.h rename to src/corecel/device_runtime_api.hh index 0e4c4112c6..51862082e8 100644 --- a/src/corecel/device_runtime_api.h +++ b/src/corecel/device_runtime_api.hh @@ -1,14 +1,13 @@ -/*-----------------------------------*-C-*----------------------------------- +/*-----------------------------------*-C++-*----------------------------------- * Copyright 2022-2024 UT-Battelle, LLC, and other Celeritas developers. * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ /*! - * \file corecel/device_runtime_api.h + * \file corecel/device_runtime_api.hh * Include CUDA or HIP runtime APIs for compiling with host/cc compiler. */ -#ifndef CELERITAS_DEVICE_RUNTIME_API_H -#define CELERITAS_DEVICE_RUNTIME_API_H +#pragma once #include "corecel/Config.hh" @@ -63,5 +62,3 @@ * won't include this file automatically.) */ extern int celeritas_device_runtime_api_h_; - -#endif /* CELERITAS_DEVICE_RUNTIME_API_H */ diff --git a/src/corecel/sys/Device.cc b/src/corecel/sys/Device.cc index 41ca5bf5d3..e1937d5d55 100644 --- a/src/corecel/sys/Device.cc +++ b/src/corecel/sys/Device.cc @@ -19,7 +19,8 @@ # include #endif -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeLog.hh" @@ -27,6 +28,7 @@ #include "Environment.hh" #include "MpiCommunicator.hh" #include "Stream.hh" + #include "detail/StreamStorage.hh" #if CELERITAS_USE_CUDA @@ -215,7 +217,7 @@ Device::Device(int id) : id_{id}, streams_{new detail::StreamStorage{}} mempool, CELER_DEVICE_PREFIX(MemPoolAttrReleaseThreshold), &threshold)); #endif - // See device_runtime_api.h + // See device_runtime_api.hh eu_per_cu_ = CELER_EU_PER_CU; CELER_ENSURE(*this); diff --git a/src/corecel/sys/KernelAttributes.hh b/src/corecel/sys/KernelAttributes.hh index 5ef6428c55..828ce2fa11 100644 --- a/src/corecel/sys/KernelAttributes.hh +++ b/src/corecel/sys/KernelAttributes.hh @@ -18,7 +18,7 @@ #include "Device.hh" #if CELER_DEVICE_SOURCE -# include "corecel/device_runtime_api.h" +# include "corecel/device_runtime_api.hh" #endif namespace celeritas diff --git a/src/corecel/sys/KernelParamCalculator.device.hh b/src/corecel/sys/KernelParamCalculator.device.hh index 9bf5efd35c..0ada0f0a18 100644 --- a/src/corecel/sys/KernelParamCalculator.device.hh +++ b/src/corecel/sys/KernelParamCalculator.device.hh @@ -10,12 +10,13 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" +#include "corecel/math/Algorithms.hh" #include "corecel/OpaqueId.hh" #include "corecel/Types.hh" -#include "corecel/math/Algorithms.hh" #include "Device.hh" #include "KernelAttributes.hh" diff --git a/src/corecel/sys/ScopedLimitSaver.hh b/src/corecel/sys/ScopedLimitSaver.hh index 98044ea541..194979f212 100644 --- a/src/corecel/sys/ScopedLimitSaver.hh +++ b/src/corecel/sys/ScopedLimitSaver.hh @@ -9,11 +9,12 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" #include "corecel/cont/Array.hh" #include "corecel/io/Logger.hh" +#include "corecel/Macros.hh" namespace celeritas { diff --git a/src/corecel/sys/ScopedMem.cc b/src/corecel/sys/ScopedMem.cc index 16e0095dd3..6e10bd597a 100644 --- a/src/corecel/sys/ScopedMem.cc +++ b/src/corecel/sys/ScopedMem.cc @@ -20,7 +20,8 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/math/Quantity.hh" diff --git a/src/corecel/sys/Stream.hh b/src/corecel/sys/Stream.hh index 5ec1309a5c..52e1e155d1 100644 --- a/src/corecel/sys/Stream.hh +++ b/src/corecel/sys/Stream.hh @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #pragma once -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" diff --git a/src/geocel/vg/VecgeomParams.cc b/src/geocel/vg/VecgeomParams.cc index c310e9ea00..40dcc6b171 100644 --- a/src/geocel/vg/VecgeomParams.cc +++ b/src/geocel/vg/VecgeomParams.cc @@ -28,24 +28,26 @@ # include #endif -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" -#include "corecel/Macros.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeAndRedirect.hh" #include "corecel/io/StringUtils.hh" +#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/ScopedLimitSaver.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" -#include "geocel/GeantGeoUtils.hh" #include "geocel/detail/LengthUnits.hh" #include "geocel/g4vg/Converter.hh" +#include "geocel/GeantGeoUtils.hh" #include "VecgeomData.hh" // IWYU pragma: associated + #include "detail/VecgeomCompatibility.hh" #ifdef VECGEOM_USE_SURF diff --git a/test/celeritas/geo/HeuristicGeoTestBase.cu b/test/celeritas/geo/HeuristicGeoTestBase.cu index f003828660..8ee87e8a6f 100644 --- a/test/celeritas/geo/HeuristicGeoTestBase.cu +++ b/test/celeritas/geo/HeuristicGeoTestBase.cu @@ -5,11 +5,12 @@ //---------------------------------------------------------------------------// //! \file celeritas/geo/HeuristicGeoTestBase.cu //---------------------------------------------------------------------------// -#include "corecel/device_runtime_api.h" -#include "corecel/Types.hh" +#include "corecel/device_runtime_api.hh" + #include "corecel/data/detail/Filler.device.t.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" +#include "corecel/Types.hh" #include "HeuristicGeoExecutor.hh" diff --git a/test/celeritas/mat/Material.test.cu b/test/celeritas/mat/Material.test.cu index 9dc4c1fd3b..9eb56fea47 100644 --- a/test/celeritas/mat/Material.test.cu +++ b/test/celeritas/mat/Material.test.cu @@ -9,13 +9,14 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/cont/Range.hh" #include "corecel/math/Quantity.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" -#include "celeritas/Quantities.hh" #include "celeritas/mat/MaterialTrackView.hh" +#include "celeritas/Quantities.hh" using thrust::raw_pointer_cast; diff --git a/test/celeritas/phys/Particle.test.cu b/test/celeritas/phys/Particle.test.cu index d99bef8548..29c654933e 100644 --- a/test/celeritas/phys/Particle.test.cu +++ b/test/celeritas/phys/Particle.test.cu @@ -9,13 +9,14 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/math/Quantity.hh" #include "corecel/math/UnitUtils.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" -#include "celeritas/UnitTypes.hh" #include "celeritas/phys/ParticleTrackView.hh" +#include "celeritas/UnitTypes.hh" using thrust::raw_pointer_cast; diff --git a/test/celeritas/phys/Physics.test.cu b/test/celeritas/phys/Physics.test.cu index c4b3787f6f..4039bf5e4b 100644 --- a/test/celeritas/phys/Physics.test.cu +++ b/test/celeritas/phys/Physics.test.cu @@ -7,12 +7,13 @@ //---------------------------------------------------------------------------// #include "Physics.test.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" -#include "celeritas/Quantities.hh" #include "celeritas/phys/PhysicsStepView.hh" #include "celeritas/phys/PhysicsTrackView.hh" +#include "celeritas/Quantities.hh" namespace celeritas { diff --git a/test/celeritas/random/RngEngine.test.cu b/test/celeritas/random/RngEngine.test.cu index 64a1bf7d1c..f0b434da06 100644 --- a/test/celeritas/random/RngEngine.test.cu +++ b/test/celeritas/random/RngEngine.test.cu @@ -11,7 +11,8 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/corecel/cont/Range.test.cu b/test/corecel/cont/Range.test.cu index a2d89bc1f9..dce8709339 100644 --- a/test/corecel/cont/Range.test.cu +++ b/test/corecel/cont/Range.test.cu @@ -9,7 +9,8 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" #include "corecel/sys/Device.hh" diff --git a/test/corecel/data/Collection.test.cu b/test/corecel/data/Collection.test.cu index fd067cbfd9..8fd80dbd0c 100644 --- a/test/corecel/data/Collection.test.cu +++ b/test/corecel/data/Collection.test.cu @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "Collection.test.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/corecel/data/ObserverPtr.test.cu b/test/corecel/data/ObserverPtr.test.cu index 245b2a8a0e..76786e300f 100644 --- a/test/corecel/data/ObserverPtr.test.cu +++ b/test/corecel/data/ObserverPtr.test.cu @@ -9,7 +9,8 @@ #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/data/ObserverPtr.device.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/corecel/data/StackAllocator.test.cu b/test/corecel/data/StackAllocator.test.cu index 9c4ba1bfc8..ceefc68edb 100644 --- a/test/corecel/data/StackAllocator.test.cu +++ b/test/corecel/data/StackAllocator.test.cu @@ -11,7 +11,8 @@ #include #include -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/data/StackAllocator.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/corecel/math/NumericLimits.test.cu b/test/corecel/math/NumericLimits.test.cu index 7e379ae874..80fca7765a 100644 --- a/test/corecel/math/NumericLimits.test.cu +++ b/test/corecel/math/NumericLimits.test.cu @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "NumericLimits.test.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/Assert.hh" #include "corecel/math/NumericLimits.hh" #include "corecel/sys/Device.hh" diff --git a/test/orange/surf/LocalSurfaceVisitor.test.cu b/test/orange/surf/LocalSurfaceVisitor.test.cu index 79546e6f9b..08b3b958f6 100644 --- a/test/orange/surf/LocalSurfaceVisitor.test.cu +++ b/test/orange/surf/LocalSurfaceVisitor.test.cu @@ -7,7 +7,8 @@ //---------------------------------------------------------------------------// #include "LocalSurfaceVisitor.test.hh" -#include "corecel/device_runtime_api.h" +#include "corecel/device_runtime_api.hh" + #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" From 5610f53cdae3399e8a0d55a77a51dfde00dd3d19 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 16:25:31 -0700 Subject: [PATCH 10/29] case-sensitive sort to preserve directory order --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index b4a39967bf..4ae207aa96 100644 --- a/.clang-format +++ b/.clang-format @@ -142,7 +142,7 @@ PenaltyReturnTypeOnItsOwnLine: 10 PointerAlignment: Left QualifierAlignment: Right ReflowComments: true -SortIncludes: CaseInsensitive +SortIncludes: CaseSensitive SortUsingDeclarations: true SpaceAfterCStyleCast: false SpaceAfterTemplateKeyword: false From 5bcd10125fd05a960418f7d25c152d213151ff9f Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 16:39:14 -0700 Subject: [PATCH 11/29] cleanup duplicate --- interface/celeritas.i | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/interface/celeritas.i b/interface/celeritas.i index 4a11d0e06a..a06ee910e8 100644 --- a/interface/celeritas.i +++ b/interface/celeritas.i @@ -19,14 +19,12 @@ // CONFIG FILE //---------------------------------------------------------------------------// %{ -#include "corecel/Version.hh" -#include "corecel/Config.hh" #include "corecel/Config.hh" +#include "corecel/Version.hh" %} -%include "corecel/Version.hh" -%include "corecel/Config.hh" %include "corecel/Config.hh" +%include "corecel/Version.hh" //---------------------------------------------------------------------------// // ASSERTIONS From 48506e59081747fa14618b2eaa9f5cb0ea8d94a7 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 17:02:07 -0700 Subject: [PATCH 12/29] sort headers --- app/celer-g4/RunAction.cc | 2 +- app/celer-g4/celer-g4.cc | 6 +++--- app/celer-sim/RunnerInput.hh | 6 +++--- app/celer-sim/RunnerInputIO.json.cc | 2 +- app/celer-sim/celer-sim.cc | 2 +- app/demo-geo-check/demo-geo-check.cc | 2 +- app/demo-interactor/demo-interactor.cc | 3 ++- app/demo-interactor/host-demo-interactor.cc | 9 +++++---- src/accel/ExceptionConverter.cc | 4 ++-- src/accel/GeantSimpleCalo.cc | 2 +- src/accel/LocalTransporter.cc | 6 +++--- src/accel/SharedParams.cc | 4 ++-- src/accel/detail/HitManager.cc | 2 +- src/celeritas/em/model/CoulombScatteringModel.cc | 4 ++-- src/celeritas/em/model/LivermorePEModel.cc | 2 +- src/celeritas/em/model/SeltzerBergerModel.cc | 2 +- src/celeritas/ext/GeantImporter.cc | 8 ++++---- src/celeritas/global/ActionLauncher.device.hh | 2 +- src/celeritas/global/ActionLauncher.hh | 2 +- src/celeritas/global/CoreParams.cc | 4 ++-- .../global/detail/ActionLauncherKernel.device.hh | 2 +- src/celeritas/global/detail/ActionSequence.cc | 2 +- src/celeritas/phys/Interaction.hh | 2 +- src/celeritas/phys/PhysicsTrackView.hh | 4 ++-- src/celeritas/phys/detail/PreStepExecutor.hh | 4 ++-- src/celeritas/random/CuHipRngData.hh | 4 ++-- src/celeritas/user/detail/SimpleCaloImpl.cc | 2 +- src/celeritas/user/detail/SimpleCaloImpl.cu | 2 +- src/corecel/data/DeviceAllocation.cc | 4 ++-- src/corecel/data/PinnedAllocator.t.hh | 2 +- src/corecel/sys/KernelParamCalculator.device.hh | 2 +- src/corecel/sys/ScopedLimitSaver.hh | 2 +- src/corecel/sys/ScopedProfiling.cc | 2 +- src/corecel/sys/ScopedProfiling.hh | 2 +- src/corecel/sys/Version.cc | 3 ++- src/geocel/vg/VecgeomParams.cc | 4 ++-- src/orange/OrangeParams.cc | 2 +- test/accel/detail/HitManager.test.cc | 4 ++-- test/celeritas/ext/GeantImporter.test.cc | 2 +- test/celeritas/field/FieldPropagator.test.cc | 8 ++++---- test/celeritas/field/Steppers.test.cc | 8 ++++---- test/celeritas/geo/Geometry.test.cc | 2 +- test/celeritas/geo/HeuristicGeoTestBase.cu | 2 +- test/celeritas/global/AlongStep.test.cc | 10 +++++----- test/celeritas/io/EventIO.test.cc | 2 +- test/celeritas/mat/Material.test.cu | 2 +- test/celeritas/phys/Particle.test.cc | 2 +- test/celeritas/phys/Particle.test.cu | 2 +- test/celeritas/phys/Physics.test.cu | 2 +- test/celeritas/random/RngEngine.test.cc | 6 +++--- test/celeritas/user/Diagnostic.test.cc | 6 +++--- test/geocel/UnitUtils.hh | 2 +- test/geocel/g4/GeantGeo.test.cc | 8 ++++---- test/geocel/vg/Vecgeom.test.cc | 4 ++-- test/orange/Orange.test.cc | 2 +- test/orange/OrangeGeant.test.cc | 2 +- test/orange/OrangeGeoTestBase.cc | 4 ++-- test/orange/surf/ConeAligned.test.cc | 2 +- test/orange/univ/RectArrayTracker.test.cc | 4 ++-- test/orange/univ/SimpleUnitTracker.test.cc | 4 ++-- test/testdetail/TestMacrosImpl.hh | 2 +- test/testdetail/TestMainImpl.cc | 2 +- 62 files changed, 108 insertions(+), 105 deletions(-) diff --git a/app/celer-g4/RunAction.cc b/app/celer-g4/RunAction.cc index 20e636ba96..ac4d17c3d5 100644 --- a/app/celer-g4/RunAction.cc +++ b/app/celer-g4/RunAction.cc @@ -18,8 +18,8 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" -#include "corecel/io/Logger.hh" #include "corecel/Macros.hh" +#include "corecel/io/Logger.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "celeritas/ext/GeantSetup.hh" #include "accel/ExceptionConverter.hh" diff --git a/app/celer-g4/celer-g4.cc b/app/celer-g4/celer-g4.cc index edb1433959..c07aa80700 100644 --- a/app/celer-g4/celer-g4.cc +++ b/app/celer-g4/celer-g4.cc @@ -35,12 +35,12 @@ #include "corecel/Version.hh" #include "corecel/Assert.hh" +#include "corecel/Macros.hh" #include "corecel/io/ExceptionOutput.hh" #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeAndRedirect.hh" #include "corecel/io/ScopedTimeLog.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/Macros.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMem.hh" @@ -50,10 +50,10 @@ #include "geocel/GeantUtils.hh" #include "geocel/ScopedGeantExceptionHandler.hh" #include "geocel/ScopedGeantLogger.hh" -#include "celeritas/ext/detail/CelerEmPhysicsList.hh" -#include "celeritas/ext/detail/CelerFTFPBert.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/ext/ScopedRootErrorHandler.hh" +#include "celeritas/ext/detail/CelerEmPhysicsList.hh" +#include "celeritas/ext/detail/CelerFTFPBert.hh" #include "accel/SharedParams.hh" #include "ActionInitialization.hh" diff --git a/app/celer-sim/RunnerInput.hh b/app/celer-sim/RunnerInput.hh index fd5dda668b..dbb296a4bb 100644 --- a/app/celer-sim/RunnerInput.hh +++ b/app/celer-sim/RunnerInput.hh @@ -9,16 +9,16 @@ #include "corecel/Config.hh" -#include "corecel/io/Label.hh" #include "corecel/Macros.hh" -#include "corecel/sys/Environment.hh" #include "corecel/Types.hh" +#include "corecel/io/Label.hh" +#include "corecel/sys/Environment.hh" +#include "celeritas/Types.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/ext/GeantSetup.hh" #include "celeritas/ext/RootFileManager.hh" #include "celeritas/field/FieldDriverOptions.hh" #include "celeritas/phys/PrimaryGeneratorOptions.hh" -#include "celeritas/Types.hh" #include "celeritas/user/RootStepWriter.hh" #ifdef _WIN32 diff --git a/app/celer-sim/RunnerInputIO.json.cc b/app/celer-sim/RunnerInputIO.json.cc index 4dcefa4ae5..5fbf4a7305 100644 --- a/app/celer-sim/RunnerInputIO.json.cc +++ b/app/celer-sim/RunnerInputIO.json.cc @@ -17,10 +17,10 @@ #include "corecel/io/StringEnumMapper.hh" #include "corecel/io/StringUtils.hh" #include "corecel/sys/EnvironmentIO.json.hh" +#include "celeritas/Types.hh" #include "celeritas/ext/GeantPhysicsOptionsIO.json.hh" #include "celeritas/field/FieldDriverOptionsIO.json.hh" #include "celeritas/phys/PrimaryGeneratorOptionsIO.json.hh" -#include "celeritas/Types.hh" #include "celeritas/user/RootStepWriterIO.json.hh" namespace celeritas diff --git a/app/celer-sim/celer-sim.cc b/app/celer-sim/celer-sim.cc index 0c11f477c8..30fa3995c3 100644 --- a/app/celer-sim/celer-sim.cc +++ b/app/celer-sim/celer-sim.cc @@ -23,8 +23,8 @@ #include #include "corecel/Config.hh" -#include "corecel/device_runtime_api.hh" #include "corecel/Version.hh" +#include "corecel/device_runtime_api.hh" #include "corecel/io/BuildOutput.hh" #include "corecel/io/ExceptionOutput.hh" diff --git a/app/demo-geo-check/demo-geo-check.cc b/app/demo-geo-check/demo-geo-check.cc index fc612610a4..876167fb87 100644 --- a/app/demo-geo-check/demo-geo-check.cc +++ b/app/demo-geo-check/demo-geo-check.cc @@ -20,13 +20,13 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" +#include "corecel/Types.hh" #include "corecel/cont/ArrayIO.json.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Label.hh" #include "corecel/io/Logger.hh" #include "corecel/math/ArrayUtils.hh" #include "corecel/sys/Device.hh" -#include "corecel/Types.hh" #include "geocel/Types.hh" #include "celeritas/geo/GeoFwd.hh" diff --git a/app/demo-interactor/demo-interactor.cc b/app/demo-interactor/demo-interactor.cc index 18c98be3ee..afc001045a 100644 --- a/app/demo-interactor/demo-interactor.cc +++ b/app/demo-interactor/demo-interactor.cc @@ -14,6 +14,8 @@ #include #include +#include "corecel/Version.hh" + #include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/DeviceIO.json.hh" @@ -21,7 +23,6 @@ #include "corecel/sys/KernelRegistryIO.json.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMpiInit.hh" -#include "corecel/Version.hh" #include "celeritas/phys/ParticleParams.hh" #include "KNDemoIO.hh" diff --git a/app/demo-interactor/host-demo-interactor.cc b/app/demo-interactor/host-demo-interactor.cc index 4b14359f73..90c738199b 100644 --- a/app/demo-interactor/host-demo-interactor.cc +++ b/app/demo-interactor/host-demo-interactor.cc @@ -15,6 +15,8 @@ #include #include +#include "corecel/Version.hh" + #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" @@ -23,12 +25,11 @@ #include "corecel/sys/KernelRegistryIO.json.hh" #include "corecel/sys/MpiCommunicator.hh" #include "corecel/sys/ScopedMpiInit.hh" -#include "corecel/Version.hh" -#include "celeritas/phys/ParticleData.hh" -#include "celeritas/phys/ParticleParams.hh" -#include "celeritas/phys/PDGNumber.hh" #include "celeritas/Quantities.hh" #include "celeritas/Units.hh" +#include "celeritas/phys/PDGNumber.hh" +#include "celeritas/phys/ParticleData.hh" +#include "celeritas/phys/ParticleParams.hh" #include "DetectorData.hh" #include "HostKNDemoRunner.hh" diff --git a/src/accel/ExceptionConverter.cc b/src/accel/ExceptionConverter.cc index a849b99580..bc774fc2e9 100644 --- a/src/accel/ExceptionConverter.cc +++ b/src/accel/ExceptionConverter.cc @@ -16,11 +16,11 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" +#include "corecel/Macros.hh" +#include "corecel/OpaqueIdIO.hh" #include "corecel/cont/ArrayIO.hh" #include "corecel/io/Logger.hh" -#include "corecel/Macros.hh" #include "corecel/math/QuantityIO.hh" -#include "corecel/OpaqueIdIO.hh" #include "corecel/sys/Environment.hh" #include "celeritas/geo/GeoMaterialParams.hh" #include "celeritas/geo/GeoParams.hh" diff --git a/src/accel/GeantSimpleCalo.cc b/src/accel/GeantSimpleCalo.cc index 792e96d67b..8005b7e8e7 100644 --- a/src/accel/GeantSimpleCalo.cc +++ b/src/accel/GeantSimpleCalo.cc @@ -15,9 +15,9 @@ #include "corecel/io/JsonPimpl.hh" #include "corecel/io/LabelIO.json.hh" #include "corecel/io/Logger.hh" -#include "geocel/g4/GeantGeoParams.hh" #include "geocel/GeantGeoUtils.hh" #include "geocel/GeantUtils.hh" +#include "geocel/g4/GeantGeoParams.hh" #include "SharedParams.hh" diff --git a/src/accel/LocalTransporter.cc b/src/accel/LocalTransporter.cc index 581485a525..a85b039dc3 100644 --- a/src/accel/LocalTransporter.cc +++ b/src/accel/LocalTransporter.cc @@ -28,15 +28,15 @@ #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/ScopedSignalHandler.hh" -#include "geocel/g4/Convert.geant.hh" #include "geocel/GeantUtils.hh" +#include "geocel/g4/Convert.geant.hh" +#include "celeritas/Quantities.hh" #include "celeritas/ext/GeantUnits.hh" #include "celeritas/global/detail/ActionSequence.hh" #include "celeritas/io/EventWriter.hh" #include "celeritas/io/RootEventWriter.hh" -#include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep #include "celeritas/phys/PDGNumber.hh" -#include "celeritas/Quantities.hh" +#include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep #include "SetupOptions.hh" #include "SharedParams.hh" diff --git a/src/accel/SharedParams.cc b/src/accel/SharedParams.cc index 78ac646ac9..0420092970 100644 --- a/src/accel/SharedParams.cc +++ b/src/accel/SharedParams.cc @@ -34,8 +34,9 @@ #include "corecel/sys/KernelRegistry.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" -#include "geocel/g4/GeantGeoParams.hh" #include "geocel/GeantUtils.hh" +#include "geocel/g4/GeantGeoParams.hh" +#include "celeritas/Types.hh" #include "celeritas/em/params/WentzelOKVIParams.hh" #include "celeritas/ext/GeantImporter.hh" #include "celeritas/ext/RootExporter.hh" @@ -55,7 +56,6 @@ #include "celeritas/random/RngParams.hh" #include "celeritas/track/SimParams.hh" #include "celeritas/track/TrackInitParams.hh" -#include "celeritas/Types.hh" #include "celeritas/user/StepCollector.hh" #include "AlongStepFactory.hh" diff --git a/src/accel/detail/HitManager.cc b/src/accel/detail/HitManager.cc index 9542540cf5..386e045037 100644 --- a/src/accel/detail/HitManager.cc +++ b/src/accel/detail/HitManager.cc @@ -20,10 +20,10 @@ #include "corecel/cont/Range.hh" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" +#include "celeritas/Types.hh" #include "celeritas/ext/GeantSetup.hh" #include "celeritas/geo/GeoParams.hh" // IWYU pragma: keep #include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep -#include "celeritas/Types.hh" #include "HitProcessor.hh" #include "SensDetInserter.hh" diff --git a/src/celeritas/em/model/CoulombScatteringModel.cc b/src/celeritas/em/model/CoulombScatteringModel.cc index 88820221ea..0bfb518861 100644 --- a/src/celeritas/em/model/CoulombScatteringModel.cc +++ b/src/celeritas/em/model/CoulombScatteringModel.cc @@ -12,6 +12,7 @@ #include "corecel/Config.hh" #include "celeritas/Constants.hh" +#include "celeritas/Units.hh" #include "celeritas/em/data/CoulombScatteringData.hh" #include "celeritas/em/executor/CoulombScatteringExecutor.hh" #include "celeritas/em/interactor/detail/PhysicsConstants.hh" @@ -23,9 +24,8 @@ #include "celeritas/io/ImportProcess.hh" #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/InteractionApplier.hh" -#include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/PDGNumber.hh" -#include "celeritas/Units.hh" +#include "celeritas/phys/ParticleParams.hh" namespace celeritas { diff --git a/src/celeritas/em/model/LivermorePEModel.cc b/src/celeritas/em/model/LivermorePEModel.cc index aadf9831cb..c5361926b7 100644 --- a/src/celeritas/em/model/LivermorePEModel.cc +++ b/src/celeritas/em/model/LivermorePEModel.cc @@ -25,9 +25,9 @@ #include "celeritas/mat/ElementView.hh" #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/InteractionApplier.hh" +#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/ParticleView.hh" -#include "celeritas/phys/PDGNumber.hh" #include "detail/LivermoreXsInserter.hh" diff --git a/src/celeritas/em/model/SeltzerBergerModel.cc b/src/celeritas/em/model/SeltzerBergerModel.cc index 54afac3542..894cd3ed1f 100644 --- a/src/celeritas/em/model/SeltzerBergerModel.cc +++ b/src/celeritas/em/model/SeltzerBergerModel.cc @@ -29,9 +29,9 @@ #include "celeritas/io/ImportProcess.hh" #include "celeritas/mat/MaterialParams.hh" #include "celeritas/phys/InteractionApplier.hh" // IWYU pragma: associated +#include "celeritas/phys/PDGNumber.hh" #include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/ParticleView.hh" -#include "celeritas/phys/PDGNumber.hh" namespace celeritas { diff --git a/src/celeritas/ext/GeantImporter.cc b/src/celeritas/ext/GeantImporter.cc index 6628420c66..15c9996b5e 100644 --- a/src/celeritas/ext/GeantImporter.cc +++ b/src/celeritas/ext/GeantImporter.cc @@ -38,22 +38,22 @@ #include #include #include -#include -#include #include #include #include #include +#include +#include #include #include #include #include #include -#include #include #include #include #include +#include #include "corecel/Config.hh" @@ -65,9 +65,9 @@ #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/TypeDemangler.hh" -#include "geocel/g4/VisitGeantVolumes.hh" #include "geocel/GeantGeoUtils.hh" #include "geocel/ScopedGeantExceptionHandler.hh" +#include "geocel/g4/VisitGeantVolumes.hh" #include "celeritas/io/AtomicRelaxationReader.hh" #include "celeritas/io/ImportData.hh" #include "celeritas/io/LivermorePEReader.hh" diff --git a/src/celeritas/global/ActionLauncher.device.hh b/src/celeritas/global/ActionLauncher.device.hh index e18861bafa..4701312213 100644 --- a/src/celeritas/global/ActionLauncher.device.hh +++ b/src/celeritas/global/ActionLauncher.device.hh @@ -12,13 +12,13 @@ #include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" +#include "corecel/Types.hh" #include "corecel/cont/Range.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "corecel/sys/Stream.hh" #include "corecel/sys/ThreadId.hh" -#include "corecel/Types.hh" #include "celeritas/track/TrackInitParams.hh" #include "ActionInterface.hh" diff --git a/src/celeritas/global/ActionLauncher.hh b/src/celeritas/global/ActionLauncher.hh index f09c56402b..6d89c47cee 100644 --- a/src/celeritas/global/ActionLauncher.hh +++ b/src/celeritas/global/ActionLauncher.hh @@ -10,9 +10,9 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" +#include "corecel/Types.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "corecel/sys/ThreadId.hh" -#include "corecel/Types.hh" #include "ActionInterface.hh" #include "CoreParams.hh" diff --git a/src/celeritas/global/CoreParams.cc b/src/celeritas/global/CoreParams.cc index 370c1e2643..f96ded38d4 100644 --- a/src/celeritas/global/CoreParams.cc +++ b/src/celeritas/global/CoreParams.cc @@ -31,17 +31,17 @@ #include "corecel/sys/ScopedMem.hh" #include "geocel/GeoParamsOutput.hh" #include "celeritas/em/params/WentzelOKVIParams.hh" -#include "celeritas/geo/detail/BoundaryAction.hh" #include "celeritas/geo/GeoMaterialParams.hh" // IWYU pragma: keep #include "celeritas/geo/GeoParams.hh" // IWYU pragma: keep +#include "celeritas/geo/detail/BoundaryAction.hh" #include "celeritas/mat/MaterialParams.hh" // IWYU pragma: keep #include "celeritas/mat/MaterialParamsOutput.hh" #include "celeritas/phys/CutoffParams.hh" // IWYU pragma: keep -#include "celeritas/phys/detail/TrackingCutAction.hh" #include "celeritas/phys/ParticleParams.hh" // IWYU pragma: keep #include "celeritas/phys/ParticleParamsOutput.hh" #include "celeritas/phys/PhysicsParams.hh" // IWYU pragma: keep #include "celeritas/phys/PhysicsParamsOutput.hh" +#include "celeritas/phys/detail/TrackingCutAction.hh" #include "celeritas/random/RngParams.hh" // IWYU pragma: keep #include "celeritas/track/ExtendFromPrimariesAction.hh" #include "celeritas/track/ExtendFromSecondariesAction.hh" diff --git a/src/celeritas/global/detail/ActionLauncherKernel.device.hh b/src/celeritas/global/detail/ActionLauncherKernel.device.hh index a389ab7899..d1ed3f256b 100644 --- a/src/celeritas/global/detail/ActionLauncherKernel.device.hh +++ b/src/celeritas/global/detail/ActionLauncherKernel.device.hh @@ -9,8 +9,8 @@ #include "corecel/Config.hh" -#include "corecel/cont/Range.hh" #include "corecel/Macros.hh" +#include "corecel/cont/Range.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/ThreadId.hh" diff --git a/src/celeritas/global/detail/ActionSequence.cc b/src/celeritas/global/detail/ActionSequence.cc index c11dca3e5c..54b4e5dfe8 100644 --- a/src/celeritas/global/detail/ActionSequence.cc +++ b/src/celeritas/global/detail/ActionSequence.cc @@ -13,13 +13,13 @@ #include "corecel/device_runtime_api.hh" +#include "corecel/Types.hh" #include "corecel/cont/EnumArray.hh" #include "corecel/cont/Range.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/ScopedProfiling.hh" #include "corecel/sys/Stopwatch.hh" #include "corecel/sys/Stream.hh" -#include "corecel/Types.hh" #include "celeritas/global/CoreParams.hh" #include "celeritas/track/StatusChecker.hh" diff --git a/src/celeritas/phys/Interaction.hh b/src/celeritas/phys/Interaction.hh index 2bcfa6c0e2..1833ad10b4 100644 --- a/src/celeritas/phys/Interaction.hh +++ b/src/celeritas/phys/Interaction.hh @@ -9,11 +9,11 @@ #include "corecel/Config.hh" +#include "corecel/Types.hh" #include "corecel/cont/Array.hh" #include "corecel/cont/Span.hh" #include "corecel/math/ArrayUtils.hh" #include "corecel/math/SoftEqual.hh" -#include "corecel/Types.hh" #include "celeritas/Quantities.hh" #include "celeritas/Types.hh" diff --git a/src/celeritas/phys/PhysicsTrackView.hh b/src/celeritas/phys/PhysicsTrackView.hh index 6f09e7f398..0c51594348 100644 --- a/src/celeritas/phys/PhysicsTrackView.hh +++ b/src/celeritas/phys/PhysicsTrackView.hh @@ -12,6 +12,8 @@ #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" +#include "celeritas/Quantities.hh" +#include "celeritas/Types.hh" #include "celeritas/em/xs/EPlusGGMacroXsCalculator.hh" #include "celeritas/em/xs/LivermorePEMicroXsCalculator.hh" #include "celeritas/grid/GridIdFinder.hh" @@ -20,8 +22,6 @@ #include "celeritas/mat/TabulatedElementSelector.hh" #include "celeritas/neutron/xs/NeutronElasticMicroXsCalculator.hh" #include "celeritas/phys/MacroXsCalculator.hh" -#include "celeritas/Quantities.hh" -#include "celeritas/Types.hh" #include "PhysicsData.hh" diff --git a/src/celeritas/phys/detail/PreStepExecutor.hh b/src/celeritas/phys/detail/PreStepExecutor.hh index 796412fa62..478e41f13c 100644 --- a/src/celeritas/phys/detail/PreStepExecutor.hh +++ b/src/celeritas/phys/detail/PreStepExecutor.hh @@ -11,11 +11,11 @@ #include "corecel/Macros.hh" #include "corecel/math/Quantity.hh" +#include "celeritas/Types.hh" #include "celeritas/global/CoreTrackView.hh" -#include "celeritas/random/distribution/ExponentialDistribution.hh" #include "celeritas/random/RngEngine.hh" +#include "celeritas/random/distribution/ExponentialDistribution.hh" #include "celeritas/track/SimTrackView.hh" -#include "celeritas/Types.hh" #include "../PhysicsStepUtils.hh" // IWYU pragma: associated #include "../PhysicsStepView.hh" diff --git a/src/celeritas/random/CuHipRngData.hh b/src/celeritas/random/CuHipRngData.hh index 918271361c..e93d15a077 100644 --- a/src/celeritas/random/CuHipRngData.hh +++ b/src/celeritas/random/CuHipRngData.hh @@ -13,10 +13,10 @@ #include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" -#include "corecel/data/Collection.hh" #include "corecel/Macros.hh" -#include "corecel/sys/Device.hh" #include "corecel/Types.hh" +#include "corecel/data/Collection.hh" +#include "corecel/sys/Device.hh" /*! * \def CELER_RNG_PREFIX diff --git a/src/celeritas/user/detail/SimpleCaloImpl.cc b/src/celeritas/user/detail/SimpleCaloImpl.cc index 6852e3da59..23d61cfe3c 100644 --- a/src/celeritas/user/detail/SimpleCaloImpl.cc +++ b/src/celeritas/user/detail/SimpleCaloImpl.cc @@ -9,9 +9,9 @@ #include "corecel/Config.hh" +#include "corecel/Types.hh" #include "corecel/sys/MultiExceptionHandler.hh" #include "corecel/sys/ThreadId.hh" -#include "corecel/Types.hh" #include "SimpleCaloExecutor.hh" // IWYU pragma: associated diff --git a/src/celeritas/user/detail/SimpleCaloImpl.cu b/src/celeritas/user/detail/SimpleCaloImpl.cu index 971b706929..04defa8188 100644 --- a/src/celeritas/user/detail/SimpleCaloImpl.cu +++ b/src/celeritas/user/detail/SimpleCaloImpl.cu @@ -9,10 +9,10 @@ #include "corecel/device_runtime_api.hh" +#include "corecel/Types.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/Stream.hh" -#include "corecel/Types.hh" #include "SimpleCaloExecutor.hh" // IWYU pragma: associated diff --git a/src/corecel/data/DeviceAllocation.cc b/src/corecel/data/DeviceAllocation.cc index 2e96500b52..1521064cdf 100644 --- a/src/corecel/data/DeviceAllocation.cc +++ b/src/corecel/data/DeviceAllocation.cc @@ -10,11 +10,11 @@ #include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" -#include "corecel/io/Logger.hh" #include "corecel/Macros.hh" +#include "corecel/Types.hh" +#include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Stream.hh" -#include "corecel/Types.hh" namespace celeritas { diff --git a/src/corecel/data/PinnedAllocator.t.hh b/src/corecel/data/PinnedAllocator.t.hh index 5b806e24a6..bf45615f20 100644 --- a/src/corecel/data/PinnedAllocator.t.hh +++ b/src/corecel/data/PinnedAllocator.t.hh @@ -15,8 +15,8 @@ #include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" -#include "corecel/io/Logger.hh" #include "corecel/Macros.hh" +#include "corecel/io/Logger.hh" #include "corecel/sys/Device.hh" namespace celeritas diff --git a/src/corecel/sys/KernelParamCalculator.device.hh b/src/corecel/sys/KernelParamCalculator.device.hh index 0ada0f0a18..89a72938e4 100644 --- a/src/corecel/sys/KernelParamCalculator.device.hh +++ b/src/corecel/sys/KernelParamCalculator.device.hh @@ -14,9 +14,9 @@ #include "corecel/Assert.hh" #include "corecel/Macros.hh" -#include "corecel/math/Algorithms.hh" #include "corecel/OpaqueId.hh" #include "corecel/Types.hh" +#include "corecel/math/Algorithms.hh" #include "Device.hh" #include "KernelAttributes.hh" diff --git a/src/corecel/sys/ScopedLimitSaver.hh b/src/corecel/sys/ScopedLimitSaver.hh index 194979f212..e25ff19790 100644 --- a/src/corecel/sys/ScopedLimitSaver.hh +++ b/src/corecel/sys/ScopedLimitSaver.hh @@ -12,9 +12,9 @@ #include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" +#include "corecel/Macros.hh" #include "corecel/cont/Array.hh" #include "corecel/io/Logger.hh" -#include "corecel/Macros.hh" namespace celeritas { diff --git a/src/corecel/sys/ScopedProfiling.cc b/src/corecel/sys/ScopedProfiling.cc index 26fa6279db..ec65eddc03 100644 --- a/src/corecel/sys/ScopedProfiling.cc +++ b/src/corecel/sys/ScopedProfiling.cc @@ -11,8 +11,8 @@ #include "corecel/Config.hh" #include "corecel/sys/Config.hh" -#include "corecel/io/Logger.hh" #include "corecel/Macros.hh" +#include "corecel/io/Logger.hh" #include "Environment.hh" diff --git a/src/corecel/sys/ScopedProfiling.hh b/src/corecel/sys/ScopedProfiling.hh index a14848fab7..99022a81c1 100644 --- a/src/corecel/sys/ScopedProfiling.hh +++ b/src/corecel/sys/ScopedProfiling.hh @@ -12,8 +12,8 @@ #include "corecel/Config.hh" -#include "corecel/io/Logger.hh" #include "corecel/Macros.hh" +#include "corecel/io/Logger.hh" #include "Environment.hh" diff --git a/src/corecel/sys/Version.cc b/src/corecel/sys/Version.cc index ba9fb5bc06..4d0785b888 100644 --- a/src/corecel/sys/Version.cc +++ b/src/corecel/sys/Version.cc @@ -11,9 +11,10 @@ #include #include +#include "corecel/Version.hh" + #include "corecel/Assert.hh" #include "corecel/io/Join.hh" -#include "corecel/Version.hh" namespace celeritas { diff --git a/src/geocel/vg/VecgeomParams.cc b/src/geocel/vg/VecgeomParams.cc index 40dcc6b171..0f760583fb 100644 --- a/src/geocel/vg/VecgeomParams.cc +++ b/src/geocel/vg/VecgeomParams.cc @@ -31,20 +31,20 @@ #include "corecel/device_runtime_api.hh" #include "corecel/Assert.hh" +#include "corecel/Macros.hh" #include "corecel/cont/Range.hh" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeAndRedirect.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/ScopedLimitSaver.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" +#include "geocel/GeantGeoUtils.hh" #include "geocel/detail/LengthUnits.hh" #include "geocel/g4vg/Converter.hh" -#include "geocel/GeantGeoUtils.hh" #include "VecgeomData.hh" // IWYU pragma: associated diff --git a/src/orange/OrangeParams.cc b/src/orange/OrangeParams.cc index bc6fb65724..189cd1bd90 100644 --- a/src/orange/OrangeParams.cc +++ b/src/orange/OrangeParams.cc @@ -18,6 +18,7 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" +#include "corecel/OpaqueId.hh" #include "corecel/cont/Range.hh" #include "corecel/cont/VariantUtils.hh" #include "corecel/data/Collection.hh" @@ -25,7 +26,6 @@ #include "corecel/io/Logger.hh" #include "corecel/io/ScopedTimeLog.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/OpaqueId.hh" #include "corecel/sys/ScopedMem.hh" #include "corecel/sys/ScopedProfiling.hh" #include "geocel/BoundingBox.hh" diff --git a/test/accel/detail/HitManager.test.cc b/test/accel/detail/HitManager.test.cc index 503350e31f..fa0e02c8d0 100644 --- a/test/accel/detail/HitManager.test.cc +++ b/test/accel/detail/HitManager.test.cc @@ -15,11 +15,11 @@ #include "corecel/Config.hh" -#include "corecel/io/Logger.hh" #include "corecel/ScopedLogStorer.hh" +#include "corecel/io/Logger.hh" #include "geocel/GeantGeoUtils.hh" -#include "celeritas/geo/GeoParams.hh" #include "celeritas/SimpleCmsTestBase.hh" +#include "celeritas/geo/GeoParams.hh" #include "accel/SDTestBase.hh" #include "accel/SetupOptions.hh" diff --git a/test/celeritas/ext/GeantImporter.test.cc b/test/celeritas/ext/GeantImporter.test.cc index 1d84c67f56..bfd44fdfcb 100644 --- a/test/celeritas/ext/GeantImporter.test.cc +++ b/test/celeritas/ext/GeantImporter.test.cc @@ -10,10 +10,10 @@ #include "corecel/Config.hh" #include "corecel/sys/Version.hh" +#include "corecel/ScopedLogStorer.hh" #include "corecel/io/Logger.hh" #include "corecel/io/Repr.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/ScopedLogStorer.hh" #include "geocel/UnitUtils.hh" #include "celeritas/ext/GeantPhysicsOptionsIO.json.hh" #include "celeritas/ext/GeantSetup.hh" diff --git a/test/celeritas/field/FieldPropagator.test.cc b/test/celeritas/field/FieldPropagator.test.cc index bd40d0f259..545dfd79ff 100644 --- a/test/celeritas/field/FieldPropagator.test.cc +++ b/test/celeritas/field/FieldPropagator.test.cc @@ -12,15 +12,16 @@ #include "corecel/Config.hh" +#include "corecel/ScopedLogStorer.hh" #include "corecel/cont/ArrayIO.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" #include "corecel/math/Algorithms.hh" #include "corecel/math/ArrayUtils.hh" -#include "corecel/ScopedLogStorer.hh" #include "geocel/CheckedGeoTrackView.hh" #include "celeritas/Constants.hh" #include "celeritas/CoreGeoTestBase.hh" +#include "celeritas/Quantities.hh" #include "celeritas/field/DormandPrinceStepper.hh" #include "celeritas/field/FieldDriverOptions.hh" #include "celeritas/field/MakeMagFieldPropagator.hh" @@ -28,14 +29,13 @@ #include "celeritas/geo/GeoData.hh" #include "celeritas/geo/GeoParams.hh" #include "celeritas/geo/GeoTrackView.hh" -#include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/PDGNumber.hh" -#include "celeritas/Quantities.hh" +#include "celeritas/phys/ParticleParams.hh" -#include "celeritas_test.hh" #include "CMSParameterizedField.hh" #include "DiagnosticStepper.hh" #include "FieldTestBase.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/celeritas/field/Steppers.test.cc b/test/celeritas/field/Steppers.test.cc index 89aeae9286..159f31ae89 100644 --- a/test/celeritas/field/Steppers.test.cc +++ b/test/celeritas/field/Steppers.test.cc @@ -9,10 +9,12 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" -#include "corecel/cont/Range.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" +#include "corecel/cont/Range.hh" #include "celeritas/Constants.hh" +#include "celeritas/Quantities.hh" +#include "celeritas/Units.hh" #include "celeritas/field/DormandPrinceStepper.hh" #include "celeritas/field/MagFieldEquation.hh" #include "celeritas/field/MakeMagFieldPropagator.hh" @@ -20,11 +22,9 @@ #include "celeritas/field/UniformField.hh" #include "celeritas/field/UniformZField.hh" #include "celeritas/field/ZHelixStepper.hh" -#include "celeritas/Quantities.hh" -#include "celeritas/Units.hh" -#include "celeritas_test.hh" #include "FieldTestParams.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/celeritas/geo/Geometry.test.cc b/test/celeritas/geo/Geometry.test.cc index 1e80ba3337..17fb02770d 100644 --- a/test/celeritas/geo/Geometry.test.cc +++ b/test/celeritas/geo/Geometry.test.cc @@ -10,8 +10,8 @@ #include "geocel/GeoParamsOutput.hh" #include "celeritas/geo/GeoParams.hh" -#include "celeritas_test.hh" #include "HeuristicGeoTestBase.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/celeritas/geo/HeuristicGeoTestBase.cu b/test/celeritas/geo/HeuristicGeoTestBase.cu index 8ee87e8a6f..2c33019e9b 100644 --- a/test/celeritas/geo/HeuristicGeoTestBase.cu +++ b/test/celeritas/geo/HeuristicGeoTestBase.cu @@ -7,10 +7,10 @@ //---------------------------------------------------------------------------// #include "corecel/device_runtime_api.hh" +#include "corecel/Types.hh" #include "corecel/data/detail/Filler.device.t.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" -#include "corecel/Types.hh" #include "HeuristicGeoExecutor.hh" diff --git a/test/celeritas/global/AlongStep.test.cc b/test/celeritas/global/AlongStep.test.cc index c360c9e761..9637f66ee0 100644 --- a/test/celeritas/global/AlongStep.test.cc +++ b/test/celeritas/global/AlongStep.test.cc @@ -9,9 +9,12 @@ #include "corecel/sys/Config.hh" -#include "corecel/io/Logger.hh" #include "corecel/ScopedLogStorer.hh" +#include "corecel/io/Logger.hh" #include "geocel/UnitUtils.hh" +#include "celeritas/LeadBoxTestBase.hh" +#include "celeritas/SimpleCmsTestBase.hh" +#include "celeritas/TestEm3Base.hh" #include "celeritas/em/params/UrbanMscParams.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/field/RZMapFieldInput.hh" @@ -19,11 +22,8 @@ #include "celeritas/global/ActionRegistry.hh" #include "celeritas/global/alongstep/AlongStepRZMapFieldMscAction.hh" #include "celeritas/global/alongstep/AlongStepUniformMscAction.hh" -#include "celeritas/LeadBoxTestBase.hh" -#include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/PDGNumber.hh" -#include "celeritas/SimpleCmsTestBase.hh" -#include "celeritas/TestEm3Base.hh" +#include "celeritas/phys/ParticleParams.hh" #include "AlongStepTestBase.hh" #include "celeritas_test.hh" diff --git a/test/celeritas/io/EventIO.test.cc b/test/celeritas/io/EventIO.test.cc index 065a9e8f4a..add5d2d7d3 100644 --- a/test/celeritas/io/EventIO.test.cc +++ b/test/celeritas/io/EventIO.test.cc @@ -12,8 +12,8 @@ #include "celeritas/io/EventReader.hh" #include "celeritas/io/EventWriter.hh" -#include "celeritas_test.hh" #include "EventIOTestBase.hh" +#include "celeritas_test.hh" #if CELERITAS_USE_HEPMC3 # include diff --git a/test/celeritas/mat/Material.test.cu b/test/celeritas/mat/Material.test.cu index 9eb56fea47..0b975597bd 100644 --- a/test/celeritas/mat/Material.test.cu +++ b/test/celeritas/mat/Material.test.cu @@ -15,8 +15,8 @@ #include "corecel/math/Quantity.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" -#include "celeritas/mat/MaterialTrackView.hh" #include "celeritas/Quantities.hh" +#include "celeritas/mat/MaterialTrackView.hh" using thrust::raw_pointer_cast; diff --git a/test/celeritas/phys/Particle.test.cc b/test/celeritas/phys/Particle.test.cc index 597859ecb9..8fa013b21d 100644 --- a/test/celeritas/phys/Particle.test.cc +++ b/test/celeritas/phys/Particle.test.cc @@ -11,6 +11,7 @@ #include "corecel/cont/Array.hh" #include "corecel/data/CollectionStateStore.hh" +#include "celeritas/Quantities.hh" #include "celeritas/ext/RootImporter.hh" #include "celeritas/ext/ScopedRootErrorHandler.hh" #include "celeritas/io/ImportData.hh" @@ -18,7 +19,6 @@ #include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/ParticleParamsOutput.hh" #include "celeritas/phys/ParticleTrackView.hh" -#include "celeritas/Quantities.hh" #include "celeritas_test.hh" diff --git a/test/celeritas/phys/Particle.test.cu b/test/celeritas/phys/Particle.test.cu index 29c654933e..7c860e4a5b 100644 --- a/test/celeritas/phys/Particle.test.cu +++ b/test/celeritas/phys/Particle.test.cu @@ -15,8 +15,8 @@ #include "corecel/math/UnitUtils.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" -#include "celeritas/phys/ParticleTrackView.hh" #include "celeritas/UnitTypes.hh" +#include "celeritas/phys/ParticleTrackView.hh" using thrust::raw_pointer_cast; diff --git a/test/celeritas/phys/Physics.test.cu b/test/celeritas/phys/Physics.test.cu index 4039bf5e4b..7422a406ea 100644 --- a/test/celeritas/phys/Physics.test.cu +++ b/test/celeritas/phys/Physics.test.cu @@ -11,9 +11,9 @@ #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" +#include "celeritas/Quantities.hh" #include "celeritas/phys/PhysicsStepView.hh" #include "celeritas/phys/PhysicsTrackView.hh" -#include "celeritas/Quantities.hh" namespace celeritas { diff --git a/test/celeritas/random/RngEngine.test.cc b/test/celeritas/random/RngEngine.test.cc index 7447c40188..b53af4b479 100644 --- a/test/celeritas/random/RngEngine.test.cc +++ b/test/celeritas/random/RngEngine.test.cc @@ -15,14 +15,14 @@ #include "corecel/Config.hh" #include "corecel/Assert.hh" -#include "corecel/data/CollectionStateStore.hh" #include "corecel/Types.hh" -#include "celeritas/random/distribution/GenerateCanonical.hh" +#include "corecel/data/CollectionStateStore.hh" #include "celeritas/random/RngParams.hh" +#include "celeritas/random/distribution/GenerateCanonical.hh" -#include "celeritas_test.hh" #include "DiagnosticRngEngine.hh" #include "SequenceEngine.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/celeritas/user/Diagnostic.test.cc b/test/celeritas/user/Diagnostic.test.cc index 5947176513..b3195aff1a 100644 --- a/test/celeritas/user/Diagnostic.test.cc +++ b/test/celeritas/user/Diagnostic.test.cc @@ -13,14 +13,14 @@ #include "celeritas/em/params/UrbanMscParams.hh" #include "celeritas/ext/GeantPhysicsOptions.hh" #include "celeritas/global/ActionRegistry.hh" -#include "celeritas/global/alongstep/AlongStepUniformMscAction.hh" #include "celeritas/global/Stepper.hh" -#include "celeritas/phys/ParticleParams.hh" +#include "celeritas/global/alongstep/AlongStepUniformMscAction.hh" #include "celeritas/phys/PDGNumber.hh" +#include "celeritas/phys/ParticleParams.hh" #include "celeritas/phys/Primary.hh" -#include "celeritas_test.hh" #include "DiagnosticTestBase.hh" +#include "celeritas_test.hh" #include "../SimpleTestBase.hh" #include "../TestEm3Base.hh" diff --git a/test/geocel/UnitUtils.hh b/test/geocel/UnitUtils.hh index 069c5ba860..59b784ab3b 100644 --- a/test/geocel/UnitUtils.hh +++ b/test/geocel/UnitUtils.hh @@ -9,8 +9,8 @@ #include "corecel/Config.hh" -#include "corecel/cont/Array.hh" #include "corecel/Types.hh" +#include "corecel/cont/Array.hh" #include "geocel/detail/LengthUnits.hh" namespace celeritas diff --git a/test/geocel/g4/GeantGeo.test.cc b/test/geocel/g4/GeantGeo.test.cc index b47c25bc14..81f63d6faf 100644 --- a/test/geocel/g4/GeantGeo.test.cc +++ b/test/geocel/g4/GeantGeo.test.cc @@ -11,18 +11,18 @@ #include "corecel/Config.hh" #include "corecel/sys/Version.hh" +#include "corecel/ScopedLogStorer.hh" #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/ScopedLogStorer.hh" +#include "geocel/GeoParamsOutput.hh" +#include "geocel/UnitUtils.hh" #include "geocel/g4/GeantGeoData.hh" #include "geocel/g4/GeantGeoParams.hh" #include "geocel/g4/GeantGeoTrackView.hh" -#include "geocel/GeoParamsOutput.hh" -#include "geocel/UnitUtils.hh" -#include "celeritas_test.hh" #include "GeantGeoTestBase.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/geocel/vg/Vecgeom.test.cc b/test/geocel/vg/Vecgeom.test.cc index c76e767e34..b3295b3202 100644 --- a/test/geocel/vg/Vecgeom.test.cc +++ b/test/geocel/vg/Vecgeom.test.cc @@ -12,11 +12,11 @@ #include "corecel/Config.hh" #include "corecel/sys/Version.hh" +#include "corecel/ScopedLogStorer.hh" #include "corecel/cont/ArrayIO.hh" #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" -#include "corecel/ScopedLogStorer.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "geocel/GeantGeoUtils.hh" @@ -26,8 +26,8 @@ #include "geocel/vg/VecgeomParams.hh" #include "geocel/vg/VecgeomTrackView.hh" -#include "celeritas_test.hh" #include "VecgeomTestBase.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/orange/Orange.test.cc b/test/orange/Orange.test.cc index 29cba6c84d..ef7c67d060 100644 --- a/test/orange/Orange.test.cc +++ b/test/orange/Orange.test.cc @@ -16,9 +16,9 @@ #include "orange/OrangeTypes.hh" #include "celeritas/Types.hh" -#include "celeritas_test.hh" #include "OrangeGeoTestBase.hh" #include "TestMacros.hh" +#include "celeritas_test.hh" using celeritas::constants::sqrt_two; diff --git a/test/orange/OrangeGeant.test.cc b/test/orange/OrangeGeant.test.cc index c917354fc4..73e1b9fa35 100644 --- a/test/orange/OrangeGeant.test.cc +++ b/test/orange/OrangeGeant.test.cc @@ -12,9 +12,9 @@ #include "corecel/Types.hh" #include "geocel/detail/LengthUnits.hh" -#include "celeritas_test.hh" #include "OrangeGeoTestBase.hh" #include "TestMacros.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/orange/OrangeGeoTestBase.cc b/test/orange/OrangeGeoTestBase.cc index f99fb0b950..a4c8aaff8c 100644 --- a/test/orange/OrangeGeoTestBase.cc +++ b/test/orange/OrangeGeoTestBase.cc @@ -13,14 +13,14 @@ #include "corecel/Config.hh" +#include "corecel/ScopedLogStorer.hh" #include "corecel/data/Ref.hh" #include "corecel/io/Join.hh" #include "corecel/io/Logger.hh" -#include "corecel/ScopedLogStorer.hh" #include "geocel/Types.hh" -#include "orange/detail/UniverseIndexer.hh" #include "orange/OrangeInput.hh" #include "orange/OrangeParams.hh" +#include "orange/detail/UniverseIndexer.hh" #include "orange/surf/LocalSurfaceVisitor.hh" #include "orange/surf/Sphere.hh" #include "orange/surf/SurfaceIO.hh" diff --git a/test/orange/surf/ConeAligned.test.cc b/test/orange/surf/ConeAligned.test.cc index 4fb312d834..bd136f46ec 100644 --- a/test/orange/surf/ConeAligned.test.cc +++ b/test/orange/surf/ConeAligned.test.cc @@ -12,8 +12,8 @@ #include "corecel/math/Algorithms.hh" #include "corecel/math/ArrayUtils.hh" -#include "celeritas_test.hh" #include "SurfaceTestUtils.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/orange/univ/RectArrayTracker.test.cc b/test/orange/univ/RectArrayTracker.test.cc index 1093989ebd..4580004677 100644 --- a/test/orange/univ/RectArrayTracker.test.cc +++ b/test/orange/univ/RectArrayTracker.test.cc @@ -18,15 +18,15 @@ #include "corecel/io/Repr.hh" #include "corecel/math/ArrayUtils.hh" #include "corecel/sys/Stopwatch.hh" -#include "orange/detail/UniverseIndexer.hh" #include "orange/OrangeGeoTestBase.hh" #include "orange/OrangeParams.hh" +#include "orange/detail/UniverseIndexer.hh" #include "celeritas/Constants.hh" #include "celeritas/random/distribution/IsotropicDistribution.hh" #include "celeritas/random/distribution/UniformBoxDistribution.hh" -#include "celeritas_test.hh" #include "SimpleUnitTracker.test.hh" +#include "celeritas_test.hh" namespace celeritas { diff --git a/test/orange/univ/SimpleUnitTracker.test.cc b/test/orange/univ/SimpleUnitTracker.test.cc index b3001ee793..5dde6ffb9a 100644 --- a/test/orange/univ/SimpleUnitTracker.test.cc +++ b/test/orange/univ/SimpleUnitTracker.test.cc @@ -19,15 +19,15 @@ #include "corecel/math/ArrayUtils.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Stopwatch.hh" -#include "orange/detail/UniverseIndexer.hh" #include "orange/OrangeGeoTestBase.hh" #include "orange/OrangeParams.hh" +#include "orange/detail/UniverseIndexer.hh" #include "celeritas/Constants.hh" #include "celeritas/random/distribution/IsotropicDistribution.hh" #include "celeritas/random/distribution/UniformBoxDistribution.hh" -#include "celeritas_test.hh" #include "SimpleUnitTracker.test.hh" +#include "celeritas_test.hh" using celeritas::constants::sqrt_three; using celeritas::constants::sqrt_two; diff --git a/test/testdetail/TestMacrosImpl.hh b/test/testdetail/TestMacrosImpl.hh index f180f3f9e3..de0167f189 100644 --- a/test/testdetail/TestMacrosImpl.hh +++ b/test/testdetail/TestMacrosImpl.hh @@ -14,8 +14,8 @@ #include "corecel/Config.hh" -#include "corecel/io/Repr.hh" #include "corecel/Macros.hh" +#include "corecel/io/Repr.hh" #include "corecel/math/SoftEqual.hh" namespace celeritas diff --git a/test/testdetail/TestMainImpl.cc b/test/testdetail/TestMainImpl.cc index e1fc3a5947..44d73fe135 100644 --- a/test/testdetail/TestMainImpl.cc +++ b/test/testdetail/TestMainImpl.cc @@ -13,10 +13,10 @@ #include "corecel/Config.hh" #include "corecel/Version.hh" +#include "corecel/Macros.hh" #include "corecel/cont/Range.hh" #include "corecel/io/ColorUtils.hh" #include "corecel/io/Logger.hh" -#include "corecel/Macros.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" #include "corecel/sys/MpiCommunicator.hh" From da4b21fec056a9d51d6fc33d57de353d43beccba Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 19:25:03 -0700 Subject: [PATCH 13/29] gcc version check and doc --- src/celeritas_cmake_strings.h.in | 8 +++++--- src/celeritas_config.h.in | 6 ++++-- src/celeritas_sys_config.h.in | 6 ++++-- src/celeritas_version.h.in | 6 ++++-- src/corecel/Config.hh.in | 5 +++-- src/corecel/Version.hh.in | 6 ++---- src/corecel/sys/Config.hh.in | 6 ++---- 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/celeritas_cmake_strings.h.in b/src/celeritas_cmake_strings.h.in index 694e04d007..2e53231cb1 100644 --- a/src/celeritas_cmake_strings.h.in +++ b/src/celeritas_cmake_strings.h.in @@ -11,10 +11,12 @@ #define celeritas_cmake_strings_h #if __cplusplus >= 201703L -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/Config.hh\"" +# if __GNUC__ > 8 || __clang__ +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/Config.hh\"" +# endif // uses inline variables introduced in c++17 -# include "corecel/Config.hh" +# include "corecel/Config.hh" #else @CELERITAS_CMAKE_STRINGS_COMPAT@ #endif diff --git a/src/celeritas_config.h.in b/src/celeritas_config.h.in index 2c9b40b05e..29bd5f1c95 100644 --- a/src/celeritas_config.h.in +++ b/src/celeritas_config.h.in @@ -17,8 +17,10 @@ #define celeritas_config_h #if __cplusplus >= 201703L -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/Config.hh\"" +# if __GNUC__ > 8 || __clang__ +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/Config.hh\"" +# endif // uses inline variables introduced in c++17 # include "corecel/Config.hh" #else diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index a90f36fc1c..e6f2fe305d 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -11,8 +11,10 @@ #define celeritas_sys_config_h #ifdef __cplusplus -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/sys/Config.hh\"" +# if __GNUC__ > 8 || __clang__ +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/sys/Config.hh\"" +# endif # include "corecel/sys/Config.hh" #else #cmakedefine01 CELERITAS_HAVE_ROCTX diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index 8a6cfee827..6b8f2c3b50 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -11,8 +11,10 @@ #define celeritas_version_h #if __cplusplus >= 201703L -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/Version.hh\"" +# if __GNUC__ > 8 || __clang__ +# pragma GCC warning __FILE__ \ + " is deprecated and should be replaced by \"corecel/Version.hh\"" +# endif // uses inline variables introduced in c++17 # include "corecel/Version.hh" #else diff --git a/src/corecel/Config.hh.in b/src/corecel/Config.hh.in index 0f1d1aa458..706cb9a0de 100644 --- a/src/corecel/Config.hh.in +++ b/src/corecel/Config.hh.in @@ -3,8 +3,9 @@ // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: (Apache-2.0 OR MIT) //---------------------------------------------------------------------------// -/*! \file corecel/Config.hh - * Configuration-specific options for Celeritas. +/*! + * \file corecel/Config.hh + * \brief Configuration-specific options for Celeritas. * * Note that the nonzero values for \c CELERITAS_CORE_RNG and \c * CELERITAS_CORE_GEO values *must not* be used directly: only compare between diff --git a/src/corecel/Version.hh.in b/src/corecel/Version.hh.in index 4499a2473c..ee48447f69 100644 --- a/src/corecel/Version.hh.in +++ b/src/corecel/Version.hh.in @@ -3,10 +3,8 @@ // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: (Apache-2.0 OR MIT) //---------------------------------------------------------------------------// -/*! - * \file corecel/Version.hh - * \brief Celeritas version. - */ +//! \file corecel/Version.hh +//! \brief Celeritas version. //---------------------------------------------------------------------------// #pragma once /*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per diff --git a/src/corecel/sys/Config.hh.in b/src/corecel/sys/Config.hh.in index 89a5b6b9b2..67fdad5672 100644 --- a/src/corecel/sys/Config.hh.in +++ b/src/corecel/sys/Config.hh.in @@ -3,10 +3,8 @@ // See the top-level COPYRIGHT file for details. // SPDX-License-Identifier: (Apache-2.0 OR MIT) //---------------------------------------------------------------------------// -/*! - * \file corecel/sys/Config.hh - * \brief System-specific configuration options for Celeritas.. - */ +//! \file corecel/sys/Config.hh +//! \brief System-specific configuration options for Celeritas. //---------------------------------------------------------------------------// #pragma once From e5257e5f126e215a41f58b3ea9361a29a28fc138 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 19:40:53 -0700 Subject: [PATCH 14/29] update include --- src/corecel/math/RegulaFalsiRootFinder.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corecel/math/RegulaFalsiRootFinder.hh b/src/corecel/math/RegulaFalsiRootFinder.hh index 76579c1806..eb983a232f 100644 --- a/src/corecel/math/RegulaFalsiRootFinder.hh +++ b/src/corecel/math/RegulaFalsiRootFinder.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" From 3c6220efb4c2e04bce967b30f24a69169a9443d1 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 18 Jul 2024 20:01:32 -0700 Subject: [PATCH 15/29] gcc-friendly syntax --- src/celeritas_cmake_strings.h.in | 3 +-- src/celeritas_config.h.in | 3 +-- src/celeritas_sys_config.h.in | 3 +-- src/celeritas_version.h.in | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/celeritas_cmake_strings.h.in b/src/celeritas_cmake_strings.h.in index 2e53231cb1..9480d652b7 100644 --- a/src/celeritas_cmake_strings.h.in +++ b/src/celeritas_cmake_strings.h.in @@ -12,8 +12,7 @@ #if __cplusplus >= 201703L # if __GNUC__ > 8 || __clang__ -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/Config.hh\"" +# pragma GCC warning "celeritas_cmake_strings.h is deprecated and should be replaced by \"corecel/Config.hh\"" # endif // uses inline variables introduced in c++17 # include "corecel/Config.hh" diff --git a/src/celeritas_config.h.in b/src/celeritas_config.h.in index 29bd5f1c95..df395a340f 100644 --- a/src/celeritas_config.h.in +++ b/src/celeritas_config.h.in @@ -18,8 +18,7 @@ #if __cplusplus >= 201703L # if __GNUC__ > 8 || __clang__ -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/Config.hh\"" +# pragma GCC warning " celeritas_config.h is deprecated and should be replaced by \"corecel/Config.hh\"" # endif // uses inline variables introduced in c++17 # include "corecel/Config.hh" diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index e6f2fe305d..61bb5c6cb9 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -12,8 +12,7 @@ #ifdef __cplusplus # if __GNUC__ > 8 || __clang__ -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/sys/Config.hh\"" +# pragma GCC warning "celeritas_sys_config.h is deprecated and should be replaced by \"corecel/sys/Config.hh\"" # endif # include "corecel/sys/Config.hh" #else diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index 6b8f2c3b50..66900062f4 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -12,8 +12,7 @@ #if __cplusplus >= 201703L # if __GNUC__ > 8 || __clang__ -# pragma GCC warning __FILE__ \ - " is deprecated and should be replaced by \"corecel/Version.hh\"" +# pragma GCC warning " celeritas_version.h is deprecated and should be replaced by \"corecel/Version.hh\"" # endif // uses inline variables introduced in c++17 # include "corecel/Version.hh" From 524103eb0d54eded56e8758116c55f2d4a650966 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Sat, 20 Jul 2024 12:30:16 -0700 Subject: [PATCH 16/29] rename device_runtime_api.hh to CamelCase --- .clang-format | 5 +---- app/celer-sim/celer-sim.cc | 2 +- app/demo-interactor/KNDemoKernel.thrust.cu | 2 +- doc/appendix/development.rst | 2 +- scripts/dev/celeritas-gen.py | 2 +- scripts/dev/run-iwyu.sh | 2 +- src/celeritas/global/ActionLauncher.device.hh | 2 +- src/celeritas/global/detail/ActionSequence.cc | 2 +- src/celeritas/random/CuHipRngData.hh | 2 +- src/celeritas/random/RngReseed.cu | 2 +- src/celeritas/random/detail/CuHipRngStateInit.cu | 2 +- src/celeritas/track/StatusChecker.cu | 2 +- src/celeritas/user/detail/SimpleCaloImpl.cu | 2 +- src/corecel/Assert.hh | 6 +++--- src/corecel/{device_runtime_api.hh => DeviceRuntimeApi.hh} | 2 +- src/corecel/data/Copier.cc | 2 +- src/corecel/data/DeviceAllocation.cc | 2 +- src/corecel/data/PinnedAllocator.t.hh | 2 +- src/corecel/data/detail/Filler.device.t.hh | 2 +- src/corecel/sys/Device.cc | 4 ++-- src/corecel/sys/KernelAttributes.hh | 2 +- src/corecel/sys/KernelParamCalculator.device.hh | 2 +- src/corecel/sys/ScopedLimitSaver.hh | 2 +- src/corecel/sys/ScopedMem.cc | 2 +- src/corecel/sys/Stream.hh | 2 +- src/geocel/vg/VecgeomParams.cc | 2 +- test/celeritas/geo/HeuristicGeoTestBase.cu | 2 +- test/celeritas/mat/Material.test.cu | 2 +- test/celeritas/phys/Particle.test.cu | 2 +- test/celeritas/phys/Physics.test.cu | 2 +- test/celeritas/random/RngEngine.test.cu | 2 +- test/corecel/cont/Range.test.cu | 2 +- test/corecel/data/Collection.test.cu | 2 +- test/corecel/data/ObserverPtr.test.cu | 2 +- test/corecel/data/StackAllocator.test.cu | 2 +- test/corecel/math/NumericLimits.test.cu | 2 +- test/orange/surf/LocalSurfaceVisitor.test.cu | 2 +- 37 files changed, 40 insertions(+), 43 deletions(-) rename src/corecel/{device_runtime_api.hh => DeviceRuntimeApi.hh} (98%) diff --git a/.clang-format b/.clang-format index 4ae207aa96..13c3835d6e 100644 --- a/.clang-format +++ b/.clang-format @@ -75,10 +75,7 @@ IncludeCategories: - Regex: '^"celeritas_[a-z_]+\.h"' Priority: 2 SortPriority: 3 - - Regex: '^"corecel/(sys/)?(Config|Version)\.hh"$' - Priority: 2 - SortPriority: 3 - - Regex: '^"corecel/device_runtime_api\.hh"$' + - Regex: '^"corecel/(sys/)?(Config|Version|DeviceRuntimeApi)\.hh"$' Priority: 2 SortPriority: 3 - Regex: '^"corecel/' diff --git a/app/celer-sim/celer-sim.cc b/app/celer-sim/celer-sim.cc index 30fa3995c3..c7f91df88d 100644 --- a/app/celer-sim/celer-sim.cc +++ b/app/celer-sim/celer-sim.cc @@ -23,8 +23,8 @@ #include #include "corecel/Config.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Version.hh" -#include "corecel/device_runtime_api.hh" #include "corecel/io/BuildOutput.hh" #include "corecel/io/ExceptionOutput.hh" diff --git a/app/demo-interactor/KNDemoKernel.thrust.cu b/app/demo-interactor/KNDemoKernel.thrust.cu index 30aa4eb94d..4b7b98f9b1 100644 --- a/app/demo-interactor/KNDemoKernel.thrust.cu +++ b/app/demo-interactor/KNDemoKernel.thrust.cu @@ -10,7 +10,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" namespace celeritas { diff --git a/doc/appendix/development.rst b/doc/appendix/development.rst index 99069044f2..dca6607dfc 100644 --- a/doc/appendix/development.rst +++ b/doc/appendix/development.rst @@ -276,7 +276,7 @@ such as ``cudaMalloc`` does *not* have to be compiled with NVCC. Instead, it only has to be linked against the CUDA runtime library and include ``cuda_runtime_api.h``. The platform-agnostic Celeritas include file to use is -``corecel/device_runtime_api.hh``. +``corecel/DeviceRuntimeApi.hh``. Note that VecGeom compiles differently when run through NVCC (macro magic puts much of the code in a different namespace) so its inclusion must be very carefully managed. diff --git a/scripts/dev/celeritas-gen.py b/scripts/dev/celeritas-gen.py index 76dcce8400..95ada5cf65 100755 --- a/scripts/dev/celeritas-gen.py +++ b/scripts/dev/celeritas-gen.py @@ -240,7 +240,7 @@ class {name}Test : public ::celeritas::test::Test TEST_CODE_FILE = '''\ #include "{name}.test.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Types.hh" #include "corecel/sys/KernelParamCalculator.device.hh" #include "corecel/sys/Device.hh" diff --git a/scripts/dev/run-iwyu.sh b/scripts/dev/run-iwyu.sh index 40ce06d985..8cdcb33cd5 100755 --- a/scripts/dev/run-iwyu.sh +++ b/scripts/dev/run-iwyu.sh @@ -25,7 +25,7 @@ fi OUTFILE=$(mktemp) iwyu_tool.py -p $1 -- \ -Xiwyu --no_fwd_decls \ - -Xiwyu --keep="*device_runtime_api*" \ + -Xiwyu --keep="*DeviceRuntimeApi*" \ -Xiwyu --keep="*.json.hh*" \ -Xiwyu --transitive_includes_only \ -Xiwyu --mapping_file="${SCRIPT_DIR}/iwyu-apple-clang.imp" \ diff --git a/src/celeritas/global/ActionLauncher.device.hh b/src/celeritas/global/ActionLauncher.device.hh index 4701312213..bec69e3dea 100644 --- a/src/celeritas/global/ActionLauncher.device.hh +++ b/src/celeritas/global/ActionLauncher.device.hh @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Types.hh" diff --git a/src/celeritas/global/detail/ActionSequence.cc b/src/celeritas/global/detail/ActionSequence.cc index 54b4e5dfe8..82c9b9faac 100644 --- a/src/celeritas/global/detail/ActionSequence.cc +++ b/src/celeritas/global/detail/ActionSequence.cc @@ -11,7 +11,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Types.hh" #include "corecel/cont/EnumArray.hh" diff --git a/src/celeritas/random/CuHipRngData.hh b/src/celeritas/random/CuHipRngData.hh index e93d15a077..4ca60d555c 100644 --- a/src/celeritas/random/CuHipRngData.hh +++ b/src/celeritas/random/CuHipRngData.hh @@ -10,7 +10,7 @@ #include #include "corecel/Config.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/celeritas/random/RngReseed.cu b/src/celeritas/random/RngReseed.cu index 2bd2264997..b61f702e17 100644 --- a/src/celeritas/random/RngReseed.cu +++ b/src/celeritas/random/RngReseed.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "RngReseed.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/sys/Device.hh" diff --git a/src/celeritas/random/detail/CuHipRngStateInit.cu b/src/celeritas/random/detail/CuHipRngStateInit.cu index d82b109288..a147316ed2 100644 --- a/src/celeritas/random/detail/CuHipRngStateInit.cu +++ b/src/celeritas/random/detail/CuHipRngStateInit.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "CuHipRngStateInit.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/sys/Device.hh" diff --git a/src/celeritas/track/StatusChecker.cu b/src/celeritas/track/StatusChecker.cu index a4f798709e..c67c922baf 100644 --- a/src/celeritas/track/StatusChecker.cu +++ b/src/celeritas/track/StatusChecker.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "StatusChecker.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/sys/Stream.hh" diff --git a/src/celeritas/user/detail/SimpleCaloImpl.cu b/src/celeritas/user/detail/SimpleCaloImpl.cu index 04defa8188..a29da3a1a4 100644 --- a/src/celeritas/user/detail/SimpleCaloImpl.cu +++ b/src/celeritas/user/detail/SimpleCaloImpl.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "SimpleCaloImpl.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Types.hh" #include "corecel/sys/Device.hh" diff --git a/src/corecel/Assert.hh b/src/corecel/Assert.hh index 0c0bd6e311..529e1ad29b 100644 --- a/src/corecel/Assert.hh +++ b/src/corecel/Assert.hh @@ -259,7 +259,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/device_runtime_api.hh . + * corecel/DeviceRuntimeApi.hh . */ #if CELERITAS_USE_CUDA # define CELER_CUDA_CALL(STATEMENT) \ @@ -296,7 +296,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/device_runtime_api.hh . The \c celeritas_device_runtime_api_h_ + * corecel/DeviceRuntimeApi.hh . The \c celeritas_device_runtime_api_h_ * declaration enforces this when HIP is disabled. */ #if CELERITAS_USE_HIP @@ -334,7 +334,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/device_runtime_api.hh . The \c celeritas_device_runtime_api_h_ + * corecel/DeviceRuntimeApi.hh . The \c celeritas_device_runtime_api_h_ * declaration enforces this when CUDA/HIP are disabled. */ #if CELERITAS_USE_CUDA diff --git a/src/corecel/device_runtime_api.hh b/src/corecel/DeviceRuntimeApi.hh similarity index 98% rename from src/corecel/device_runtime_api.hh rename to src/corecel/DeviceRuntimeApi.hh index 51862082e8..ac87b4dd72 100644 --- a/src/corecel/device_runtime_api.hh +++ b/src/corecel/DeviceRuntimeApi.hh @@ -4,7 +4,7 @@ * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ /*! - * \file corecel/device_runtime_api.hh + * \file corecel/DeviceRuntimeApi.hh * Include CUDA or HIP runtime APIs for compiling with host/cc compiler. */ #pragma once diff --git a/src/corecel/data/Copier.cc b/src/corecel/data/Copier.cc index 9ae9825ad6..ce3cbf30a1 100644 --- a/src/corecel/data/Copier.cc +++ b/src/corecel/data/Copier.cc @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Macros.hh" #include "corecel/sys/Device.hh" diff --git a/src/corecel/data/DeviceAllocation.cc b/src/corecel/data/DeviceAllocation.cc index 1521064cdf..4690514b57 100644 --- a/src/corecel/data/DeviceAllocation.cc +++ b/src/corecel/data/DeviceAllocation.cc @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "DeviceAllocation.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/corecel/data/PinnedAllocator.t.hh b/src/corecel/data/PinnedAllocator.t.hh index bf45615f20..69f322fb59 100644 --- a/src/corecel/data/PinnedAllocator.t.hh +++ b/src/corecel/data/PinnedAllocator.t.hh @@ -12,7 +12,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/corecel/data/detail/Filler.device.t.hh b/src/corecel/data/detail/Filler.device.t.hh index d5d160ca21..9479026fc7 100644 --- a/src/corecel/data/detail/Filler.device.t.hh +++ b/src/corecel/data/detail/Filler.device.t.hh @@ -14,7 +14,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/sys/Thrust.device.hh" diff --git a/src/corecel/sys/Device.cc b/src/corecel/sys/Device.cc index e1937d5d55..c984aa033d 100644 --- a/src/corecel/sys/Device.cc +++ b/src/corecel/sys/Device.cc @@ -19,7 +19,7 @@ # include #endif -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/io/Logger.hh" @@ -217,7 +217,7 @@ Device::Device(int id) : id_{id}, streams_{new detail::StreamStorage{}} mempool, CELER_DEVICE_PREFIX(MemPoolAttrReleaseThreshold), &threshold)); #endif - // See device_runtime_api.hh + // See DeviceRuntimeApi.hh eu_per_cu_ = CELER_EU_PER_CU; CELER_ENSURE(*this); diff --git a/src/corecel/sys/KernelAttributes.hh b/src/corecel/sys/KernelAttributes.hh index 828ce2fa11..511b40f211 100644 --- a/src/corecel/sys/KernelAttributes.hh +++ b/src/corecel/sys/KernelAttributes.hh @@ -18,7 +18,7 @@ #include "Device.hh" #if CELER_DEVICE_SOURCE -# include "corecel/device_runtime_api.hh" +# include "corecel/DeviceRuntimeApi.hh" #endif namespace celeritas diff --git a/src/corecel/sys/KernelParamCalculator.device.hh b/src/corecel/sys/KernelParamCalculator.device.hh index 89a72938e4..8dbf6762a5 100644 --- a/src/corecel/sys/KernelParamCalculator.device.hh +++ b/src/corecel/sys/KernelParamCalculator.device.hh @@ -10,7 +10,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/corecel/sys/ScopedLimitSaver.hh b/src/corecel/sys/ScopedLimitSaver.hh index e25ff19790..754a6b52d6 100644 --- a/src/corecel/sys/ScopedLimitSaver.hh +++ b/src/corecel/sys/ScopedLimitSaver.hh @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/corecel/sys/ScopedMem.cc b/src/corecel/sys/ScopedMem.cc index 6e10bd597a..bc850ccbc4 100644 --- a/src/corecel/sys/ScopedMem.cc +++ b/src/corecel/sys/ScopedMem.cc @@ -20,7 +20,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/math/Quantity.hh" diff --git a/src/corecel/sys/Stream.hh b/src/corecel/sys/Stream.hh index 52e1e155d1..b9f30047e2 100644 --- a/src/corecel/sys/Stream.hh +++ b/src/corecel/sys/Stream.hh @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #pragma once -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/src/geocel/vg/VecgeomParams.cc b/src/geocel/vg/VecgeomParams.cc index 0f760583fb..34bb5b3864 100644 --- a/src/geocel/vg/VecgeomParams.cc +++ b/src/geocel/vg/VecgeomParams.cc @@ -28,7 +28,7 @@ # include #endif -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/Macros.hh" diff --git a/test/celeritas/geo/HeuristicGeoTestBase.cu b/test/celeritas/geo/HeuristicGeoTestBase.cu index 2c33019e9b..d2646bcd05 100644 --- a/test/celeritas/geo/HeuristicGeoTestBase.cu +++ b/test/celeritas/geo/HeuristicGeoTestBase.cu @@ -5,7 +5,7 @@ //---------------------------------------------------------------------------// //! \file celeritas/geo/HeuristicGeoTestBase.cu //---------------------------------------------------------------------------// -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Types.hh" #include "corecel/data/detail/Filler.device.t.hh" diff --git a/test/celeritas/mat/Material.test.cu b/test/celeritas/mat/Material.test.cu index 0b975597bd..2d0d11c74e 100644 --- a/test/celeritas/mat/Material.test.cu +++ b/test/celeritas/mat/Material.test.cu @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/cont/Range.hh" #include "corecel/math/Quantity.hh" diff --git a/test/celeritas/phys/Particle.test.cu b/test/celeritas/phys/Particle.test.cu index 7c860e4a5b..e74a18417a 100644 --- a/test/celeritas/phys/Particle.test.cu +++ b/test/celeritas/phys/Particle.test.cu @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/math/Quantity.hh" #include "corecel/math/UnitUtils.hh" diff --git a/test/celeritas/phys/Physics.test.cu b/test/celeritas/phys/Physics.test.cu index 7422a406ea..11eff1d129 100644 --- a/test/celeritas/phys/Physics.test.cu +++ b/test/celeritas/phys/Physics.test.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "Physics.test.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/celeritas/random/RngEngine.test.cu b/test/celeritas/random/RngEngine.test.cu index f0b434da06..862c12cd5f 100644 --- a/test/celeritas/random/RngEngine.test.cu +++ b/test/celeritas/random/RngEngine.test.cu @@ -11,7 +11,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/corecel/cont/Range.test.cu b/test/corecel/cont/Range.test.cu index dce8709339..cf00b93577 100644 --- a/test/corecel/cont/Range.test.cu +++ b/test/corecel/cont/Range.test.cu @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/cont/Range.hh" diff --git a/test/corecel/data/Collection.test.cu b/test/corecel/data/Collection.test.cu index 8fd80dbd0c..cef9dc94ab 100644 --- a/test/corecel/data/Collection.test.cu +++ b/test/corecel/data/Collection.test.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "Collection.test.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" diff --git a/test/corecel/data/ObserverPtr.test.cu b/test/corecel/data/ObserverPtr.test.cu index 76786e300f..81b7530a68 100644 --- a/test/corecel/data/ObserverPtr.test.cu +++ b/test/corecel/data/ObserverPtr.test.cu @@ -9,7 +9,7 @@ #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/data/ObserverPtr.device.hh" #include "corecel/sys/Device.hh" diff --git a/test/corecel/data/StackAllocator.test.cu b/test/corecel/data/StackAllocator.test.cu index ceefc68edb..01871d1f8c 100644 --- a/test/corecel/data/StackAllocator.test.cu +++ b/test/corecel/data/StackAllocator.test.cu @@ -11,7 +11,7 @@ #include #include -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/data/StackAllocator.hh" #include "corecel/sys/Device.hh" diff --git a/test/corecel/math/NumericLimits.test.cu b/test/corecel/math/NumericLimits.test.cu index 80fca7765a..937a1551d9 100644 --- a/test/corecel/math/NumericLimits.test.cu +++ b/test/corecel/math/NumericLimits.test.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "NumericLimits.test.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/Assert.hh" #include "corecel/math/NumericLimits.hh" diff --git a/test/orange/surf/LocalSurfaceVisitor.test.cu b/test/orange/surf/LocalSurfaceVisitor.test.cu index 08b3b958f6..00a1b69389 100644 --- a/test/orange/surf/LocalSurfaceVisitor.test.cu +++ b/test/orange/surf/LocalSurfaceVisitor.test.cu @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include "LocalSurfaceVisitor.test.hh" -#include "corecel/device_runtime_api.hh" +#include "corecel/DeviceRuntimeApi.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/KernelParamCalculator.device.hh" From d608da8db406dfe46a435a24ed9438dd651c9792 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Sat, 20 Jul 2024 12:54:25 -0700 Subject: [PATCH 17/29] keep device_runtime_api.h for compatibility --- src/corecel/device_runtime_api.h | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 src/corecel/device_runtime_api.h diff --git a/src/corecel/device_runtime_api.h b/src/corecel/device_runtime_api.h new file mode 100644 index 0000000000..55e383c8de --- /dev/null +++ b/src/corecel/device_runtime_api.h @@ -0,0 +1,77 @@ +/*-----------------------------------*-C-*------------------------------------- + * Copyright 2022-2024 UT-Battelle, LLC, and other Celeritas developers. + * See the top-level COPYRIGHT file for details. + * SPDX-License-Identifier: (Apache-2.0 OR MIT) + *---------------------------------------------------------------------------*/ +/*! + * \file corecel/device_runtime_api.h + * Include CUDA or HIP runtime APIs for compiling with host/cc compiler. + */ +#ifndef CELERITAS_DEVICE_RUNTIME_API_H +#define CELERITAS_DEVICE_RUNTIME_API_H + +#ifdef __cplusplus +# if __GNUC__ > 8 || __clang__ +# pragma GCC warning \ + "corecel/device_runtime_api.h is deprecated and should be replaced by \"corecel/DeviceRuntimeApi.hh\"" +# endif +# include "corecel/DeviceRuntimeApi.hh +#else + +# include "celeritas_config.h" + +# if CELERITAS_USE_HIP && !defined(__HIPCC__) +/* Assume we're on an AMD system but not being invoked by the rocm compiler */ +# define __HIP_PLATFORM_AMD__ 1 +# define __HIP_PLATFORM_HCC__ 1 +# endif + +# if CELERITAS_USE_CUDA +# include +# define THRUST_DEVICE_SYSTEM THRUST_DEVICE_SYSTEM_CUDA +# elif CELERITAS_USE_HIP +# include +# define THRUST_DEVICE_SYSTEM THRUST_DEVICE_SYSTEM_HIP +# endif + +# if CELERITAS_USE_CUDA || CELERITAS_USE_HIP +# include +# endif + +/*! + * \def CELER_EU_PER_CU + * + * Execution units per compute unit. AMD multiprocessors each have 4 SIMD + * units per compute unit, but there is no device attribute or + * compiler definition that provides this information. + * For CUDA, each streaming multiprocessor (MP) is a single "execution unit" + * and a "compute unit". + */ +# if CELERITAS_USE_CUDA +# define CELER_EU_PER_CU 1 +# elif CELERITAS_USE_HIP +# if defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_HCC__) +# define CELER_EU_PER_CU 4 +# elif defined(__HIP_PLATFORM_NVIDIA__) \ + || defined(__HIP_PLATFORM_NVCC__) +# define CELER_EU_PER_CU 1 +# else +# warning "Unknown HIP device configuration" +# define CELER_EU_PER_CU 0 +# endif +# else +/* HIP and CUDA are disabled */ +# define CELER_EU_PER_CU 0 +# endif + +/*! + * Declare a dummy variable to be referenced in disabled \c CELER_BLAH calls. + * + * With this declaration, the build will fail if this include is missing. + * (Unfortunately, since the use of this symbol is embedded in a macro, IWYU + * won't include this file automatically.) + */ +extern int celeritas_device_runtime_api_h_; +#endif + +#endif /* CELERITAS_DEVICE_RUNTIME_API_H */ \ No newline at end of file From 9e66b4986fa8a808da14a8c65463241328b0fc04 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Sat, 20 Jul 2024 14:06:56 -0700 Subject: [PATCH 18/29] Update doxygen --- doc/main/api/corecel.rst | 6 +++--- src/celeritas_cmake_strings.h.in | 4 +++- src/celeritas_config.h.in | 4 +++- src/celeritas_sys_config.h.in | 4 +++- src/celeritas_version.h.in | 4 +++- src/corecel/DeviceRuntimeApi.hh | 8 ++++---- src/corecel/device_runtime_api.h | 4 +++- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/doc/main/api/corecel.rst b/doc/main/api/corecel.rst index b11302f55a..3a67e0cc34 100644 --- a/doc/main/api/corecel.rst +++ b/doc/main/api/corecel.rst @@ -19,9 +19,9 @@ constexpr`` and other C++ expressions. In addition, it defines static C strings with configuration options such as key dependent library versions. Finally, ``corecel/Version.hh`` defines version numbers as preprocessor definition, a set of integers, and a descriptive string. ``celeritas_version.h``, -``celeritas_cmake_strings.h``, ``celeritas_sys_config.h`` and ``celeritas_config.h`` -are deprecated and kept as aliases for backward-compatibility. They may be removed -in an upcoming major version. +``celeritas_cmake_strings.h``, ``celeritas_sys_config.h``, ``celeritas_config.h`` +and ``corecel/device_runtime_api.h`` are deprecated and kept as aliases for +backward-compatibility. They may be removed in an upcoming major version. .. doxygendefine:: CELERITAS_VERSION .. doxygenvariable:: celeritas_version diff --git a/src/celeritas_cmake_strings.h.in b/src/celeritas_cmake_strings.h.in index 9480d652b7..8d2af5ccf3 100644 --- a/src/celeritas_cmake_strings.h.in +++ b/src/celeritas_cmake_strings.h.in @@ -6,7 +6,9 @@ /*! * \file celeritas_cmake_strings.h * \brief Detailed CMake configuration information. - *---------------------------------------------------------------------------*/ + * \deprecated This file should be replaced by "corecel/Config.hh". + */ +//---------------------------------------------------------------------------// #ifndef celeritas_cmake_strings_h #define celeritas_cmake_strings_h diff --git a/src/celeritas_config.h.in b/src/celeritas_config.h.in index df395a340f..942fb3dc3c 100644 --- a/src/celeritas_config.h.in +++ b/src/celeritas_config.h.in @@ -12,7 +12,9 @@ * (e.g.) \c CELERITAS_CORE_RNG and \c CELERITAS_CORE_RNG_HIPRAND; options that * are *invalid* (e.g. for missing libraries such as HIP) will have a value of * zero. - *---------------------------------------------------------------------------*/ + * \deprecated This file should be replaced by "corecel/Config.hh". + */ +//---------------------------------------------------------------------------// #ifndef celeritas_config_h #define celeritas_config_h diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index 61bb5c6cb9..978847e7c8 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -6,7 +6,9 @@ /*! * \file celeritas_sys_config.h * \brief System-specific configuration options for Celeritas. - *---------------------------------------------------------------------------*/ + * \deprecated This file should be replaced by "corecel/sys/Config.hh". + */ +//---------------------------------------------------------------------------// #ifndef celeritas_sys_config_h #define celeritas_sys_config_h diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index 66900062f4..bceb0c9091 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -6,7 +6,9 @@ /*! * \file celeritas_version.h * \brief Version metadata for Celeritas. - *---------------------------------------------------------------------------*/ + * \deprecated This file should be replaced by "corecel/Version.hh". + */ +//---------------------------------------------------------------------------// #ifndef celeritas_version_h #define celeritas_version_h diff --git a/src/corecel/DeviceRuntimeApi.hh b/src/corecel/DeviceRuntimeApi.hh index ac87b4dd72..d29112001d 100644 --- a/src/corecel/DeviceRuntimeApi.hh +++ b/src/corecel/DeviceRuntimeApi.hh @@ -3,10 +3,10 @@ * See the top-level COPYRIGHT file for details. * SPDX-License-Identifier: (Apache-2.0 OR MIT) *---------------------------------------------------------------------------*/ -/*! - * \file corecel/DeviceRuntimeApi.hh - * Include CUDA or HIP runtime APIs for compiling with host/cc compiler. - */ +//! \file corecel/DeviceRuntimeApi.hh +//! \brief Include CUDA or HIP runtime APIs for compiling with host/cc +//! compiler. +//---------------------------------------------------------------------------// #pragma once #include "corecel/Config.hh" diff --git a/src/corecel/device_runtime_api.h b/src/corecel/device_runtime_api.h index 55e383c8de..70ef1d6673 100644 --- a/src/corecel/device_runtime_api.h +++ b/src/corecel/device_runtime_api.h @@ -5,8 +5,10 @@ *---------------------------------------------------------------------------*/ /*! * \file corecel/device_runtime_api.h - * Include CUDA or HIP runtime APIs for compiling with host/cc compiler. + * \brief Include CUDA or HIP runtime APIs for compiling with host/cc compiler. + * \deprecated This file should be replaced by "corecel/DeviceRuntimeApi.hh". */ +//---------------------------------------------------------------------------// #ifndef CELERITAS_DEVICE_RUNTIME_API_H #define CELERITAS_DEVICE_RUNTIME_API_H From a5eb109211df65a6df52b4bcefdd93ace5dd6608 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:10:27 -0700 Subject: [PATCH 19/29] move configure_file --- src/CMakeLists.txt | 4 ---- src/corecel/CMakeLists.txt | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d584898208..de90934d3f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,7 +11,6 @@ celeritas_version_to_hex(CELERITAS_VERSION PROJECT_VERSION) celeritas_configure_file("celeritas_version.h.in" "celeritas_version.h" @ONLY) -celeritas_configure_file("corecel/Version.hh.in" "corecel/Version.hh" @ONLY) #----------------------------------------------------------------------------# # Build configuration @@ -91,9 +90,6 @@ endforeach() string(JOIN "\n" CELERITAS_DEPENDENCY_VERSIONS ${CELERITAS_DEPENDENCY_VERSIONS}) celeritas_configure_file("celeritas_sys_config.h.in" "celeritas_sys_config.h" @ONLY) -celeritas_configure_file("corecel/Config.hh.in" "corecel/Config.hh" @ONLY) -celeritas_configure_file("corecel/sys/Config.hh.in" "corecel/sys/Config.hh" @ONLY) - #----------------------------------------------------------------------------# # LIBRARIES #----------------------------------------------------------------------------# diff --git a/src/corecel/CMakeLists.txt b/src/corecel/CMakeLists.txt index 73f3901943..7845b339d4 100644 --- a/src/corecel/CMakeLists.txt +++ b/src/corecel/CMakeLists.txt @@ -57,6 +57,14 @@ list(APPEND SOURCES sys/Version.cc ) +#----------------------------------------------------------------------------# +# CONFIGURE FILES +#----------------------------------------------------------------------------# + +celeritas_configure_file("Version.hh.in" "corecel/Version.hh" @ONLY) +celeritas_configure_file("Config.hh.in" "corecel/Config.hh" @ONLY) +celeritas_configure_file("sys/Config.hh.in" "corecel/sys/Config.hh" @ONLY) + #-----------------------------------------------------------------------------# # Configuration-dependent code/dependencies #-----------------------------------------------------------------------------# From 654fc545195b99c2237a5f0227837b56a40c5413 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:11:02 -0700 Subject: [PATCH 20/29] error if using the wrong standard --- src/celeritas_cmake_strings.h.in | 13 +++++------- src/celeritas_config.h.in | 34 ++++---------------------------- src/celeritas_sys_config.h.in | 13 ++++-------- src/celeritas_version.h.in | 22 ++++----------------- 4 files changed, 17 insertions(+), 65 deletions(-) diff --git a/src/celeritas_cmake_strings.h.in b/src/celeritas_cmake_strings.h.in index 8d2af5ccf3..2b0f0ca95f 100644 --- a/src/celeritas_cmake_strings.h.in +++ b/src/celeritas_cmake_strings.h.in @@ -12,13 +12,10 @@ #ifndef celeritas_cmake_strings_h #define celeritas_cmake_strings_h -#if __cplusplus >= 201703L -# if __GNUC__ > 8 || __clang__ -# pragma GCC warning "celeritas_cmake_strings.h is deprecated and should be replaced by \"corecel/Config.hh\"" -# endif -// uses inline variables introduced in c++17 -# include "corecel/Config.hh" -#else -@CELERITAS_CMAKE_STRINGS_COMPAT@ +#if __cplusplus < 201703L +# error "Celeritas requires C++17 or greater and is not C compatible" #endif + +#include "corecel/Config.hh" + #endif /* celeritas_cmake_strings_h */ diff --git a/src/celeritas_config.h.in b/src/celeritas_config.h.in index 942fb3dc3c..4a80f01a5a 100644 --- a/src/celeritas_config.h.in +++ b/src/celeritas_config.h.in @@ -18,36 +18,10 @@ #ifndef celeritas_config_h #define celeritas_config_h -#if __cplusplus >= 201703L -# if __GNUC__ > 8 || __clang__ -# pragma GCC warning " celeritas_config.h is deprecated and should be replaced by \"corecel/Config.hh\"" -# endif -// uses inline variables introduced in c++17 -# include "corecel/Config.hh" -#else -#cmakedefine01 CELERITAS_USE_CUDA -#cmakedefine01 CELERITAS_USE_GEANT4 -#cmakedefine01 CELERITAS_USE_HEPMC3 -#cmakedefine01 CELERITAS_USE_HIP -#cmakedefine01 CELERITAS_USE_MPI -#cmakedefine01 CELERITAS_USE_OPENMP -#cmakedefine01 CELERITAS_USE_ROOT -#cmakedefine01 CELERITAS_USE_VECGEOM -#cmakedefine01 CELERITAS_USE_PERFETTO - -#cmakedefine01 CELERITAS_DEBUG - -@CELERITAS_REAL_TYPE_CONFIG@ - -@CELERITAS_UNITS_CONFIG@ - -@CELERITAS_OPENMP_CONFIG@ - -@CELERITAS_CORE_GEO_CONFIG@ - -@CELERITAS_CORE_RNG_CONFIG@ - -#define CELERITAS_MAX_BLOCK_SIZE @CELERITAS_MAX_BLOCK_SIZE@ +#if __cplusplus < 201703L +# error "Celeritas requires C++17 or greater and is not C compatible" #endif +#include "corecel/Config.hh" + #endif /* celeritas_config_h */ diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index 978847e7c8..9b2595a2c5 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -12,15 +12,10 @@ #ifndef celeritas_sys_config_h #define celeritas_sys_config_h -#ifdef __cplusplus -# if __GNUC__ > 8 || __clang__ -# pragma GCC warning "celeritas_sys_config.h is deprecated and should be replaced by \"corecel/sys/Config.hh\"" -# endif -# include "corecel/sys/Config.hh" -#else -#cmakedefine01 CELERITAS_HAVE_ROCTX - -@CELERITAS_DEPENDENCY_VERSIONS@ +#if __cplusplus < 201703L +# error "Celeritas requires C++17 or greater and is not C compatible" #endif +#include "corecel/sys/Config.hh" + #endif /* celeritas_sys_config_h */ diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index bceb0c9091..ed2ddc668a 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -12,24 +12,10 @@ #ifndef celeritas_version_h #define celeritas_version_h -#if __cplusplus >= 201703L -# if __GNUC__ > 8 || __clang__ -# pragma GCC warning " celeritas_version.h is deprecated and should be replaced by \"corecel/Version.hh\"" -# endif -// uses inline variables introduced in c++17 -# include "corecel/Version.hh" -#else -/*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per - * component: (major * 256 + minor) * 256 + patch. */ -#define CELERITAS_VERSION @CELERITAS_VERSION@ -//! Celeritas version string with git metadata -static const char celeritas_version[] = "@Celeritas_VERSION_STRING@"; -//! Celeritas major version -static const int celeritas_version_major = @PROJECT_VERSION_MAJOR@; -//! Celeritas minor version -static const int celeritas_version_minor = @PROJECT_VERSION_MINOR@; -//! Celeritas patch version -static const int celeritas_version_patch = @PROJECT_VERSION_PATCH@; +#if __cplusplus < 201703L +# error "Celeritas requires C++17 or greater and is not C compatible" #endif +#include "corecel/Version.hh" + #endif /* celeritas_version_h */ From 066114147f28656f281ccecae4b9923e3ea0a0d0 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:12:30 -0700 Subject: [PATCH 21/29] remove compat strings --- src/CMakeLists.txt | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index de90934d3f..350ab74587 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -48,17 +48,12 @@ if(NOT DEFINED CELERITAS_HOSTNAME) endif() set(CELERITAS_CMAKE_STRINGS) -set(CELERITAS_CMAKE_STRINGS_COMPAT) set(CELERITAS_BUILD_TYPE ${CMAKE_BUILD_TYPE}) foreach(_var BUILD_TYPE HOSTNAME REAL_TYPE UNITS OPENMP CORE_GEO CORE_RNG) set(_var "CELERITAS_${_var}") string(TOLOWER "${_var}" _lower) - set(_var_def "char ${_lower}[] = \"${${_var}}\";\n") string(APPEND CELERITAS_CMAKE_STRINGS - "inline constexpr ${_var_def}" - ) - string(APPEND CELERITAS_CMAKE_STRINGS_COMPAT - "static const ${_var_def}" + "inline constexpr char ${_lower}[] = \"${${_var}}\";\n" ) endforeach() @@ -68,12 +63,8 @@ foreach(_var CLHEP_VERSION Geant4_VERSION VecGeom_VERSION) set(_var "${_var}_STRING") endif() set(_value "${${_var}}") - set(_var_def "char celeritas_${_lower}[] = \"${_value}\";\n") string(APPEND CELERITAS_CMAKE_STRINGS - "inline constexpr ${_var_def}" - ) - string(APPEND CELERITAS_CMAKE_STRINGS_COMPAT - "static const ${_var_def}" + "inline constexpr char celeritas_${_lower}[] = \"${_value}\";\n" ) endforeach() celeritas_configure_file("celeritas_cmake_strings.h.in" "celeritas_cmake_strings.h" @ONLY) From 132e44821df114bc91d803e8929e786aa8c0b098 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:19:07 -0700 Subject: [PATCH 22/29] keep warning message --- src/celeritas_cmake_strings.h.in | 4 ++++ src/celeritas_config.h.in | 4 ++++ src/celeritas_sys_config.h.in | 4 ++++ src/celeritas_version.h.in | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/celeritas_cmake_strings.h.in b/src/celeritas_cmake_strings.h.in index 2b0f0ca95f..f687b00da3 100644 --- a/src/celeritas_cmake_strings.h.in +++ b/src/celeritas_cmake_strings.h.in @@ -16,6 +16,10 @@ # error "Celeritas requires C++17 or greater and is not C compatible" #endif +#if __GNUC__ > 8 || __clang__ +# pragma GCC warning "celeritas_cmake_strings.h is deprecated and should be replaced by \"corecel/Config.hh\"" +#endif + #include "corecel/Config.hh" #endif /* celeritas_cmake_strings_h */ diff --git a/src/celeritas_config.h.in b/src/celeritas_config.h.in index 4a80f01a5a..ef0dc78a75 100644 --- a/src/celeritas_config.h.in +++ b/src/celeritas_config.h.in @@ -22,6 +22,10 @@ # error "Celeritas requires C++17 or greater and is not C compatible" #endif +#if __GNUC__ > 8 || __clang__ +# pragma GCC warning "celeritas_config.h is deprecated and should be replaced by \"corecel/Config.hh\"" +#endif + #include "corecel/Config.hh" #endif /* celeritas_config_h */ diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index 9b2595a2c5..789ba57c53 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -16,6 +16,10 @@ # error "Celeritas requires C++17 or greater and is not C compatible" #endif +#if __GNUC__ > 8 || __clang__ +# pragma GCC warning "celeritas_sys_config.h is deprecated and should be replaced by \"corecel/sys/Config.hh\"" +#endif + #include "corecel/sys/Config.hh" #endif /* celeritas_sys_config_h */ diff --git a/src/celeritas_version.h.in b/src/celeritas_version.h.in index ed2ddc668a..23601197d2 100644 --- a/src/celeritas_version.h.in +++ b/src/celeritas_version.h.in @@ -16,6 +16,10 @@ # error "Celeritas requires C++17 or greater and is not C compatible" #endif +#if __GNUC__ > 8 || __clang__ +# pragma GCC warning "celeritas_version.h is deprecated and should be replaced by \"corecel/Version.hh\"" +#endif + #include "corecel/Version.hh" #endif /* celeritas_version_h */ From c1b14210e48c9e20ee9233e2b313cf7b81dca0b6 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:25:26 -0700 Subject: [PATCH 23/29] Combine corecel/Config and corecel/sys/Config --- .clang-format | 2 +- doc/CMakeLists.txt | 1 - src/celeritas_sys_config.h.in | 6 +++--- src/corecel/CMakeLists.txt | 1 - src/corecel/Config.hh.in | 4 ++++ src/corecel/sys/Config.hh.in | 13 ------------- src/corecel/sys/ScopedProfiling.cc | 1 - src/corecel/sys/ScopedProfiling.hip.cc | 2 +- src/geocel/GeantGeoUtils.hh | 1 - test/celeritas/global/AlongStep.test.cc | 2 +- 10 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 src/corecel/sys/Config.hh.in diff --git a/.clang-format b/.clang-format index 13c3835d6e..543fc4cede 100644 --- a/.clang-format +++ b/.clang-format @@ -75,7 +75,7 @@ IncludeCategories: - Regex: '^"celeritas_[a-z_]+\.h"' Priority: 2 SortPriority: 3 - - Regex: '^"corecel/(sys/)?(Config|Version|DeviceRuntimeApi)\.hh"$' + - Regex: '^"corecel/(Config|Version|DeviceRuntimeApi)\.hh"$' Priority: 2 SortPriority: 3 - Regex: '^"corecel/' diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f58840cc89..504adef546 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -36,7 +36,6 @@ set(_DOXYGEN_EXTRA_SOURCE "${PROJECT_BINARY_DIR}/include/celeritas_version.h" "${PROJECT_BINARY_DIR}/include/corecel/Version.hh" "${PROJECT_BINARY_DIR}/include/corecel/Config.hh" - "${PROJECT_BINARY_DIR}/include/corecel/sys/Config.hh" ) if((CELERITAS_DEBUG AND CELERITAS_BUILD_TESTS) OR CELERITAS_DOXYGEN_BUILD_TESTS) diff --git a/src/celeritas_sys_config.h.in b/src/celeritas_sys_config.h.in index 789ba57c53..4f04d0d766 100644 --- a/src/celeritas_sys_config.h.in +++ b/src/celeritas_sys_config.h.in @@ -6,7 +6,7 @@ /*! * \file celeritas_sys_config.h * \brief System-specific configuration options for Celeritas. - * \deprecated This file should be replaced by "corecel/sys/Config.hh". + * \deprecated This file should be replaced by "corecel/Config.hh". */ //---------------------------------------------------------------------------// #ifndef celeritas_sys_config_h @@ -17,9 +17,9 @@ #endif #if __GNUC__ > 8 || __clang__ -# pragma GCC warning "celeritas_sys_config.h is deprecated and should be replaced by \"corecel/sys/Config.hh\"" +# pragma GCC warning "celeritas_sys_config.h is deprecated and should be replaced by \"corecel/Config.hh\"" #endif -#include "corecel/sys/Config.hh" +#include "corecel/Config.hh" #endif /* celeritas_sys_config_h */ diff --git a/src/corecel/CMakeLists.txt b/src/corecel/CMakeLists.txt index 7845b339d4..084fb02388 100644 --- a/src/corecel/CMakeLists.txt +++ b/src/corecel/CMakeLists.txt @@ -63,7 +63,6 @@ list(APPEND SOURCES celeritas_configure_file("Version.hh.in" "corecel/Version.hh" @ONLY) celeritas_configure_file("Config.hh.in" "corecel/Config.hh" @ONLY) -celeritas_configure_file("sys/Config.hh.in" "corecel/sys/Config.hh" @ONLY) #-----------------------------------------------------------------------------# # Configuration-dependent code/dependencies diff --git a/src/corecel/Config.hh.in b/src/corecel/Config.hh.in index 706cb9a0de..1f142f408e 100644 --- a/src/corecel/Config.hh.in +++ b/src/corecel/Config.hh.in @@ -41,3 +41,7 @@ @CELERITAS_CORE_RNG_CONFIG@ #define CELERITAS_MAX_BLOCK_SIZE @CELERITAS_MAX_BLOCK_SIZE@ + +#cmakedefine01 CELERITAS_HAVE_ROCTX + +@CELERITAS_DEPENDENCY_VERSIONS@ diff --git a/src/corecel/sys/Config.hh.in b/src/corecel/sys/Config.hh.in deleted file mode 100644 index 67fdad5672..0000000000 --- a/src/corecel/sys/Config.hh.in +++ /dev/null @@ -1,13 +0,0 @@ -//-----------------------------------*-C++-*---------------------------------// -// Copyright 2020-2024 UT-Battelle, LLC, and other Celeritas developers. -// See the top-level COPYRIGHT file for details. -// SPDX-License-Identifier: (Apache-2.0 OR MIT) -//---------------------------------------------------------------------------// -//! \file corecel/sys/Config.hh -//! \brief System-specific configuration options for Celeritas. -//---------------------------------------------------------------------------// -#pragma once - -#cmakedefine01 CELERITAS_HAVE_ROCTX - -@CELERITAS_DEPENDENCY_VERSIONS@ \ No newline at end of file diff --git a/src/corecel/sys/ScopedProfiling.cc b/src/corecel/sys/ScopedProfiling.cc index ec65eddc03..cffaa50ef9 100644 --- a/src/corecel/sys/ScopedProfiling.cc +++ b/src/corecel/sys/ScopedProfiling.cc @@ -9,7 +9,6 @@ #include "ScopedProfiling.hh" #include "corecel/Config.hh" -#include "corecel/sys/Config.hh" #include "corecel/Macros.hh" #include "corecel/io/Logger.hh" diff --git a/src/corecel/sys/ScopedProfiling.hip.cc b/src/corecel/sys/ScopedProfiling.hip.cc index c16436de00..7fb98c95e4 100644 --- a/src/corecel/sys/ScopedProfiling.hip.cc +++ b/src/corecel/sys/ScopedProfiling.hip.cc @@ -10,7 +10,7 @@ #include -#include "corecel/sys/Config.hh" +#include "corecel/Config.hh" #include "corecel/io/Logger.hh" diff --git a/src/geocel/GeantGeoUtils.hh b/src/geocel/GeantGeoUtils.hh index 2789ad0abe..e26ec5c2a7 100644 --- a/src/geocel/GeantGeoUtils.hh +++ b/src/geocel/GeantGeoUtils.hh @@ -12,7 +12,6 @@ #include #include "corecel/Config.hh" -#include "corecel/sys/Config.hh" #include "corecel/Assert.hh" #include "corecel/cont/Span.hh" diff --git a/test/celeritas/global/AlongStep.test.cc b/test/celeritas/global/AlongStep.test.cc index 9637f66ee0..eeeada0f65 100644 --- a/test/celeritas/global/AlongStep.test.cc +++ b/test/celeritas/global/AlongStep.test.cc @@ -7,7 +7,7 @@ //---------------------------------------------------------------------------// #include -#include "corecel/sys/Config.hh" +#include "corecel/Config.hh" #include "corecel/ScopedLogStorer.hh" #include "corecel/io/Logger.hh" From c19cf26c8b67e9b617eeca8f1fe24dcf576309b3 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:28:02 -0700 Subject: [PATCH 24/29] update includes --- src/corecel/math/BisectionRootFinder.hh | 3 ++- src/corecel/math/IllinoisRootFinder.hh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/corecel/math/BisectionRootFinder.hh b/src/corecel/math/BisectionRootFinder.hh index c5cf5574a4..77c7b9eb0a 100644 --- a/src/corecel/math/BisectionRootFinder.hh +++ b/src/corecel/math/BisectionRootFinder.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" diff --git a/src/corecel/math/IllinoisRootFinder.hh b/src/corecel/math/IllinoisRootFinder.hh index 57518a3512..7cf354606d 100644 --- a/src/corecel/math/IllinoisRootFinder.hh +++ b/src/corecel/math/IllinoisRootFinder.hh @@ -10,7 +10,8 @@ #include #include -#include "celeritas_config.h" +#include "corecel/Config.hh" + #include "corecel/Assert.hh" #include "corecel/Macros.hh" #include "corecel/Types.hh" From 4a884cce9693d8aa4e2e3a11d555573805391fa8 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 07:40:37 -0700 Subject: [PATCH 25/29] update device_runtime_api.h --- src/corecel/device_runtime_api.h | 69 ++++---------------------------- 1 file changed, 8 insertions(+), 61 deletions(-) diff --git a/src/corecel/device_runtime_api.h b/src/corecel/device_runtime_api.h index 70ef1d6673..9f48e003d4 100644 --- a/src/corecel/device_runtime_api.h +++ b/src/corecel/device_runtime_api.h @@ -12,68 +12,15 @@ #ifndef CELERITAS_DEVICE_RUNTIME_API_H #define CELERITAS_DEVICE_RUNTIME_API_H -#ifdef __cplusplus -# if __GNUC__ > 8 || __clang__ -# pragma GCC warning \ - "corecel/device_runtime_api.h is deprecated and should be replaced by \"corecel/DeviceRuntimeApi.hh\"" -# endif -# include "corecel/DeviceRuntimeApi.hh -#else - -# include "celeritas_config.h" - -# if CELERITAS_USE_HIP && !defined(__HIPCC__) -/* Assume we're on an AMD system but not being invoked by the rocm compiler */ -# define __HIP_PLATFORM_AMD__ 1 -# define __HIP_PLATFORM_HCC__ 1 -# endif - -# if CELERITAS_USE_CUDA -# include -# define THRUST_DEVICE_SYSTEM THRUST_DEVICE_SYSTEM_CUDA -# elif CELERITAS_USE_HIP -# include -# define THRUST_DEVICE_SYSTEM THRUST_DEVICE_SYSTEM_HIP -# endif - -# if CELERITAS_USE_CUDA || CELERITAS_USE_HIP -# include -# endif - -/*! - * \def CELER_EU_PER_CU - * - * Execution units per compute unit. AMD multiprocessors each have 4 SIMD - * units per compute unit, but there is no device attribute or - * compiler definition that provides this information. - * For CUDA, each streaming multiprocessor (MP) is a single "execution unit" - * and a "compute unit". - */ -# if CELERITAS_USE_CUDA -# define CELER_EU_PER_CU 1 -# elif CELERITAS_USE_HIP -# if defined(__HIP_PLATFORM_AMD__) || defined(__HIP_PLATFORM_HCC__) -# define CELER_EU_PER_CU 4 -# elif defined(__HIP_PLATFORM_NVIDIA__) \ - || defined(__HIP_PLATFORM_NVCC__) -# define CELER_EU_PER_CU 1 -# else -# warning "Unknown HIP device configuration" -# define CELER_EU_PER_CU 0 -# endif -# else -/* HIP and CUDA are disabled */ -# define CELER_EU_PER_CU 0 -# endif +#if __cplusplus < 201703L +# error "Celeritas requires C++17 or greater and is not C compatible" +#endif -/*! - * Declare a dummy variable to be referenced in disabled \c CELER_BLAH calls. - * - * With this declaration, the build will fail if this include is missing. - * (Unfortunately, since the use of this symbol is embedded in a macro, IWYU - * won't include this file automatically.) - */ -extern int celeritas_device_runtime_api_h_; +#if __GNUC__ > 8 || __clang__ +# pragma GCC warning \ + "corecel/device_runtime_api.h is deprecated and should be replaced by \"corecel/DeviceRuntimeApi.hh\"" #endif +#include "corecel/DeviceRuntimeApi.hh + #endif /* CELERITAS_DEVICE_RUNTIME_API_H */ \ No newline at end of file From 637c25c39d6533a2d8108ca852842ed8c3bfafe8 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 09:22:30 -0700 Subject: [PATCH 26/29] remove celeritas_*.h rule --- .clang-format | 3 --- 1 file changed, 3 deletions(-) diff --git a/.clang-format b/.clang-format index 543fc4cede..b318475601 100644 --- a/.clang-format +++ b/.clang-format @@ -72,9 +72,6 @@ IncludeCategories: Priority: 1 SortPriority: 2 # Special group for config/version headers as they might be needed before other headers - - Regex: '^"celeritas_[a-z_]+\.h"' - Priority: 2 - SortPriority: 3 - Regex: '^"corecel/(Config|Version|DeviceRuntimeApi)\.hh"$' Priority: 2 SortPriority: 3 From 0c069372e25b7df6ee7264860ed002ae99b1f3ba Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 09:24:12 -0700 Subject: [PATCH 27/29] Rename symbol --- src/corecel/Assert.hh | 34 ++++++++++++++++----------------- src/corecel/DeviceRuntimeApi.hh | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/corecel/Assert.hh b/src/corecel/Assert.hh index 529e1ad29b..87785fb499 100644 --- a/src/corecel/Assert.hh +++ b/src/corecel/Assert.hh @@ -273,11 +273,11 @@ } \ } while (0) #else -# define CELER_CUDA_CALL(STATEMENT) \ - do \ - { \ - CELER_NOT_CONFIGURED("CUDA"); \ - CELER_DISCARD(celeritas_device_runtime_api_h_) \ +# define CELER_CUDA_CALL(STATEMENT) \ + do \ + { \ + CELER_NOT_CONFIGURED("CUDA"); \ + CELER_DISCARD(CorecelDeviceRuntimeApiHh) \ } while (0) #endif @@ -296,7 +296,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/DeviceRuntimeApi.hh . The \c celeritas_device_runtime_api_h_ + * corecel/DeviceRuntimeApi.hh . The \c CorecelDeviceRuntimeApiHh * declaration enforces this when HIP is disabled. */ #if CELERITAS_USE_HIP @@ -312,11 +312,11 @@ } \ } while (0) #else -# define CELER_HIP_CALL(STATEMENT) \ - do \ - { \ - CELER_NOT_CONFIGURED("HIP"); \ - CELER_DISCARD(celeritas_device_runtime_api_h_) \ +# define CELER_HIP_CALL(STATEMENT) \ + do \ + { \ + CELER_NOT_CONFIGURED("HIP"); \ + CELER_DISCARD(CorecelDeviceRuntimeApiHh) \ } while (0) #endif @@ -334,7 +334,7 @@ * \endcode * * \note A file that uses this macro must include \c - * corecel/DeviceRuntimeApi.hh . The \c celeritas_device_runtime_api_h_ + * corecel/DeviceRuntimeApi.hh . The \c CorecelDeviceRuntimeApiHh * declaration enforces this when CUDA/HIP are disabled. */ #if CELERITAS_USE_CUDA @@ -342,11 +342,11 @@ #elif CELERITAS_USE_HIP # define CELER_DEVICE_CALL_PREFIX(STMT) CELER_HIP_CALL(hip##STMT) #else -# define CELER_DEVICE_CALL_PREFIX(STMT) \ - do \ - { \ - CELER_NOT_CONFIGURED("CUDA or HIP"); \ - CELER_DISCARD(celeritas_device_runtime_api_h_) \ +# define CELER_DEVICE_CALL_PREFIX(STMT) \ + do \ + { \ + CELER_NOT_CONFIGURED("CUDA or HIP"); \ + CELER_DISCARD(CorecelDeviceRuntimeApiHh) \ } while (0) #endif diff --git a/src/corecel/DeviceRuntimeApi.hh b/src/corecel/DeviceRuntimeApi.hh index d29112001d..27a2b68c00 100644 --- a/src/corecel/DeviceRuntimeApi.hh +++ b/src/corecel/DeviceRuntimeApi.hh @@ -61,4 +61,4 @@ * (Unfortunately, since the use of this symbol is embedded in a macro, IWYU * won't include this file automatically.) */ -extern int celeritas_device_runtime_api_h_; +extern int CorecelDeviceRuntimeApiHh; From adbb96b9d628b25749470e54d730c12ff4aa4efa Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 09:34:23 -0700 Subject: [PATCH 28/29] add doc --- src/corecel/Config.hh.in | 14 +++++++++++++- src/corecel/Version.hh.in | 10 ++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/corecel/Config.hh.in b/src/corecel/Config.hh.in index 1f142f408e..3e10cb99bc 100644 --- a/src/corecel/Config.hh.in +++ b/src/corecel/Config.hh.in @@ -16,17 +16,25 @@ //---------------------------------------------------------------------------// #pragma once +//---------------------------------------------------------------------------// +// Detailed CMake configuration information +//---------------------------------------------------------------------------// + @CELERITAS_CMAKE_STRINGS@ +//---------------------------------------------------------------------------// +// Configuration-specific options for Celeritas +//---------------------------------------------------------------------------// + #cmakedefine01 CELERITAS_USE_CUDA #cmakedefine01 CELERITAS_USE_GEANT4 #cmakedefine01 CELERITAS_USE_HEPMC3 #cmakedefine01 CELERITAS_USE_HIP #cmakedefine01 CELERITAS_USE_MPI #cmakedefine01 CELERITAS_USE_OPENMP +#cmakedefine01 CELERITAS_USE_PERFETTO #cmakedefine01 CELERITAS_USE_ROOT #cmakedefine01 CELERITAS_USE_VECGEOM -#cmakedefine01 CELERITAS_USE_PERFETTO #cmakedefine01 CELERITAS_DEBUG @@ -42,6 +50,10 @@ #define CELERITAS_MAX_BLOCK_SIZE @CELERITAS_MAX_BLOCK_SIZE@ +//---------------------------------------------------------------------------// +// System-specific configuration options for Celeritas +//---------------------------------------------------------------------------// + #cmakedefine01 CELERITAS_HAVE_ROCTX @CELERITAS_DEPENDENCY_VERSIONS@ diff --git a/src/corecel/Version.hh.in b/src/corecel/Version.hh.in index ee48447f69..eb6e3eafc2 100644 --- a/src/corecel/Version.hh.in +++ b/src/corecel/Version.hh.in @@ -7,9 +7,15 @@ //! \brief Celeritas version. //---------------------------------------------------------------------------// #pragma once -/*! Celeritas version. Encoded as a big-endian hexidecimal with one byte per - * component: (major * 256 + minor) * 256 + patch. */ + +/*! +* Celeritas version as a compile-time constant. +* +* Encoded as a big-endian hexadecimal with one byte per component: +* (major * 256 + minor) * 256 + patch. +*/ #define CELERITAS_VERSION @CELERITAS_VERSION@ + //! Celeritas version string with git metadata inline constexpr char celeritas_version[] = "@Celeritas_VERSION_STRING@"; //! Celeritas major version From cc86a18f9ec334d27a4e926f2570cd0994f3a4f8 Mon Sep 17 00:00:00 2001 From: Julien Esseiva Date: Thu, 25 Jul 2024 09:34:54 -0700 Subject: [PATCH 29/29] run clang-format --- test/celeritas/ext/GeantImporter.test.cc | 2 +- test/geocel/g4/GeantGeo.test.cc | 2 +- test/geocel/vg/Vecgeom.test.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/celeritas/ext/GeantImporter.test.cc b/test/celeritas/ext/GeantImporter.test.cc index bfd44fdfcb..396a093080 100644 --- a/test/celeritas/ext/GeantImporter.test.cc +++ b/test/celeritas/ext/GeantImporter.test.cc @@ -8,12 +8,12 @@ #include "celeritas/ext/GeantImporter.hh" #include "corecel/Config.hh" -#include "corecel/sys/Version.hh" #include "corecel/ScopedLogStorer.hh" #include "corecel/io/Logger.hh" #include "corecel/io/Repr.hh" #include "corecel/io/StringUtils.hh" +#include "corecel/sys/Version.hh" #include "geocel/UnitUtils.hh" #include "celeritas/ext/GeantPhysicsOptionsIO.json.hh" #include "celeritas/ext/GeantSetup.hh" diff --git a/test/geocel/g4/GeantGeo.test.cc b/test/geocel/g4/GeantGeo.test.cc index 81f63d6faf..e067e487cd 100644 --- a/test/geocel/g4/GeantGeo.test.cc +++ b/test/geocel/g4/GeantGeo.test.cc @@ -9,12 +9,12 @@ #include #include "corecel/Config.hh" -#include "corecel/sys/Version.hh" #include "corecel/ScopedLogStorer.hh" #include "corecel/cont/Span.hh" #include "corecel/io/Logger.hh" #include "corecel/io/StringUtils.hh" +#include "corecel/sys/Version.hh" #include "geocel/GeoParamsOutput.hh" #include "geocel/UnitUtils.hh" #include "geocel/g4/GeantGeoData.hh" diff --git a/test/geocel/vg/Vecgeom.test.cc b/test/geocel/vg/Vecgeom.test.cc index b3295b3202..e763a98936 100644 --- a/test/geocel/vg/Vecgeom.test.cc +++ b/test/geocel/vg/Vecgeom.test.cc @@ -10,7 +10,6 @@ #include #include "corecel/Config.hh" -#include "corecel/sys/Version.hh" #include "corecel/ScopedLogStorer.hh" #include "corecel/cont/ArrayIO.hh" @@ -19,6 +18,7 @@ #include "corecel/io/StringUtils.hh" #include "corecel/sys/Device.hh" #include "corecel/sys/Environment.hh" +#include "corecel/sys/Version.hh" #include "geocel/GeantGeoUtils.hh" #include "geocel/GeoParamsOutput.hh" #include "geocel/UnitUtils.hh"