From 66f48f9889b0796d184e80b19682cbf757e8c413 Mon Sep 17 00:00:00 2001 From: adriano Date: Fri, 20 Oct 2023 12:15:13 +0200 Subject: [PATCH] Fixing tests --- .../AlpakaInterface/interface/HistoContainer.h | 2 +- HeterogeneousCore/AlpakaInterface/test/BuildFile.xml | 4 ++-- .../test/alpaka/testOneHistoContainer.dev.cc | 1 + RecoTracker/PixelVertexFinding/test/BuildFile.xml | 6 +++--- .../PixelVertexFinding/test/alpaka/VertexFinder_t.dev.cc | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/HeterogeneousCore/AlpakaInterface/interface/HistoContainer.h b/HeterogeneousCore/AlpakaInterface/interface/HistoContainer.h index ac3af256f3767..4df775326434a 100644 --- a/HeterogeneousCore/AlpakaInterface/interface/HistoContainer.h +++ b/HeterogeneousCore/AlpakaInterface/interface/HistoContainer.h @@ -107,7 +107,7 @@ namespace cms { template ALPAKA_FN_ACC ALPAKA_FN_INLINE void forEachInBins(Hist const &hist, V value, int n, Func func) { int bs = Hist::bin(value); - int be = std::min(int(Hist::totbins() - 1), bs + n); + int be = std::min(int(Hist::nbins() - 1), bs + n); bs = std::max(0, bs - n); ALPAKA_ASSERT_OFFLOAD(be >= bs); for (auto pj = hist.begin(bs); pj < hist.end(be); ++pj) { diff --git a/HeterogeneousCore/AlpakaInterface/test/BuildFile.xml b/HeterogeneousCore/AlpakaInterface/test/BuildFile.xml index 4e53313f248c8..e930b5393913a 100644 --- a/HeterogeneousCore/AlpakaInterface/test/BuildFile.xml +++ b/HeterogeneousCore/AlpakaInterface/test/BuildFile.xml @@ -32,11 +32,11 @@ - + diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testOneHistoContainer.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testOneHistoContainer.dev.cc index 5df8b2ae01701..485eb280e59d8 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testOneHistoContainer.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testOneHistoContainer.dev.cc @@ -24,6 +24,7 @@ struct mykernel { printf("start kernel for %d data\n", N); } + using Hist = HistoContainer; auto& hist = alpaka::declareSharedVar(acc); diff --git a/RecoTracker/PixelVertexFinding/test/BuildFile.xml b/RecoTracker/PixelVertexFinding/test/BuildFile.xml index 1f20bf69e6300..1a61473953bd7 100644 --- a/RecoTracker/PixelVertexFinding/test/BuildFile.xml +++ b/RecoTracker/PixelVertexFinding/test/BuildFile.xml @@ -57,21 +57,21 @@ - + - + - + diff --git a/RecoTracker/PixelVertexFinding/test/alpaka/VertexFinder_t.dev.cc b/RecoTracker/PixelVertexFinding/test/alpaka/VertexFinder_t.dev.cc index b2f3a32c8a936..dcad46bcaa53e 100644 --- a/RecoTracker/PixelVertexFinding/test/alpaka/VertexFinder_t.dev.cc +++ b/RecoTracker/PixelVertexFinding/test/alpaka/VertexFinder_t.dev.cc @@ -12,7 +12,7 @@ #include "RecoTracker/PixelVertexFinding/plugins/alpaka/clusterTracksDBSCAN.h" #define CLUSTERIZE ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::clusterTracksDBSCAN #elif USE_ITERATIVE -#include "RecoTracker/PixelVertexFinding/plugins/alpaka/clusterTracksIterativeAlpaka.h" +#include "RecoTracker/PixelVertexFinding/plugins/alpaka/clusterTracksIterative.h" #define CLUSTERIZE ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::clusterTracksIterative #else #include "RecoTracker/PixelVertexFinding/plugins/alpaka/clusterTracksByDensity.h"