Celeritas  0.5.0-86+4a8eea4
Public Member Functions | List of all members
celeritas::ActionLauncher< F > Class Template Reference

Profile and launch core stepping loop kernels. More...

#include <ActionLauncher.device.hh>

Inheritance diagram for celeritas::ActionLauncher< F >:
Inheritance graph
[legend]

Public Member Functions

 ActionLauncher (StepActionT const &action)
 Create a launcher from an action.
 
 ActionLauncher (StepActionT const &action, std::string_view ext)
 Create a launcher with a string extension.
 
void operator() (CoreState< MemSpace::device > const &state, F const &execute_thread) const
 Launch a kernel for the wrapped executor.
 
void operator() (StepActionT const &action, CoreParams const &params, CoreState< MemSpace::device > const &state, F const &execute_thread) const
 Launch with reduced grid size for when tracks are sorted. More...
 
- Public Member Functions inherited from celeritas::KernelLauncher< F >
 KernelLauncher (std::string_view name)
 Create a launcher from a label.
 
void operator() (Range< ThreadId > threads, StreamId stream_id, F const &execute_thread) const
 Launch a kernel for a thread range.
 
void operator() (size_type num_threads, StreamId stream_id, F const &execute_thread) const
 Launch a kernel with a custom number of threads. More...
 

Detailed Description

template<class F>
class celeritas::ActionLauncher< F >

Profile and launch core stepping loop kernels.

This is an extension to KernelLauncher which uses an action's label and takes core params/state to determine the launch size and/or action range.

Example:

void FooAction::step(CoreParams const& params,
CoreStateDevice& state) const
{
auto execute_thread = make_blah_executor(blah);
static ActionLauncher<decltype(execute_thread)> const launch_kernel(*this);
launch_kernel(state, execute_thread);
}
void launch_kernel(size_type num_threads, F &&execute_thread)
Helper function to run an executor in parallel on CPU.
Definition: KernelLauncher.hh:35
ActionLauncher(StepActionT const &action)
Create a launcher from an action.
Definition: global/ActionLauncher.device.hh:85

Member Function Documentation

◆ operator()()

template<class F >
void celeritas::ActionLauncher< F >::operator() ( StepActionT const &  action,
CoreParams const &  params,
CoreState< MemSpace::device > const &  state,
F const &  execute_thread 
) const

Launch with reduced grid size for when tracks are sorted.

These argument should be consistent with those in ActionLauncher.hh .


The documentation for this class was generated from the following file: