diff --git a/core/include/traccc/fitting/details/fit_tracks.hpp b/core/include/traccc/fitting/details/fit_tracks.hpp index a5407f8ff..e6fc0f789 100644 --- a/core/include/traccc/fitting/details/fit_tracks.hpp +++ b/core/include/traccc/fitting/details/fit_tracks.hpp @@ -51,7 +51,7 @@ track_state_container_types::host fit_tracks( // Make a vector of track states for this track. vecmem::vector > - input_states; + input_states{&mr}; input_states.reserve(track_candidates.get_items()[i].size()); for (auto& measurement : track_candidates.get_items()[i]) { input_states.emplace_back(measurement); diff --git a/examples/run/alpaka/seq_example_alpaka.cpp b/examples/run/alpaka/seq_example_alpaka.cpp index 2e2d398ed..24b2f2c80 100644 --- a/examples/run/alpaka/seq_example_alpaka.cpp +++ b/examples/run/alpaka/seq_example_alpaka.cpp @@ -159,9 +159,11 @@ int seq_run(const traccc::opts::detector& detector_opts, traccc::performance::timer t("File reading (cpu)", elapsedTimes); // Read the cells from the relevant event file into host memory. + static constexpr bool DEDUPLICATE = true; traccc::io::read_cells(cells_per_event, event, input_opts.directory, &host_det_descr, - input_opts.format); + input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); } // stop measuring file reading timer n_cells += cells_per_event.size(); diff --git a/examples/run/common/throughput_mt.ipp b/examples/run/common/throughput_mt.ipp index d19537943..5d4f63dcb 100644 --- a/examples/run/common/throughput_mt.ipp +++ b/examples/run/common/throughput_mt.ipp @@ -108,17 +108,22 @@ int throughput_mt(std::string_view description, int argc, char* argv[], performance::timer t{"File reading", times}; // Set up the container for the input events. input.reserve(input_opts.events); - for (std::size_t i = 0; i < input_opts.events; ++i) { + const std::size_t first_event = input_opts.skip; + const std::size_t last_event = input_opts.skip + input_opts.events; + for (std::size_t i = first_event; i < last_event; ++i) { input.push_back({uncached_host_mr}); } // Read the input cells into memory in parallel. tbb::parallel_for( - tbb::blocked_range{0u, input_opts.events}, + tbb::blocked_range{first_event, last_event}, [&](const tbb::blocked_range& event_range) { for (std::size_t event = event_range.begin(); event != event_range.end(); ++event) { - io::read_cells(input.at(event), event, input_opts.directory, - &det_descr, input_opts.format); + static constexpr bool DEDUPLICATE = true; + io::read_cells(input.at(event - input_opts.skip), event, + input_opts.directory, &det_descr, + input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); } }); } diff --git a/examples/run/common/throughput_st.ipp b/examples/run/common/throughput_st.ipp index e1bcfa67e..5479e492c 100644 --- a/examples/run/common/throughput_st.ipp +++ b/examples/run/common/throughput_st.ipp @@ -92,10 +92,13 @@ int throughput_st(std::string_view description, int argc, char* argv[], performance::timer t{"File reading", times}; // Read the input cells into memory event-by-event. input.reserve(input_opts.events); - for (std::size_t i = 0; i < input_opts.events; ++i) { + for (std::size_t i = input_opts.skip; + i < input_opts.skip + input_opts.events; ++i) { input.push_back({uncached_host_mr}); + static constexpr bool DEDUPLICATE = true; io::read_cells(input.back(), i, input_opts.directory, &det_descr, - input_opts.format); + input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); } } diff --git a/examples/run/cpu/full_chain_algorithm.cpp b/examples/run/cpu/full_chain_algorithm.cpp index 8756b945a..6d56aaa26 100644 --- a/examples/run/cpu/full_chain_algorithm.cpp +++ b/examples/run/cpu/full_chain_algorithm.cpp @@ -66,9 +66,8 @@ full_chain_algorithm::output_type full_chain_algorithm::operator()( *m_detector, m_field, measurements_view, track_params_view); // Run the track fitting, and return its results. - const track_candidate_container_types::const_view - track_candidates_view = get_data(track_candidates); - return m_fitting(*m_detector, m_field, track_candidates_view); + const auto track_candidates_data = get_data(track_candidates); + return m_fitting(*m_detector, m_field, track_candidates_data); } // If not, just return an empty object. else { diff --git a/examples/run/cpu/seq_example.cpp b/examples/run/cpu/seq_example.cpp index df80a11cc..c8aad4760 100644 --- a/examples/run/cpu/seq_example.cpp +++ b/examples/run/cpu/seq_example.cpp @@ -170,9 +170,11 @@ int seq_run(const traccc::opts::input_data& input_opts, { traccc::performance::timer timer{"Read cells", elapsedTimes}; // Read the cells from the relevant event file + static constexpr bool DEDUPLICATE = true; traccc::io::read_cells(cells_per_event, event, input_opts.directory, &det_descr, - input_opts.format); + input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); } /*------------------- diff --git a/examples/run/cpu/throughput_mt.cpp b/examples/run/cpu/throughput_mt.cpp index 19c438dfc..ab79e836d 100644 --- a/examples/run/cpu/throughput_mt.cpp +++ b/examples/run/cpu/throughput_mt.cpp @@ -1,6 +1,6 @@ /** TRACCC library, part of the ACTS project (R&D line) * - * (c) 2021-2022 CERN for the benefit of the ACTS project + * (c) 2021-2024 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -13,6 +13,8 @@ int main(int argc, char* argv[]) { // Execute the throughput test. + static constexpr bool USE_HOST_CACHING = false; return traccc::throughput_mt( - "Multi-threaded host-only throughput tests", argc, argv); + "Multi-threaded host-only throughput tests", argc, argv, + USE_HOST_CACHING); } diff --git a/examples/run/cpu/throughput_st.cpp b/examples/run/cpu/throughput_st.cpp index 7ee2b85b1..202b50c50 100644 --- a/examples/run/cpu/throughput_st.cpp +++ b/examples/run/cpu/throughput_st.cpp @@ -1,6 +1,6 @@ /** TRACCC library, part of the ACTS project (R&D line) * - * (c) 2021-2022 CERN for the benefit of the ACTS project + * (c) 2021-2024 CERN for the benefit of the ACTS project * * Mozilla Public License Version 2.0 */ @@ -13,6 +13,8 @@ int main(int argc, char* argv[]) { // Execute the throughput test. + static constexpr bool USE_HOST_CACHING = false; return traccc::throughput_st( - "Single-threaded host-only throughput tests", argc, argv); + "Single-threaded host-only throughput tests", argc, argv, + USE_HOST_CACHING); } diff --git a/examples/run/cuda/seq_example_cuda.cpp b/examples/run/cuda/seq_example_cuda.cpp index 591a2f47f..449260e7e 100644 --- a/examples/run/cuda/seq_example_cuda.cpp +++ b/examples/run/cuda/seq_example_cuda.cpp @@ -224,9 +224,11 @@ int seq_run(const traccc::opts::detector& detector_opts, traccc::performance::timer t("File reading (cpu)", elapsedTimes); // Read the cells from the relevant event file into host memory. + static constexpr bool DEDUPLICATE = true; traccc::io::read_cells(cells_per_event, event, input_opts.directory, &host_det_descr, - input_opts.format); + input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); } // stop measuring file reading timer n_cells += cells_per_event.size(); diff --git a/examples/run/openmp/par_example.cpp b/examples/run/openmp/par_example.cpp index 45094c5aa..dab152a72 100644 --- a/examples/run/openmp/par_example.cpp +++ b/examples/run/openmp/par_example.cpp @@ -83,8 +83,10 @@ int par_run(const traccc::opts::input_data& input_opts, // Read the cells from the relevant event file traccc::edm::silicon_cell_collection::host cells_per_event{resource}; + static constexpr bool DEDUPLICATE = true; traccc::io::read_cells(cells_per_event, event, input_opts.directory, - &det_descr, input_opts.format); + &det_descr, input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); /*------------------- Clusterization diff --git a/examples/run/sycl/seq_example_sycl.sycl b/examples/run/sycl/seq_example_sycl.sycl index 68d730b08..3ef032b37 100644 --- a/examples/run/sycl/seq_example_sycl.sycl +++ b/examples/run/sycl/seq_example_sycl.sycl @@ -191,9 +191,11 @@ int seq_run(const traccc::opts::detector& detector_opts, traccc::performance::timer t("File reading (cpu)", elapsedTimes); // Read the cells from the relevant event file into host memory. + static constexpr bool DEDUPLICATE = true; traccc::io::read_cells(cells_per_event, event, input_opts.directory, &host_det_descr, - input_opts.format); + input_opts.format, DEDUPLICATE, + input_opts.use_acts_geom_source); } // stop measuring file reading timer n_cells += cells_per_event.size();