10
10
// Project include(s).
11
11
#include " traccc/definitions/primitives.hpp"
12
12
#include " traccc/definitions/qualifiers.hpp"
13
+ #include " traccc/device/concepts/barrier.hpp"
14
+ #include " traccc/device/concepts/thread_id.hpp"
13
15
#include " traccc/edm/measurement.hpp"
14
16
#include " traccc/edm/track_parameters.hpp"
15
17
@@ -22,43 +24,47 @@ namespace traccc::device {
22
24
// / If the chi2 of the measurement < chi2_max, its measurement index and the
23
25
// / index of the link from the previous step are added to the link container.
24
26
// /
25
- // / @param[in] globalIndex The index of the current thread
27
+ // / @param[in] thread_id A thread identifier object
28
+ // / @param[in] barrier A block-wide barrier
26
29
// / @param[in] cfg Track finding config object
27
30
// / @param[in] det_data Detector view object
28
31
// / @param[in] measurements_view Measurements container view
32
+ // / @param[in] in_params_view Input parameters
33
+ // / @param[in] n_in_params The number of input params
34
+ // / @param[in] barcodes_view View of a measurement -> barcode map
29
35
// / @param[in] upper_bounds_view Upper bounds of measurements unique w.r.t
30
36
// / barcode
31
- // / @param[in] in_params_view Input parameters
32
- // / @param[in] n_measurements_prefix_sum_view Prefix sum of the number of
33
- // / measurements per parameter
34
- // / @param[in] ref_meas_idx_view The first index of measurements per parameter
35
37
// / @param[in] prev_links_view link container from the previous step
36
38
// / @param[in] prev_param_to_link_view param_to_link container from the
37
39
// / previous step
38
40
// / @param[in] step Step index
39
41
// / @param[in] n_max_candidates Number of maximum candidates
40
42
// / @param[out] out_params_view Output parameters
41
- // / @param[out] n_candidates_view Number of candidates per input parameter
42
43
// / @param[out] links_view link container for the current step
43
44
// / @param[out] n_total_candidates The number of total candidates for the
44
45
// / current step
46
+ // / @param shared_num_candidates Shared memory scratch space
47
+ // / @param shared_candidates Shared memory scratch space
48
+ // / @param shared_candidates_size Shared memory scratch space
45
49
// /
46
- template <typename detector_t , typename config_t >
50
+ template <concepts::thread_id1 thread_id_t , concepts::barrier barrier_t ,
51
+ typename detector_t , typename config_t >
47
52
TRACCC_DEVICE inline void find_tracks (
48
- std:: size_t globalIndex , const config_t cfg,
53
+ thread_id_t & thread_id, barrier_t & barrier , const config_t cfg,
49
54
typename detector_t ::view_type det_data,
50
55
measurement_collection_types::const_view measurements_view,
51
56
bound_track_parameters_collection_types::const_view in_params_view,
52
- vecmem::data::vector_view< const unsigned int >
53
- n_measurements_prefix_sum_view ,
54
- vecmem::data::vector_view<const unsigned int > ref_meas_idx_view ,
57
+ const unsigned int n_in_params,
58
+ vecmem::data::vector_view< const detray::geometry::barcode> barcodes_view ,
59
+ vecmem::data::vector_view<const unsigned int > upper_bounds_view ,
55
60
vecmem::data::vector_view<const candidate_link> prev_links_view,
56
61
vecmem::data::vector_view<const unsigned int > prev_param_to_link_view,
57
62
const unsigned int step, const unsigned int & n_max_candidates,
58
63
bound_track_parameters_collection_types::view out_params_view,
59
- vecmem::data::vector_view<unsigned int > n_candidates_view,
60
64
vecmem::data::vector_view<candidate_link> links_view,
61
- unsigned int & n_total_candidates);
65
+ unsigned int & n_total_candidates, unsigned int * shared_num_candidates,
66
+ std::pair<unsigned int , unsigned int >* shared_candidates,
67
+ unsigned int & shared_candidates_size);
62
68
63
69
} // namespace traccc::device
64
70
0 commit comments