14 #include "../Utilities/Arrays.hpp"
18 #include "vecmem/containers/data/jagged_vector_view.hpp"
19 #include "vecmem/containers/data/vector_view.hpp"
20 #include "vecmem/containers/device_vector.hpp"
21 #include "vecmem/containers/jagged_device_vector.hpp"
24 #include <CL/sycl.hpp>
29 namespace Acts::Sycl::detail {
32 template <SpacePo
intType OtherSPType>
35 static_assert((OtherSPType == SpacePointType::Bottom) ||
36 (OtherSPType == SpacePointType::Top),
37 "Class must be instantiated with either "
38 "Acts::Sycl::detail::SpacePointType::Bottom or "
39 "Acts::Sycl::detail::SpacePointType::Top");
43 DupletSearch(vecmem::data::vector_view<const DeviceSpacePoint> middleSPs,
44 vecmem::data::vector_view<const DeviceSpacePoint> otherSPs,
45 vecmem::data::jagged_vector_view<uint32_t> middleOtherSPIndices,
55 const auto middleIndex = item.get_global_id(0);
56 const auto otherIndex = item.get_global_id(1);
69 const vecmem::device_vector<const DeviceSpacePoint> middleSPs(
m_middleSPs);
71 const vecmem::device_vector<const DeviceSpacePoint> otherSPs(
m_otherSPs);
77 float deltaR = 0.0f, cotTheta = 0.0f;
78 if constexpr (OtherSPType == SpacePointType::Bottom) {
79 deltaR = middleSP.
r - otherSP.
r;
80 cotTheta = (middleSP.
z - otherSP.
z) / deltaR;
82 deltaR = otherSP.
r - middleSP.
r;
83 cotTheta = (otherSP.
z - middleSP.
z) / deltaR;
85 const float zOrigin = middleSP.
z - middleSP.
r * cotTheta;
93 vecmem::jagged_device_vector<uint32_t> middleOtherSPIndices(
95 middleOtherSPIndices.at(middleIndex).push_back(otherIndex);
103 vecmem::data::vector_view<const DeviceSpacePoint>
m_otherSPs;