Skip to content

Commit

Permalink
Backup
Browse files Browse the repository at this point in the history
  • Loading branch information
beomki-yeo committed Oct 19, 2023
1 parent b4dd7ec commit 9ef6690
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace traccc::device {
///
template <typename detector_t>
TRACCC_DEVICE inline void apply_interaction(
std::size_t globalIndex, typename detector_t::detector_view_type det_data,
std::size_t globalIndex, typename detector_t::view_type det_data,
vecmem::data::jagged_vector_view<detray::intersection2D<
typename detector_t::surface_type, typename detector_t::transform3>>
nav_candidates_buffer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace traccc::device {
template <typename detector_t, typename config_t>
TRACCC_DEVICE inline void find_tracks(
std::size_t globalIndex, const config_t cfg,
typename detector_t::detector_view_type det_data,
typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
vecmem::data::vector_view<const detray::geometry::barcode> barcodes_view,
vecmem::data::vector_view<const unsigned int> upper_bounds_view,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace traccc::device {

template <typename detector_t>
TRACCC_DEVICE inline void apply_interaction(
std::size_t globalIndex, typename detector_t::detector_view_type det_data,
std::size_t globalIndex, typename detector_t::view_type det_data,
vecmem::data::jagged_vector_view<detray::intersection2D<
typename detector_t::surface_type, typename detector_t::transform3>>
nav_candidates_buffer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace traccc::device {
template <typename detector_t, typename config_t>
TRACCC_DEVICE inline void find_tracks(
std::size_t globalIndex, const config_t cfg,
typename detector_t::detector_view_type det_data,
typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
vecmem::data::vector_view<const detray::geometry::barcode> barcodes_view,
vecmem::data::vector_view<const unsigned int> upper_bounds_view,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ namespace traccc::device::experimental {
///
template <typename detector_t>
TRACCC_HOST_DEVICE inline void form_spacepoints(
const std::size_t globalIndex,
typename detector_t::detector_view_type det_data,
const std::size_t globalIndex, typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
spacepoint_collection_types::view spacepoints_view);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ namespace traccc::device::experimental {
///
template <typename detector_t>
TRACCC_HOST_DEVICE inline void form_spacepoints(
const std::size_t globalIndex,
typename detector_t::detector_view_type det_data,
const std::size_t globalIndex, typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
spacepoint_collection_types::view spacepoints_view) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace traccc::cuda::experimental {
template <typename detector_t>
class spacepoint_formation
: public algorithm<spacepoint_collection_types::buffer(
const typename detector_t::detector_view_type&,
const typename detector_t::view_type&,
const measurement_collection_types::const_view&)> {

public:
Expand All @@ -50,7 +50,7 @@ class spacepoint_formation
/// @param measurements a collection of measurements
/// @return a spacepoint collection (buffer)
spacepoint_collection_types::buffer operator()(
const typename detector_t::detector_view_type& det_view,
const typename detector_t::view_type& det_view,
const measurement_collection_types::const_view& measurements_view)
const override;

Expand Down
22 changes: 11 additions & 11 deletions device/cuda/src/finding/finding_algorithm.cu
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

// detray include(s).
#include "detray/core/detector.hpp"
#include "detray/detectors/bfield.hpp"
#include "detray/detectors/telescope_metadata.hpp"
#include "detray/detectors/toy_metadata.hpp"
#include "detray/masks/unbounded.hpp"
Expand Down Expand Up @@ -59,7 +60,7 @@ __global__ void make_barcode_sequence(
/// CUDA kernel for running @c traccc::device::apply_interaction
template <typename detector_t>
__global__ void apply_interaction(
typename detector_t::detector_view_type det_data,
typename detector_t::view_type det_data,
vecmem::data::jagged_vector_view<detray::intersection2D<
typename detector_t::surface_type, typename detector_t::transform3>>
nav_candidates_buffer,
Expand Down Expand Up @@ -94,7 +95,7 @@ __global__ void count_threads(
/// CUDA kernel for running @c traccc::device::find_tracks
template <typename detector_t, typename config_t>
__global__ void find_tracks(
const config_t cfg, typename detector_t::detector_view_type det_data,
const config_t cfg, typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
vecmem::data::vector_view<const detray::geometry::barcode> barcodes_view,
vecmem::data::vector_view<const unsigned int> upper_bounds_view,
Expand Down Expand Up @@ -519,20 +520,19 @@ finding_algorithm<stepper_t, navigator_t>::operator()(

// Explicit template instantiation
using toy_detector_type =
detray::detector<detray::toy_metadata<>, covfie::field_view,
detray::device_container_types>;
using toy_stepper_type = detray::rk_stepper<
covfie::field<toy_detector_type::bfield_backend_type>::view_t, transform3,
detray::constrained_step<>>;
detray::detector<detray::toy_metadata, detray::device_container_types>;
using toy_stepper_type =
detray::rk_stepper<covfie::field_view<detray::bfield::const_bknd_t>,
transform3, detray::constrained_step<>>;
using toy_navigator_type = detray::navigator<const toy_detector_type>;
template class finding_algorithm<toy_stepper_type, toy_navigator_type>;

using device_detector_type =
detray::detector<detray::telescope_metadata<detray::rectangle2D<>>,
covfie::field_view, detray::device_container_types>;
using rk_stepper_type = detray::rk_stepper<
covfie::field<device_detector_type::bfield_backend_type>::view_t,
transform3, detray::constrained_step<>>;
detray::device_container_types>;
using rk_stepper_type =
detray::rk_stepper<covfie::field_view<detray::bfield::const_bknd_t>,
transform3, detray::constrained_step<>>;
using device_navigator_type = detray::navigator<const device_detector_type>;
template class finding_algorithm<rk_stepper_type, device_navigator_type>;

Expand Down
4 changes: 2 additions & 2 deletions device/cuda/src/seeding/experimental/spacepoint_formation.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace kernels {

template <typename detector_t>
__global__ void form_spacepoints(
typename detector_t::detector_view_type det_data,
typename detector_t::view_type det_data,
measurement_collection_types::const_view measurements_view,
spacepoint_collection_types::view spacepoints_view) {

Expand All @@ -41,7 +41,7 @@ spacepoint_formation<detector_t>::spacepoint_formation(
template <typename detector_t>
spacepoint_collection_types::buffer
spacepoint_formation<detector_t>::operator()(
const typename detector_t::detector_view_type& det_view,
const typename detector_t::view_type& det_view,
const measurement_collection_types::const_view& measurements_view) const {

// Get a convenience variable for the stream that we'll be using.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace traccc::sycl::experimental {
template <typename detector_t>
class spacepoint_formation
: public algorithm<spacepoint_collection_types::buffer(
const typename detector_t::detector_view_type&,
const typename detector_t::view_type&,
const measurement_collection_types::const_view&)> {

public:
Expand All @@ -50,7 +50,7 @@ class spacepoint_formation
/// @param measurements a collection of measurements
/// @return a spacepoint collection (buffer)
spacepoint_collection_types::buffer operator()(
const typename detector_t::detector_view_type& det_view,
const typename detector_t::view_type& det_view,
const measurement_collection_types::const_view& measurements_view)
const override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spacepoint_formation<detector_t>::spacepoint_formation(
template <typename detector_t>
spacepoint_collection_types::buffer
spacepoint_formation<detector_t>::operator()(
const typename detector_t::detector_view_type& det_view,
const typename detector_t::view_type& det_view,
const measurement_collection_types::const_view& measurements_view) const {

const std::size_t n_measurements = m_copy.get_size(measurements_view);
Expand Down

0 comments on commit 9ef6690

Please sign in to comment.