Celeritas  0.5.0-56+6b053cd
Public Member Functions | List of all members
celeritas::optical::ActionLauncher< F > Class Template Reference

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

#include <ActionLauncher.device.hh>

Inheritance diagram for celeritas::optical::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 &call_thread) const
 Launch a kernel for the wrapped executor.
 
- 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::optical::ActionLauncher< F >

Profile and launch optical stepping loop kernels.

This is an extension to KernelLauncher which uses an action's label and takes the optical state to determine the launch size. The "call thread" operation (thread executor) should contain the params and state.

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: optical/action/ActionLauncher.device.hh:82

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