-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #760 from krasznaa/DeTemplateSYCL-main-20241030
De-Template the SYCL Library, main branch (2024.11.01.)
- Loading branch information
Showing
18 changed files
with
597 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 0 additions & 66 deletions
66
device/sycl/include/traccc/sycl/fitting/fitting_algorithm.hpp
This file was deleted.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
device/sycl/include/traccc/sycl/fitting/kalman_fitting_algorithm.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2022-2024 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// SYCL library include(s). | ||
#include "traccc/sycl/utils/queue_wrapper.hpp" | ||
|
||
// Project include(s). | ||
#include "traccc/edm/track_candidate.hpp" | ||
#include "traccc/edm/track_state.hpp" | ||
#include "traccc/fitting/fitting_config.hpp" | ||
#include "traccc/geometry/detector.hpp" | ||
#include "traccc/utils/algorithm.hpp" | ||
#include "traccc/utils/memory_resource.hpp" | ||
|
||
// Detray include(s). | ||
#include <detray/detectors/bfield.hpp> | ||
|
||
// VecMem include(s). | ||
#include <vecmem/utils/copy.hpp> | ||
|
||
// System include(s). | ||
#include <functional> | ||
|
||
namespace traccc::sycl { | ||
|
||
/// Kalman filter based track fitting algorithm | ||
class kalman_fitting_algorithm | ||
: public algorithm<track_state_container_types::buffer( | ||
const default_detector::view&, | ||
const detray::bfield::const_field_t::view_t&, | ||
const track_candidate_container_types::const_view&)>, | ||
public algorithm<track_state_container_types::buffer( | ||
const telescope_detector::view&, | ||
const detray::bfield::const_field_t::view_t&, | ||
const track_candidate_container_types::const_view&)> { | ||
|
||
public: | ||
/// Configuration type | ||
using config_type = fitting_config; | ||
/// Output type | ||
using output_type = track_state_container_types::buffer; | ||
|
||
/// Constructor with the algorithm's configuration | ||
/// | ||
/// @param config The configuration object | ||
/// | ||
kalman_fitting_algorithm(const config_type& config, | ||
const traccc::memory_resource& mr, | ||
vecmem::copy& copy, queue_wrapper queue); | ||
|
||
/// Execute the algorithm | ||
/// | ||
/// @param det The (default) detector object | ||
/// @param field The (constant) magnetic field object | ||
/// @param track_candidates All track candidates to fit | ||
/// | ||
/// @return A container of the fitted track states | ||
/// | ||
output_type operator()(const default_detector::view& det, | ||
const detray::bfield::const_field_t::view_t& field, | ||
const track_candidate_container_types::const_view& | ||
track_candidates) const override; | ||
|
||
/// Execute the algorithm | ||
/// | ||
/// @param det The (telescope) detector object | ||
/// @param field The (constant) magnetic field object | ||
/// @param track_candidates All track candidates to fit | ||
/// | ||
/// @return A container of the fitted track states | ||
/// | ||
output_type operator()(const telescope_detector::view& det, | ||
const detray::bfield::const_field_t::view_t& field, | ||
const track_candidate_container_types::const_view& | ||
track_candidates) const override; | ||
|
||
private: | ||
/// Algorithm configuration | ||
config_type m_config; | ||
/// Memory resource used by the algorithm | ||
traccc::memory_resource m_mr; | ||
/// Copy object used by the algorithm | ||
std::reference_wrapper<vecmem::copy> m_copy; | ||
/// Queue wrapper | ||
mutable queue_wrapper m_queue; | ||
|
||
}; // class kalman_fitting_algorithm | ||
|
||
} // namespace traccc::sycl |
82 changes: 82 additions & 0 deletions
82
device/sycl/include/traccc/sycl/seeding/silicon_pixel_spacepoint_formation_algorithm.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/** TRACCC library, part of the ACTS project (R&D line) | ||
* | ||
* (c) 2023-2024 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Library include(s). | ||
#include "traccc/edm/measurement.hpp" | ||
#include "traccc/edm/spacepoint.hpp" | ||
#include "traccc/geometry/detector.hpp" | ||
#include "traccc/sycl/utils/queue_wrapper.hpp" | ||
#include "traccc/utils/algorithm.hpp" | ||
#include "traccc/utils/memory_resource.hpp" | ||
|
||
// VecMem include(s). | ||
#include <vecmem/utils/copy.hpp> | ||
|
||
// System include(s). | ||
#include <functional> | ||
|
||
namespace traccc::sycl { | ||
|
||
/// Algorithm forming space points out of measurements | ||
/// | ||
/// This algorithm performs the local-to-global transformation of the 2D | ||
/// measurements made on every detector module, into 3D spacepoint coordinates. | ||
/// | ||
class silicon_pixel_spacepoint_formation_algorithm | ||
: public algorithm<spacepoint_collection_types::buffer( | ||
const default_detector::view&, | ||
const measurement_collection_types::const_view&)>, | ||
public algorithm<spacepoint_collection_types::buffer( | ||
const telescope_detector::view&, | ||
const measurement_collection_types::const_view&)> { | ||
|
||
public: | ||
/// Output type | ||
using output_type = spacepoint_collection_types::buffer; | ||
|
||
/// Constructor for spacepoint_formation | ||
/// | ||
/// @param mr is the memory resource | ||
/// | ||
silicon_pixel_spacepoint_formation_algorithm( | ||
const traccc::memory_resource& mr, vecmem::copy& copy, | ||
queue_wrapper queue); | ||
|
||
/// Construct spacepoints from 2D silicon pixel measurements | ||
/// | ||
/// @param det Detector object | ||
/// @param measurements A collection of measurements | ||
/// @return A spacepoint buffer, with one spacepoint for every | ||
/// silicon pixel measurement | ||
/// | ||
output_type operator()(const default_detector::view& det, | ||
const measurement_collection_types::const_view& | ||
measurements) const override; | ||
|
||
/// Construct spacepoints from 2D silicon pixel measurements | ||
/// | ||
/// @param det Detector object | ||
/// @param measurements A collection of measurements | ||
/// @return A spacepoint buffer, with one spacepoint for every | ||
/// silicon pixel measurement | ||
/// | ||
output_type operator()(const telescope_detector::view& det, | ||
const measurement_collection_types::const_view& | ||
measurements) const override; | ||
|
||
private: | ||
/// Memory resource used by the algorithm | ||
traccc::memory_resource m_mr; | ||
/// The copy object to use | ||
std::reference_wrapper<vecmem::copy> m_copy; | ||
/// SYCL queue object | ||
mutable queue_wrapper m_queue; | ||
}; | ||
|
||
} // namespace traccc::sycl |
66 changes: 0 additions & 66 deletions
66
device/sycl/include/traccc/sycl/seeding/spacepoint_formation_algorithm.hpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.