Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:09:17

0001 //------------------------------ -*- C++ -*- -------------------------------//
0002 // Copyright Celeritas contributors: see top-level COPYRIGHT file for details
0003 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 //---------------------------------------------------------------------------//
0005 /*!
0006  * \file geocel/rasterize/RaytraceImager.device.t.hh
0007  * \brief Template definition file for \c RaytraceImager .
0008  *
0009  * Include this file in a .cu file and instantiate it explicitly. When
0010  * instantiating, you must provide access to the GeoTraits specialization as
0011  * well as the data classes and track view.
0012  */
0013 //---------------------------------------------------------------------------//
0014 #pragma once
0015 
0016 #include "RaytraceImager.hh"
0017 
0018 #include "corecel/sys/KernelLauncher.device.hh"
0019 #include "corecel/sys/ThreadId.hh"
0020 
0021 #include "detail/RaytraceExecutor.hh"
0022 
0023 namespace celeritas
0024 {
0025 //---------------------------------------------------------------------------//
0026 /*!
0027  * Launch the raytrace kernel on device.
0028  */
0029 template<class G>
0030 void RaytraceImager<G>::launch_raytrace_kernel(
0031     GeoParamsCRef<MemSpace::device> const& geo_params,
0032     GeoStateRef<MemSpace::device> const& geo_states,
0033     ImageParamsCRef<MemSpace::device> const& img_params,
0034     ImageStateRef<MemSpace::device> const& img_states) const
0035 {
0036     using CalcId = detail::VolumeIdCalculator;
0037 
0038     detail::RaytraceExecutor<GeoTrackView, CalcId> execute_thread{
0039         geo_params, geo_states, img_params, img_states, CalcId{}};
0040 
0041     static KernelLauncher<decltype(execute_thread)> const launch_kernel{
0042         std::string{"raytrace-"} + GeoTraits<G>::name};
0043     launch_kernel(geo_states.size(), StreamId{}, execute_thread);
0044 }
0045 
0046 //---------------------------------------------------------------------------//
0047 }  // namespace celeritas