9.1
general documentation
cs_dispatch_queue Class Reference

#include <cs_dispatch_queue.h>

+ Collaboration diagram for cs_dispatch_queue:

Public Member Functions

template<class F , class... Args>
cs_task parallel_for (cs_lnum_t n, F &&f, Args &&...args)
 
template<class F , class... Args>
cs_task parallel_for (cs_lnum_t n, std::initializer_list< cs_event_ref > const &sync_events, F &&f, Args &&...args)
 
template<class M , class F , class... Args>
cs_task parallel_for_i_faces (const M *m, F &&f, Args &&...args)
 
template<class M , class F , class... Args>
cs_task parallel_for_i_faces (const M *m, std::initializer_list< cs_event_ref > const &sync_events, F &&f, Args &&...args)
 
template<class M , class F , class... Args>
cs_task parallel_for_b_faces (const M *m, F &&f, Args &&...args)
 
template<class M , class F , class... Args>
cs_task parallel_for_b_faces (const M *m, std::initializer_list< cs_event_ref > const &sync_events, F &&f, Args &&...args)
 
template<class T , class F , class... Args>
cs_task parallel_for_reduce_sum (cs_lnum_t n, T &sum, F &&f, Args &&...args)
 
template<class T , class F , class... Args>
cs_task parallel_for_reduce_sum (cs_lnum_t n, std::initializer_list< cs_event_ref > const &sync_events, T &sum, F &&f, Args &&...args)
 
template<class T , class R , class F , class... Args>
cs_task parallel_for_reduce (cs_lnum_t n, T &r, R &reducer, F &&f, Args &&...args)
 
template<class T , class R , class F , class... Args>
cs_task parallel_for_reduce (cs_lnum_t n, std::initializer_list< cs_event_ref > const &sync_events, T &r, R &reducer, F &&f, Args &&...args)
 
template<class FunctionType , class... Args>
cs_host_task< FunctionType, std::remove_reference_t< Args >... > single_task (std::initializer_list< cs_event_ref > const &sync_events, FunctionType &&host_function, Args &&...args)
 
template<class FunctionType , class... Args>
cs_host_task< FunctionType, std::remove_reference_t< Args >... > single_task (FunctionType &&host_function, Args &&...args)
 Initiates a single thread task that runs on the host. More...
 

Public Attributes

cs_dispatch_context initializer_context
 Context used to initialize tasks. More...
 

Detailed Description

Use the execution model from base/cs_dispatch.h to create SYCL-like tasks that can be synchronized together.

Member Function Documentation

◆ parallel_for() [1/2]

cs_task parallel_for ( cs_lnum_t  n,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for() [2/2]

cs_task parallel_for ( cs_lnum_t  n,
std::initializer_list< cs_event_ref > const &  sync_events,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_b_faces() [1/2]

cs_task parallel_for_b_faces ( const M *  m,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_b_faces() [2/2]

cs_task parallel_for_b_faces ( const M *  m,
std::initializer_list< cs_event_ref > const &  sync_events,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_i_faces() [1/2]

cs_task parallel_for_i_faces ( const M *  m,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_i_faces() [2/2]

cs_task parallel_for_i_faces ( const M *  m,
std::initializer_list< cs_event_ref > const &  sync_events,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_reduce() [1/2]

cs_task parallel_for_reduce ( cs_lnum_t  n,
std::initializer_list< cs_event_ref > const &  sync_events,
T &  r,
R &  reducer,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_reduce() [2/2]

cs_task parallel_for_reduce ( cs_lnum_t  n,
T &  r,
R &  reducer,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_reduce_sum() [1/2]

cs_task parallel_for_reduce_sum ( cs_lnum_t  n,
std::initializer_list< cs_event_ref > const &  sync_events,
T &  sum,
F &&  f,
Args &&...  args 
)
inline

◆ parallel_for_reduce_sum() [2/2]

cs_task parallel_for_reduce_sum ( cs_lnum_t  n,
T &  sum,
F &&  f,
Args &&...  args 
)
inline

◆ single_task() [1/2]

cs_host_task< FunctionType, std::remove_reference_t< Args >... > single_task ( FunctionType &&  host_function,
Args &&...  args 
)
inline

Initiates a single thread task that runs on the host.

◆ single_task() [2/2]

cs_host_task< FunctionType, std::remove_reference_t< Args >... > single_task ( std::initializer_list< cs_event_ref > const &  sync_events,
FunctionType &&  host_function,
Args &&...  args 
)
inline

Initiates a single thread task that runs on the host. This variant accepts sync_events to synchronize with other tasks.

Member Data Documentation

◆ initializer_context

cs_dispatch_context initializer_context

Context used to initialize tasks.


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