Skip to content
Open
8 changes: 8 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ if(DETRAY_VC_SOA_PLUGIN)
)
endif()

if(DETRAY_FASTOR_PLUGIN)
detray_add_library( detray_core_fastor core_fastor )
target_link_libraries(
detray_core_fastor
INTERFACE detray::core detray::algebra_fastor
)
endif()

# Test the public headers of the detray core libraries.
if(BUILD_TESTING AND DETRAY_BUILD_TESTING)
string(
Expand Down
2 changes: 2 additions & 0 deletions core/include/detray/definitions/algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include "detray/plugins/algebra/vc_aos_definitions.hpp"
#elif DETRAY_ALGEBRA_VC_SOA
#include "detray/plugins/algebra/vc_soa_definitions.hpp"
#elif DETRAY_ALGEBRA_FASTOR
#include "detray/plugins/algebra/fastor_definitions.hpp"
#else
#error "No algebra plugin selected! Please link to one of the algebra plugins."
#endif
Expand Down
4 changes: 2 additions & 2 deletions core/include/detray/navigation/navigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ class navigator {
init(track, navigation, cfg, ctx);
is_init = true;

// Fresh initialization, reset trust and hearbeat even though we are
// on inner portal
// Fresh initialization, reset trust and heartbeat even though we
// are on inner portal
navigation.m_trust_level = navigation::trust_level::e_full;
navigation.m_heartbeat = true;
}
Expand Down
3 changes: 3 additions & 0 deletions plugins/algebra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ endif()
if(DETRAY_VC_SOA_PLUGIN)
add_subdirectory(vc_soa)
endif()
if(DETRAY_FASTOR_PLUGIN)
add_subdirectory(fastor)
endif()
36 changes: 36 additions & 0 deletions plugins/algebra/fastor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Detray library, part of the ACTS project (R&D line)
#
# (c) 2025 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

message(STATUS "Building the 'detray::algebra_fastor' plugin")

# A sanity check.
if(NOT ALGEBRA_PLUGINS_INCLUDE_FASTOR)
message(
WARNING
"Fastor not available from Algebra Plugins. "
"The configuration will likely fail."
)
endif()

# Set up the library.
detray_add_library( detray_algebra_fastor algebra_fastor
"include/detray/plugins/algebra/fastor_definitions.hpp"
)
target_link_libraries(
detray_algebra_fastor
INTERFACE algebra::utils algebra::fastor_fastor vecmem::core
)
target_compile_definitions(
detray_algebra_fastor
INTERFACE
DETRAY_CUSTOM_SCALARTYPE=${DETRAY_CUSTOM_SCALARTYPE}
DETRAY_ALGEBRA_FASTOR
)

# Set up tests for the public header(s) of detray::algebra_fastor.
detray_test_public_headers( detray_algebra_fastor
"detray/plugins/algebra/fastor_definitions.hpp"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/** Detray library, part of the ACTS project (R&D line)
*
* (c) 2023-2025 CERN for the benefit of the ACTS project
*
* Mozilla Public License Version 2.0
*/

#pragma once

// Algebra-Plugins include
#include "algebra/fastor_fastor.hpp"

namespace detray {

/// The plugin definition
template <algebra::concepts::scalar scalar_t>
using fastor = algebra::plugin::fastor<scalar_t>;

namespace getter {

using algebra::fastor::storage::block;
using algebra::fastor::storage::element;
using algebra::fastor::storage::set_block;
using algebra::fastor::storage::vector;

} // namespace getter

namespace vector {

using algebra::fastor::math::cross;
using algebra::fastor::math::dot;
using algebra::fastor::math::eta;
using algebra::fastor::math::norm;
using algebra::fastor::math::normalize;

using algebra::fastor::math::perp;
using algebra::fastor::math::phi;
using algebra::fastor::math::theta;

} // namespace vector

namespace matrix {

using algebra::fastor::math::determinant;
using algebra::fastor::math::identity;
using algebra::fastor::math::inverse;
using algebra::fastor::math::set_identity;
using algebra::fastor::math::set_zero;
using algebra::fastor::math::transpose;
using algebra::fastor::math::zero;

} // namespace matrix

} // namespace detray
5 changes: 5 additions & 0 deletions tests/benchmarks/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,8 @@ if(DETRAY_VC_SOA_PLUGIN)
# detray_add_soa_benchmark( eigen )
# detray_add_soa_benchmark( vc_aos )
endif()

# Build the Fastor benchmark executable.
if(DETRAY_FASTOR_PLUGIN)
detray_add_cpu_benchmark( fastor )
endif()
Loading