Skip to content

Commit

Permalink
Merge pull request #478 from krasznaa/ClangFix-main-20231030
Browse files Browse the repository at this point in the history
Clang & CUDA Fix, main branch (2023.10.30.)
  • Loading branch information
krasznaa authored Oct 31, 2023
2 parents e2f6ba7 + d5bf878 commit d778a20
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions device/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ traccc_add_library( traccc_cuda cuda TYPE SHARED
"src/cca/component_connection.cu"
# Clusterization
"include/traccc/cuda/clusterization/experimental/clusterization_algorithm.hpp"
"src/clusterization/experimental/clusterization_algorithm.cu"
"src/clusterization/experimental/clusterization_algorithm_exp.cu"
"include/traccc/cuda/clusterization/clusterization_algorithm.hpp"
"src/clusterization/clusterization_algorithm.cu"
# Finding
"include/traccc/cuda/finding/finding_algorithm.hpp"
"src/finding/finding_algorithm.cu"
"src/finding/finding_algorithm.cu"
# Fitting
"include/traccc/cuda/fitting/fitting_algorithm.hpp"
"src/fitting/fitting_algorithm.cu")
Expand Down
10 changes: 6 additions & 4 deletions device/cuda/src/clusterization/clusterization_algorithm.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** TRACCC library, part of the ACTS project (R&D line)
*
* (c) 2022 CERN for the benefit of the ACTS project
* (c) 2022-2023 CERN for the benefit of the ACTS project
*
* Mozilla Public License Version 2.0
*/
Expand All @@ -23,17 +23,19 @@
// System include(s).
#include <algorithm>

namespace traccc::cuda {

namespace {

/// These indices in clusterization will only range from 0 to
/// max_cells_per_partition, so we only need a short.
using index_t = unsigned short;

static constexpr int TARGET_CELLS_PER_THREAD = 8;
static constexpr int MAX_CELLS_PER_THREAD = 12;

} // namespace

namespace traccc::cuda {

namespace kernels {

/// CUDA kernel for running @c traccc::device::ccl_kernel
Expand Down Expand Up @@ -162,4 +164,4 @@ clusterization_algorithm::output_type clusterization_algorithm::operator()(
return {std::move(spacepoints_buffer), std::move(cell_links)};
}

} // namespace traccc::cuda
} // namespace traccc::cuda
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@
#include <thrust/execution_policy.h>
#include <thrust/sort.h>

namespace traccc::cuda::experimental {

namespace {

/// These indices in clusterization will only range from 0 to
/// max_cells_per_partition, so we only need a short.
using index_t = unsigned short;

static constexpr int TARGET_CELLS_PER_THREAD = 8;
static constexpr int MAX_CELLS_PER_THREAD = 12;

} // namespace

namespace traccc::cuda::experimental {

namespace kernels {

/// CUDA kernel for running @c traccc::device::ccl_kernel
Expand Down
4 changes: 2 additions & 2 deletions tests/cuda/test_clusterization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ TEST(clusterization, cuda) {
modules.push_back({});

// Run Clusterization
cuda::experimental::clusterization_algorithm ca_cuda(mr, copy, stream,
1024);
traccc::cuda::experimental::clusterization_algorithm ca_cuda(mr, copy,
stream, 1024);

auto measurements_buffer =
ca_cuda(vecmem::get_data(cells), vecmem::get_data(modules));
Expand Down
4 changes: 2 additions & 2 deletions tests/cuda/test_spacepoint_formation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ TEST(spacepoint_formation, cuda) {
measurements.push_back({{10.f, 15.f}, {0.f, 0.f}, surfaces[8u].barcode()});

// Run spacepoint formation
cuda::experimental::spacepoint_formation<device_detector_type> sp_formation(
mr, copy, stream);
traccc::cuda::experimental::spacepoint_formation<device_detector_type>
sp_formation(mr, copy, stream);
auto spacepoints_buffer =
sp_formation(detray::get_data(det), vecmem::get_data(measurements));

Expand Down

0 comments on commit d778a20

Please sign in to comment.