Celeritas 0.6.0-73+develop.4684b68f
Loading...
Searching...
No Matches
Functions
ActionLauncher.hh File Reference
#include <utility>
#include "corecel/Config.hh"
#include "corecel/Assert.hh"
#include "corecel/Types.hh"
#include "corecel/sys/MultiExceptionHandler.hh"
#include "corecel/sys/ThreadId.hh"
#include "celeritas/optical/CoreState.hh"
This graph shows which files directly or indirectly include this file:

Functions

template<class F >
void celeritas::optical::launch_action (size_type num_threads, F &&execute_thread)
 Helper function to run an action in parallel on CPU.
 
template<class F >
void celeritas::optical::launch_action (CoreState< MemSpace::host > &state, F &&execute_thread)
 Helper function to run an action in parallel on CPU over all states.
 

Function Documentation

◆ launch_action() [1/2]

template<class F >
void celeritas::optical::launch_action ( CoreState< MemSpace::host > &  state,
F &&  execute_thread 
)

Helper function to run an action in parallel on CPU over all states.

Example:

void FooAction::step(CoreParams const& params,
CoreStateHost& state) const
{
launch_action(state, make_blah_executor(params, state, blah));
}

◆ launch_action() [2/2]

template<class F >
void celeritas::optical::launch_action ( size_type  num_threads,
F &&  execute_thread 
)

Helper function to run an action in parallel on CPU.

This allows using a custom number of threads rather than the state size.