Warning, /acts/Traccc/device/sycl/src/seeding/seed_parameter_estimation_algorithm.sycl is written in an unsupported language. File is not indexed.
0001 /** TRACCC library, part of the ACTS project (R&D line)
0002 *
0003 * (c) 2021-2026 CERN for the benefit of the ACTS project
0004 *
0005 * Mozilla Public License Version 2.0
0006 */
0007
0008 // SYCL include
0009 #include <sycl/sycl.hpp>
0010
0011 // Local include(s).
0012 #include "../utils/calculate1DimNdRange.hpp"
0013 #include "../utils/get_queue.hpp"
0014 #include "../utils/global_index.hpp"
0015 #include "../utils/magnetic_field_types.hpp"
0016 #include "traccc/sycl/seeding/seed_parameter_estimation_algorithm.hpp"
0017
0018 // Project include(s).
0019 #include "traccc/seeding/device/estimate_track_params.hpp"
0020
0021 namespace traccc::sycl {
0022
0023 seed_parameter_estimation_algorithm::seed_parameter_estimation_algorithm(
0024 const track_params_estimation_config& config,
0025 const traccc::memory_resource& mr, const vecmem::copy& copy,
0026 queue_wrapper& queue, std::unique_ptr<const Logger> logger)
0027 : device::seed_parameter_estimation_algorithm(config, mr, copy,
0028 std::move(logger)),
0029 sycl::algorithm_base(queue) {}
0030
0031 void seed_parameter_estimation_algorithm::estimate_seed_params_kernel(
0032 const struct estimate_seed_params_kernel_payload& payload) const {
0033 ::sycl::queue& squeue = details::get_queue(queue());
0034 squeue.throw_asynchronous();
0035 magnetic_field_visitor<bfield_type_list<scalar>>(
0036 payload.bfield, [&]<typename bfield_view_t>(const bfield_view_t& bfield) {
0037 squeue.submit([&](::sycl::handler& h) {
0038 h.parallel_for(
0039 details::calculate1DimNdRange(payload.n_seeds, warp_size() * 4),
0040 [config = payload.config, measurements = payload.measurements,
0041 spacepoints = payload.spacepoints, seeds = payload.seeds,
0042 bfield = bfield,
0043 params = payload.params](::sycl::nd_item<1> item) {
0044 device::estimate_track_params(details::global_index(item),
0045 config, measurements, spacepoints,
0046 seeds, bfield, params);
0047 });
0048 });
0049 });
0050 }
0051
0052 } // namespace traccc::sycl