Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:08

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2023-2025 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // Local include(s).
0011 #include "traccc/device/global_index.hpp"
0012 #include "traccc/edm/device/triplet_counter.hpp"
0013 
0014 // Project include(s).
0015 #include "traccc/definitions/qualifiers.hpp"
0016 
0017 namespace traccc::device {
0018 
0019 /// Function used for performing a reduction on the triplet counters
0020 ///
0021 /// The @c count_triplets function will only count the number of triplets per
0022 /// each middle spacepoint independently. Thus, we need to perform a sum over
0023 /// all middle spacepoints, as well as correctly claim the positions in which
0024 /// the triplets will be filled in @c find:triplets
0025 ///
0026 /// @param[in] globalIndex    The index of the current thread
0027 /// @param[in] dc_view        Collection of doublet counters
0028 /// @param[inout] spM_tc_view Collection of triplet counters per middle
0029 /// spacepoint
0030 /// @param[out] num_triplets  The total number of triplets
0031 TRACCC_HOST_DEVICE
0032 inline void reduce_triplet_counts(
0033     global_index_t globalIndex,
0034     const doublet_counter_collection_types::const_view& dc_view,
0035     triplet_counter_spM_collection_types::view spM_tc_view,
0036     unsigned int& num_triplets);
0037 
0038 }  // namespace traccc::device
0039 
0040 // Include the implementation.
0041 #include "traccc/seeding/device/impl/reduce_triplet_counts.ipp"