9.1
general documentation
cs_combined_context< Contexts > Class Template Reference

#include <cs_dispatch.h>

+ Inheritance diagram for cs_combined_context< Contexts >:
+ Collaboration diagram for cs_combined_context< Contexts >:

Public Member Functions

 cs_combined_context ()=default
 
 cs_combined_context (Contexts... contexts)
 
template<class M , class F , class... Args>
auto parallel_for_i_faces (const M *m, F &&f, Args &&... args)
 
template<class M , class F , class... Args>
auto parallel_for_b_faces (const M *m, F &&f, Args &&... args)
 
template<class F , class... Args>
auto parallel_for (cs_lnum_t n, F &&f, Args &&... args)
 
template<class T , class F , class... Args>
auto parallel_for_reduce_sum (cs_lnum_t n, T &sum, F &&f, Args &&... args)
 
template<class T , class R , class F , class... Args>
auto parallel_for_reduce (cs_lnum_t n, T &result, R &reducer, F &&f, Args &&... args)
 
void wait (void)
 Wait (synchronize) until launched computations have finished. More...
 
template<class M >
cs_dispatch_sum_type_t get_parallel_for_i_faces_sum_type (const M *m)
 Return sum type to be used with parallel_for_i_faces. More...
 
template<class M >
cs_dispatch_sum_type_t get_parallel_for_b_faces_sum_type (const M *m)
 Return sum type to be used with parallel_for_b_faces. More...
 
- Public Member Functions inherited from cs_dispatch_context_mixin< cs_combined_context< Contexts... > >
decltype(auto) parallel_for (cs_lnum_t n, F &&f, Args &&... args)=delete
 
decltype(auto) parallel_for_i_faces (const M *m, F &&f, Args &&... args)
 
decltype(auto) parallel_for_b_faces (const M *m, F &&f, Args &&... args)
 
decltype(auto) parallel_for_reduce_sum (cs_lnum_t n, T &sum, F &&f, Args &&... args)=delete
 
decltype(auto) parallel_for_reduce (cs_lnum_t n, T &r, R &reducer, F &&f, Args &&... args)=delete
 
decltype(auto) wait (void)=delete
 
bool try_get_parallel_for_i_faces_sum_type (const M *m, cs_dispatch_sum_type_t &st)
 
bool try_get_parallel_for_b_faces_sum_type (const M *m, cs_dispatch_sum_type_t &st)
 

Detailed Description

template<class... Contexts>
class cs_combined_context< Contexts >

cs_context that is a combination of multiple contexts. This context will try every context in order, until one actually runs.

Constructor & Destructor Documentation

◆ cs_combined_context() [1/2]

cs_combined_context ( )
default

◆ cs_combined_context() [2/2]

cs_combined_context ( Contexts...  contexts)
inline

Member Function Documentation

◆ get_parallel_for_b_faces_sum_type()

cs_dispatch_sum_type_t get_parallel_for_b_faces_sum_type ( const M *  m)
inline

Return sum type to be used with parallel_for_b_faces.

Template Parameters
Mmesh type structure (templated mostly to avoid dependency to mesh definitions in lower level code)
Parameters
[in]mpointer to mesh
Returns
assembly sum type that should be used in parallel_for_b_faces

◆ get_parallel_for_i_faces_sum_type()

cs_dispatch_sum_type_t get_parallel_for_i_faces_sum_type ( const M *  m)
inline

Return sum type to be used with parallel_for_i_faces.

Template Parameters
Mmesh type structure (templated mostly to avoid dependency to mesh definitions in lower level code)
Parameters
[in]mpointer to mesh
Returns
assembly sum type that should be used in parallel_for_i_faces

◆ parallel_for()

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

◆ parallel_for_b_faces()

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

◆ parallel_for_i_faces()

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

◆ parallel_for_reduce()

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

◆ parallel_for_reduce_sum()

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

◆ wait()

void wait ( void  )
inline

Wait (synchronize) until launched computations have finished.


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