diff --git a/core/include/detray/core/concepts.hpp b/core/include/detray/core/concepts.hpp index 0118f0833..1de7c8a83 100644 --- a/core/include/detray/core/concepts.hpp +++ b/core/include/detray/core/concepts.hpp @@ -9,6 +9,7 @@ // Project include(s) #include "detray/core/detail/type_traits.hpp" +#include "detray/geometry/mask.hpp" namespace detray::concepts { @@ -43,4 +44,11 @@ template concept has_material_maps = detail::contains_material_maps_v; +/// Check whether the detector defines the shape type @tparam shape_t +template +concept has_mask = + types::contains>; + } // namespace detray::concepts diff --git a/core/include/detray/definitions/detail/qualifiers.hpp b/core/include/detray/definitions/detail/qualifiers.hpp index 2c69d2b3f..4b1ed1c2d 100644 --- a/core/include/detray/definitions/detail/qualifiers.hpp +++ b/core/include/detray/definitions/detail/qualifiers.hpp @@ -26,6 +26,12 @@ #define DETRAY_HOST_DEVICE #endif +#if defined(__CUDACC__) || defined(__HIP__) +#define DETRAY_SYNC_WARP __syncwarp(); +#else +#define DETRAY_SYNC_WARP +#endif + #if defined(__CUDACC__) || defined(__HIP__) #define DETRAY_ALIGN(x) __align__(x) #else diff --git a/core/include/detray/navigation/caching_navigator.hpp b/core/include/detray/navigation/caching_navigator.hpp index 1d0bef203..711f75f9c 100644 --- a/core/include/detray/navigation/caching_navigator.hpp +++ b/core/include/detray/navigation/caching_navigator.hpp @@ -140,7 +140,7 @@ class caching_navigator : navigation::trust_level::e_fair); } - private: + // private: /// Insert a new element @param new_candidate before position @param pos DETRAY_HOST_DEVICE constexpr void insert(candidate_const_itr_t pos, diff --git a/core/include/detray/navigation/detail/intersection_kernel_new.hpp b/core/include/detray/navigation/detail/intersection_kernel_new.hpp new file mode 100644 index 000000000..63a8a00e3 --- /dev/null +++ b/core/include/detray/navigation/detail/intersection_kernel_new.hpp @@ -0,0 +1,356 @@ +/** Detray library, part of the ACTS project (R&D line) + * + * (c) 2021-2024 CERN for the benefit of the ACTS project + * + * Mozilla Public License Version 2.0 + */ + +#pragma once + +// Project include(s) +#include "detray/core/concepts.hpp" +#include "detray/definitions/algebra.hpp" +#include "detray/definitions/algorithms.hpp" +#include "detray/definitions/detail/qualifiers.hpp" +#include "detray/definitions/units.hpp" +#include "detray/geometry/concepts.hpp" +#include "detray/geometry/shapes/concentric_cylinder2D.hpp" +#include "detray/geometry/shapes/cylinder2D.hpp" +#include "detray/geometry/shapes/rectangle2D.hpp" +#include "detray/navigation/intersection/intersection.hpp" +#include "detray/navigation/intersection/intersection_config.hpp" +#include "detray/tracks/ray.hpp" +#include "detray/utils/invalid_values.hpp" +#include "detray/utils/ranges.hpp" + +namespace detray::intersection { + +namespace detail { + +/// Filter the possible intersector types by the underlying geometry of the +/// detector surfaces (deduced from the mask shapes) +template