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 {
36 const uint32_t numTripletFilterThreads,
37 vecmem::data::vector_view<uint32_t> sumBotMidView,
38 const uint32_t firstMiddle,
39 vecmem::data::vector_view<uint32_t> indMidBotCompView,
40 vecmem::data::vector_view<uint32_t> indBotDupletView,
41 vecmem::data::vector_view<uint32_t> sumBotTopCombView,
42 vecmem::data::jagged_vector_view<uint32_t> midTopDupletView,
43 vecmem::data::vector_view<detail::DeviceTriplet> curvImpactView,
44 vecmem::data::vector_view<const detail::DeviceSpacePoint> topSPsView,
45 vecmem::data::vector_view<const detail::DeviceSpacePoint> middleSPsView,
46 vecmem::data::vector_view<const detail::DeviceSpacePoint> bottomSPsView,
47 vecmem::data::vector_view<uint32_t> countTripletsView,
48 vecmem::data::vector_view<detail::SeedData> seedArrayView,
77 const auto mid = deviceIndMidBot[
idx];
78 const auto bot = deviceIndBotDuplets[
idx];
79 const auto sumCombUptoFirstMiddle = sumBotTopCombPrefix[
m_firstMiddle];
80 const auto tripletBegin =
81 sumBotTopCombPrefix[mid] - sumCombUptoFirstMiddle +
82 (
idx - sumBotMidPrefix[mid]) * midTopDuplets.at(mid).size();
83 const auto tripletEnd = tripletBegin + deviceCountTriplets[
idx];
84 const vecmem::device_vector<detail::DeviceTriplet> deviceCurvImpactConst(
86 for (
auto i1 = tripletBegin; i1 < tripletEnd; ++i1) {
87 const auto current = deviceCurvImpactConst[i1];
88 const auto top = current.topSPIndex;
90 const auto invHelixDiameter = current.curvature;
91 const auto lowerLimitCurv =
93 const auto upperLimitCurv =
95 const vecmem::device_vector<const detail::DeviceSpacePoint> topSPs(
97 const auto currentTop_r = topSPs[top].r;
100 uint32_t compatCounter = 0;
104 float compatibleSeedR[2];
105 for (
auto i2 = tripletBegin;
108 const auto other = deviceCurvImpactConst[i2];
110 const auto otherCurv = other.curvature;
111 const auto otherTop_r = topSPs[other.topSPIndex].r;
112 const float deltaR = cl::sycl::abs(currentTop_r - otherTop_r);
114 otherCurv >= lowerLimitCurv && otherCurv <= upperLimitCurv) {
116 for (; c < compatCounter &&
117 cl::sycl::abs(compatibleSeedR[c] - otherTop_r) >=
121 if (c == compatCounter) {
122 compatibleSeedR[
c] = otherTop_r;
128 const vecmem::device_vector<const detail::DeviceSpacePoint> middleSPs(
131 const auto bottomSP = bottomSPs[bot];
132 const auto middleSP = middleSPs[mid];
133 const auto topSP = topSPs[top];
144 seedArray.push_back(D);
159 vecmem::data::vector_view<const detail::DeviceSpacePoint>
m_topSPsView;