Commit 79173353 authored by Sandro Christian Wenzel's avatar Sandro Christian Wenzel
Browse files

trying compilation of NewSimpleNavigator on GPU

parent 4468bac1
......@@ -834,7 +834,7 @@ if (BENCHMARK)
)
set(SRC_CUDA ${SRC_CUDA}
source/benchmarking/Benchmarker.cu
# source/benchmarking/NavigationBenchmarker.cu
source/benchmarking/NavigationBenchmarker.cu
)
add_subdirectory(test/benchmark)
endif()
......
......@@ -46,6 +46,7 @@ public:
//! this methods transforms the global coordinates into local ones usually calls more specialized methods
//! like the hit detection on local coordinates
VECCORE_ATT_HOST_DEVICE
virtual Precision ComputeStepAndPropagatedState(Vector3D<Precision> const & /*globalpoint*/,
Vector3D<Precision> const & /*globaldir*/,
Precision /*(physics) step limit */,
......@@ -73,6 +74,7 @@ public:
Precision & /*safety*/) const = 0;
// an alias interface ( using TGeo name )
VECCORE_ATT_HOST_DEVICE
void FindNextBoundaryAndStep(Vector3D<Precision> const &globalpoint, Vector3D<Precision> const &globaldir,
NavigationState const &in_state, NavigationState &out_state, Precision step_limit,
Precision &step) const
......@@ -354,6 +356,7 @@ public:
}
public:
VECCORE_ATT_HOST_DEVICE
virtual Precision ComputeStepAndPropagatedState(Vector3D<Precision> const &globalpoint,
Vector3D<Precision> const &globaldir, Precision step_limit,
NavigationState const &in_state,
......
......@@ -3,7 +3,7 @@
#include "volumes/PlacedVolume.h"
#include "base/SOA3D.h"
#include "navigation/SimpleNavigator.h"
#include "navigation/NewSimpleNavigator.h"
#include "navigation/NavigationState.h"
#include "navigation/NavStatePool.h"
......@@ -26,7 +26,7 @@ __global__ void NavigationKernel(void *gpu_ptr /* a pointer to buffer of current
using vecgeom::cuda::NavigationState;
using vecgeom::cuda::NavStatePool;
SimpleNavigator nav;
auto nav = NewSimpleNavigator<>::Instance(); // pointer to a navigator
double step;
unsigned tid = ThreadIndex();
......@@ -40,7 +40,7 @@ __global__ void NavigationKernel(void *gpu_ptr /* a pointer to buffer of current
//.. do the actual navigation on the GPU
// nav.LocatePoint(volume, positions[tid], *inState, true);
nav.FindNextBoundaryAndStep(positions[tid], directions[tid], *inState, *outState, pSteps[tid], step);
nav->FindNextBoundaryAndStep(positions[tid], directions[tid], *inState, *outState, pSteps[tid], step);
steps[tid] = step;
// repeat
......
......@@ -162,6 +162,7 @@ public:
VUnplacedVolume const *GetUnplacedVolume() const { return logical_volume_->GetUnplacedVolume(); }
/// Returns if underlying unplaced volume is an assembly.
VECCORE_ATT_HOST_DEVICE
bool IsAssembly() const { return GetUnplacedVolume()->IsAssembly(); }
/// Returns underlying transformation.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment