Skip to content
Snippets Groups Projects
Commit fb887982 authored by Christos Anastopoulos's avatar Christos Anastopoulos Committed by Adam Edward Barton
Browse files

AtlasFieldCache flatten also in opt

AtlasFieldCache flatten also in opt
parent ca51daf8
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,5 @@ if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/src/AtlasFieldCache.cxx
PROPERTIES
COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
COMPILE_DEFINITIONS "FLATTEN" )
COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
endif()
......@@ -26,13 +26,13 @@ namespace {
constexpr double defaultB = 0.1 * Gaudi::Units::gauss;
}
#if defined(FLATTEN) && defined(__GNUC__)
#if defined(__GNUC__)
// We compile this package with optimization, even in debug builds; otherwise,
// the heavy use of Eigen makes it too slow. However, from here we may call
// to out-of-line Eigen code that is linked from other DSOs; in that case,
// it would not be optimized. Avoid this by forcing all Eigen code
// to be inlined here if possible.
__attribute__((flatten))
[[gnu::flatten]]
#endif
void
MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment