Celeritas  0.5.0-57+aeecb15
Functions
KernelLauncher.hh File Reference
#include <utility>
#include "corecel/Config.hh"
#include "MultiExceptionHandler.hh"
#include "ThreadId.hh"
This graph shows which files directly or indirectly include this file:

Functions

template<class F >
void celeritas::launch_kernel (size_type num_threads, F &&execute_thread)
 Helper function to run an executor in parallel on CPU. More...
 

Function Documentation

◆ launch_kernel()

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

Helper function to run an executor in parallel on CPU.

The function should be an executor with the signature

void(*)(ThreadId)
OpaqueId< struct Thread_ > ThreadId
Index of a thread inside the current kernel.
Definition: ThreadId.hh:20

.

Example:

void do_something()
{
launch_kernel(num_threads, make_blah_executor(blah));
}
void launch_kernel(size_type num_threads, F &&execute_thread)
Helper function to run an executor in parallel on CPU.
Definition: KernelLauncher.hh:35