Skip to content

Commit

Permalink
Separate in a non ambiguous namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mconcas committed Sep 9, 2024
1 parent ec2088d commit daf2de3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
20 changes: 10 additions & 10 deletions Common/DCAFitter/GPU/cuda/DCAFitterN.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inline void gpuAssert(cudaError_t code, const char* file, int line, bool abort =
}
}
}
namespace o2::vertexing::gpu
namespace o2::vertexing::device
{
namespace kernel
{
Expand All @@ -51,9 +51,9 @@ GPUg() void processKernel(o2::vertexing::DCAFitterN<2>* ft, o2::track::TrackParC
}
} // namespace kernel

void printOnDevice(o2::vertexing::DCAFitterN<2>* ft,
const int nBlocks,
const int nThreads)
void print(o2::vertexing::DCAFitterN<2>* ft,
const int nBlocks,
const int nThreads)
{
DCAFitterN<2>* ft_device;
gpuCheckError(cudaMalloc(reinterpret_cast<void**>(&ft_device), sizeof(o2::vertexing::DCAFitterN<2>)));
Expand All @@ -65,11 +65,11 @@ void printOnDevice(o2::vertexing::DCAFitterN<2>* ft,
gpuCheckError(cudaDeviceSynchronize());
}

int processOnDevice(o2::vertexing::DCAFitterN<2>* fitter,
o2::track::TrackParCov& track1,
o2::track::TrackParCov& track2,
const int nBlocks,
const int nThreads)
int process(o2::vertexing::DCAFitterN<2>* fitter,
o2::track::TrackParCov& track1,
o2::track::TrackParCov& track2,
const int nBlocks,
const int nThreads)
{
DCAFitterN<2>* ft_device;
o2::track::TrackParCov* t1_device;
Expand Down Expand Up @@ -103,4 +103,4 @@ int processOnDevice(o2::vertexing::DCAFitterN<2>* fitter,
return result;
}

} // namespace o2::vertexing::gpu
} // namespace o2::vertexing::device
8 changes: 4 additions & 4 deletions Common/DCAFitter/GPU/cuda/test/testDCAFitterNGPU.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
auto genParent = generate(vtxGen, vctracks, bz, genPHS, k0, k0dec, forceQ);
ft.setUseAbsDCA(true);
swA.Start(false);
int ncA = gpu::processOnDevice(&ft, vctracks[0], vctracks[1]); // HERE WE FIT THE VERTICES
int ncA = device::process(&ft, vctracks[0], vctracks[1]); // HERE WE FIT THE VERTICES
swA.Stop();
LOG(debug) << "fit abs.dist " << iev << " NC: " << ncA << " Chi2: " << (ncA ? ft.getChi2AtPCACandidate(0) : -1);
if (ncA) {
Expand All @@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
ft.setUseAbsDCA(true);
ft.setWeightedFinalPCA(true);
swAW.Start(false);
int ncAW = gpu::processOnDevice(&ft, vctracks[0], vctracks[1]); // HERE WE FIT THE VERTICES
int ncAW = device::process(&ft, vctracks[0], vctracks[1]); // HERE WE FIT THE VERTICES
swAW.Stop();
LOG(debug) << "fit abs.dist with final weighted DCA " << iev << " NC: " << ncAW << " Chi2: " << (ncAW ? ft.getChi2AtPCACandidate(0) : -1);
if (ncAW) {
Expand All @@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
ft.setUseAbsDCA(false);
ft.setWeightedFinalPCA(false);
swW.Start(false);
int ncW = gpu::processOnDevice(&ft, vctracks[0], vctracks[1]); // HERE WE FIT THE VERTICES
int ncW = device::process(&ft, vctracks[0], vctracks[1]); // HERE WE FIT THE VERTICES
swW.Stop();
LOG(debug) << "fit wgh.dist " << iev << " NC: " << ncW << " Chi2: " << (ncW ? ft.getChi2AtPCACandidate(0) : -1);
if (ncW) {
Expand All @@ -221,7 +221,7 @@ BOOST_AUTO_TEST_CASE(DCAFitterNProngs)
}
}
ft.print();
gpu::printOnDevice(&ft, 1, 1);
device::print(&ft, 1, 1);
meanDA /= nfoundA ? nfoundA : 1;
meanDAW /= nfoundA ? nfoundA : 1;
meanDW /= nfoundW ? nfoundW : 1;
Expand Down
20 changes: 10 additions & 10 deletions Common/DCAFitter/include/DCAFitter/DCAFitterN.h
Original file line number Diff line number Diff line change
Expand Up @@ -1129,17 +1129,17 @@ GPUg() void printKernel(o2::vertexing::DCAFitterN<2>* ft);
GPUg() void processKernel(o2::vertexing::DCAFitterN<2>* ft, o2::track::TrackParCov* t1, o2::track::TrackParCov* t2, int* res);
} // namespace gpu::kernel
#endif
namespace gpu
namespace device
{
void printOnDevice(o2::vertexing::DCAFitterN<2>*,
const int nBlocks = 1,
const int nThreads = 1);
int processOnDevice(o2::vertexing::DCAFitterN<2>*,
o2::track::TrackParCov&,
o2::track::TrackParCov&,
const int nBlocks = 1,
const int nThreads = 1);
} // namespace gpu
void print(o2::vertexing::DCAFitterN<2>*,
const int nBlocks = 1,
const int nThreads = 1);
int process(o2::vertexing::DCAFitterN<2>*,
o2::track::TrackParCov&,
o2::track::TrackParCov&,
const int nBlocks = 1,
const int nThreads = 1);
} // namespace device
} // namespace vertexing
} // namespace o2
#endif // _ALICEO2_DCA_FITTERN_

0 comments on commit daf2de3

Please sign in to comment.