Skip to content

Commit 917deca

Browse files
committed
REVERTME: Add log output for debugging
1 parent 95b29c4 commit 917deca

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/celeritas/optical/Types.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ namespace celeritas
1212
{
1313
namespace optical
1414
{
15+
//---------------------------------------------------------------------------//
16+
/*!
17+
* Get a string corresponding to an optical photon generation process.
18+
*/
19+
char const* to_cstring(GeneratorType type)
20+
{
21+
static EnumStringMapper<GeneratorType> const to_cstring_impl{
22+
"cherenkov",
23+
"scintillation",
24+
};
25+
return to_cstring_impl(type);
26+
}
27+
1528
//---------------------------------------------------------------------------//
1629
/*!
1730
* Get a string corresponding to an optical surface physics step.

src/celeritas/optical/Types.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ enum class TrivialInteractionMode
8282
// FREE FUNCTIONS
8383
//---------------------------------------------------------------------------//
8484

85+
char const* to_cstring(GeneratorType);
8586
char const* to_cstring(SurfacePhysicsOrder);
8687
char const* to_cstring(ReflectionMode);
8788

src/celeritas/optical/gen/OffloadAction.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,14 @@ template<GeneratorType G>
123123
void OffloadAction<G>::offload(CoreParams const& core_params,
124124
CoreStateHost& core_state) const
125125
{
126+
CELER_LOG(info) << "Accessing pre-step aux state data in "
127+
<< optical::to_cstring(G) << " OffloadAction";
126128
auto& pre_step
127129
= core_state.aux_data<OffloadPreStateData>(data_.pre_step_id);
128130
auto& gen_state = get<optical::GeneratorState<MemSpace::native>>(
129131
core_state.aux(), data_.gen_id);
132+
CELER_LOG(info) << "Accessing pre-post-step aux state data in "
133+
<< optical::to_cstring(G) << " OffloadAction";
130134
TrackExecutor execute{
131135
core_params.ptr<MemSpace::native>(),
132136
core_state.ptr(),

src/celeritas/optical/gen/OffloadGatherAction.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ template<StepActionOrder S>
7171
void OffloadGatherAction<S>::step(CoreParams const& params,
7272
CoreStateHost& state) const
7373
{
74+
CELER_LOG(info) << "Accessing " << to_cstring(S)
75+
<< " aux state data in OffloadGatherAction";
7476
auto& step = state.aux_data<Data>(aux_id_);
7577
auto execute = make_active_track_executor(
7678
params.ptr<MemSpace::native>(), state.ptr(), Executor{step});

0 commit comments

Comments
 (0)