9.2
general documentation
cs Namespace Reference

Namespaces

namespace  algorithm
 
namespace  execution
 
namespace  parall
 

Classes

struct  always_true
 Utility template which returns "true" for a given pack. This is necessary of std::enable_if_t<> when the template pack is not used for the if clause... More...
 
struct  are_integral
 Utility template to check if a pack of parameters is made of integral types. More...
 
struct  are_integral< T, Args... >
 
class  array
 Define a templated array class (owner of data) More...
 
struct  cdo_navsto_ac_ctx_t
 
struct  cdo_navsto_ctx_t
 Context related to CDO face-based discretization when dealing with Navier-Stokes equations and vector-valued face unknowns. More...
 
struct  cdo_navsto_monolithic_ctx_t
 Context related to CDO face-based discretization when dealing with Navier-Stokes equations and vector-valued face unknowns. Case of a monolithic approach (i.e fully coupled) More...
 
struct  cdo_navsto_predco_ctx_t
 Context related to CDO face-based discretization when dealing with Navier-Stokes equations with a prediction/correction algorithm. More...
 
class  mdspan
 Define a templated mdspan class (non owner of data) More...
 
class  runge_kutta_integrator
 Generic Runge-Kutta integrator class. More...
 

Typedefs

using paramedmem_coupling_t = cs_paramedmem_coupling_t
 
using sdm_t = cs_sdm_t
 

Enumerations

enum class  exec_type { device , host , unknown }
 
enum class  layout { right , left , unknown }
 

Functions

template<typename T >
CS_F_HOST_DEVICEabs (const T a)
 
template<typename T >
CS_F_HOST_DEVICEmin (const T a, const T b)
 
template<typename T >
CS_F_HOST_DEVICEmax (const T a, const T b)
 
template<typename T >
CS_F_HOST_DEVICEclamp (const T x, const T xmin, const T xmax)
 
template<class T >
CS_F_HOST_DEVICE constexpr std::enable_if_t< std::is_move_constructible< T >::value &&std::is_move_assignable< T >::value > swap_objects (T &obj1, T &obj2)
 A swap method which is callable from GPU and not only CPU. More...
 
template<class T , std::size_t N>
CS_F_HOST_DEVICE constexpr void swap_objects (T(&obj1)[N], T(&obj2)[N])
 
template<typename Id1 >
CS_F_HOST_DEVICE unsigned int number_of_digits (Id1 val)
 Count number of digits in an integer. More...
 
template<typename Id1 >
CS_F_HOST_DEVICE void uint_to_char (char *dest, Id1 val)
 Convert an unsigned integer to an array of char. More...
 
CS_F_HOST_DEVICE void concatenate_char (char *dest, const char *src)
 Concatenate two strings (char *) More...
 
template<exec_type _EXEC_, class F , class... Args>
bool parallel_for (cs_lnum_t n, F &&f, Args &&... args)
 parallel_for construct using a dispatch context based on template parameter (enum) "exec_type" More...
 
template<class F , class... Args>
bool parallel_for (cs_lnum_t n, F &&f, Args &&... args)
 parallel_for construct using the default global dispatch context More...
 
template<class F , class... Args>
bool parallel_for (cs_dispatch_context &ctx, cs_lnum_t n, F &&f, Args &&... args)
 parallel_for construct using a dispatch context as input argument More...
 
template<class F , class... Args>
bool parallel_for (cs_host_context &ctx, cs_lnum_t n, F &&f, Args &&... args)
 parallel_for construct using a host context as input argument More...
 
template<exec_type _EXEC_, class M , class F , class... Args>
bool parallel_for_i_faces (const M *m, F &&f, Args &&... args)
 parallel_for_i_faces construct using a dispatch context based on template parameter (enum) "exec_type" More...
 
template<class M , class F , class... Args>
bool parallel_for_i_faces (const M *m, F &&f, Args &&... args)
 parallel_for_i_faces construct using the default global dispatch context More...
 
template<class M , class F , class... Args>
bool parallel_for_i_faces (cs_dispatch_context &ctx, const M *m, F &&f, Args &&... args)
 parallel_for_i_faces construct using dispatch context as input argument More...
 
template<class M , class F , class... Args>
bool parallel_for_i_faces (cs_host_context &ctx, const M *m, F &&f, Args &&... args)
 parallel_for_i_faces construct using host context as input argument More...
 
template<exec_type _EXEC_, class T , class F , class... Args>
bool parallel_for_reduce_sum (cs_lnum_t n, T &sum, F &&f, Args &&... args)
 parallel_for_reduce_sum construct using a dispatch context based on template parameter (enum) "exec_type" More...
 
template<class T , class F , class... Args>
bool parallel_for_reduce_sum (cs_lnum_t n, T &sum, F &&f, Args &&... args)
 parallel_for_reduce_sum construct using the default global dispatch context More...
 
template<class T , class F , class... Args>
bool parallel_for_reduce_sum (cs_dispatch_context &ctx, cs_lnum_t n, T &sum, F &&f, Args &&... args)
 parallel_for_reduce_sum construct using the default global dispatch context More...
 
template<class T , class F , class... Args>
bool parallel_for_reduce_sum (cs_host_context &ctx, cs_lnum_t n, T &sum, F &&f, Args &&... args)
 parallel_for_reduce_sum construct using the default global host context More...
 
template<exec_type _EXEC_, class T , class R , class F , class... Args>
bool parallel_for_reduce (cs_lnum_t n, T &result, R &reducer, F &&f, Args &&... args)
 parallel_for_reduce construct using a dispatch context based on template parameter (enum) "exec_type" More...
 
template<class T , class R , class F , class... Args>
bool parallel_for_reduce (cs_lnum_t n, T &result, R &reducer, F &&f, Args &&... args)
 parallel_for_reduce construct using the default global dispatch context More...
 
template<class T , class R , class F , class... Args>
bool parallel_for_reduce (cs_dispatch_context &ctx, cs_lnum_t n, T &result, R &reducer, F &&f, Args &&... args)
 parallel_for_reduce_sum construct using the default global dispatch context More...
 
template<class T , class R , class F , class... Args>
bool parallel_for_reduce (cs_host_context &ctx, cs_lnum_t n, T &result, R &reducer, F &&f, Args &&... args)
 parallel_for_reduce_sum construct using the default global host context More...
 
template<exec_type _EXEC_, class... Args>
bool wait (void)
 wait construct using a dispatch context based on template parameter of exec_type (enum) More...
 
template<class... Args>
bool wait (void)
 wait construct using the default global dispatch context More...
 
template<class... Args>
bool wait (cs_dispatch_context &ctx)
 wait construct using a dispatch context as input argument More...
 
template<class... Args>
bool wait (cs_host_context &ctx)
 wait construct using a host context as input argument More...
 
CS_F_HOST_DEVICE double abs (const double a)
 
CS_F_HOST_DEVICE float abs (const float a)
 
CS_F_HOST_DEVICE double min (const double a, const double b)
 
CS_F_HOST_DEVICE float min (const float a, const float b)
 
CS_F_HOST_DEVICE double max (const double a, const double b)
 
CS_F_HOST_DEVICE float max (const float a, const float b)
 
CS_F_HOST_DEVICE double clamp (const double x, const double xmin, const double xmax)
 
CS_F_HOST_DEVICE float clamp (const float x, const float xmin, const float xmax)
 
CS_F_HOST_DEVICE float pow2 (float x)
 Compute the square of a real value. More...
 
CS_F_HOST_DEVICE double pow2 (double x)
 

Typedef Documentation

◆ paramedmem_coupling_t

using paramedmem_coupling_t = cs_paramedmem_coupling_t

◆ sdm_t

using sdm_t = cs_sdm_t

Enumeration Type Documentation

◆ exec_type

enum class exec_type
strong
Enumerator
device 
host 
unknown 

◆ layout

enum class layout
strong

Enum with layout options

Enumerator
right 

Layout right

left 

Layout left

unknown 

Layout unknown

Function Documentation

◆ abs() [1/3]

CS_F_HOST_DEVICE double abs ( const double  a)
inline

◆ abs() [2/3]

CS_F_HOST_DEVICE float abs ( const float  a)
inline

◆ abs() [3/3]

CS_F_HOST_DEVICE T abs ( const T  a)
inline

◆ clamp() [1/3]

CS_F_HOST_DEVICE double clamp ( const double  x,
const double  xmin,
const double  xmax 
)
inline

◆ clamp() [2/3]

CS_F_HOST_DEVICE float clamp ( const float  x,
const float  xmin,
const float  xmax 
)
inline

◆ clamp() [3/3]

CS_F_HOST_DEVICE T clamp ( const T  x,
const T  xmin,
const T  xmax 
)
inline

◆ concatenate_char()

CS_F_HOST_DEVICE void concatenate_char ( char *  dest,
const char *  src 
)
inline

Concatenate two strings (char *)

Parameters
[in,out]destChar to which we add another char*
[in]srcinput char* to concatenate to the other

◆ max() [1/3]

CS_F_HOST_DEVICE double max ( const double  a,
const double  b 
)
inline

◆ max() [2/3]

CS_F_HOST_DEVICE float max ( const float  a,
const float  b 
)
inline

◆ max() [3/3]

CS_F_HOST_DEVICE T max ( const T  a,
const T  b 
)
inline

◆ min() [1/3]

CS_F_HOST_DEVICE double min ( const double  a,
const double  b 
)
inline

◆ min() [2/3]

CS_F_HOST_DEVICE float min ( const float  a,
const float  b 
)
inline

◆ min() [3/3]

CS_F_HOST_DEVICE T min ( const T  a,
const T  b 
)
inline

◆ number_of_digits()

CS_F_HOST_DEVICE unsigned int number_of_digits ( Id1  val)
inline

Count number of digits in an integer.

Returns
number of digits
Parameters
[in]valInteger

◆ parallel_for() [1/4]

bool parallel_for ( cs_dispatch_context ctx,
cs_lnum_t  n,
F &&  f,
Args &&...  args 
)

parallel_for construct using a dispatch context as input argument

◆ parallel_for() [2/4]

bool parallel_for ( cs_host_context ctx,
cs_lnum_t  n,
F &&  f,
Args &&...  args 
)

parallel_for construct using a host context as input argument

◆ parallel_for() [3/4]

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

parallel_for construct using a dispatch context based on template parameter (enum) "exec_type"

◆ parallel_for() [4/4]

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

parallel_for construct using the default global dispatch context

◆ parallel_for_i_faces() [1/4]

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

parallel_for_i_faces construct using a dispatch context based on template parameter (enum) "exec_type"

◆ parallel_for_i_faces() [2/4]

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

parallel_for_i_faces construct using the default global dispatch context

◆ parallel_for_i_faces() [3/4]

bool parallel_for_i_faces ( cs_dispatch_context ctx,
const M *  m,
F &&  f,
Args &&...  args 
)

parallel_for_i_faces construct using dispatch context as input argument

◆ parallel_for_i_faces() [4/4]

bool parallel_for_i_faces ( cs_host_context ctx,
const M *  m,
F &&  f,
Args &&...  args 
)

parallel_for_i_faces construct using host context as input argument

◆ parallel_for_reduce() [1/4]

bool parallel_for_reduce ( cs_dispatch_context ctx,
cs_lnum_t  n,
T &  result,
R &  reducer,
F &&  f,
Args &&...  args 
)

parallel_for_reduce_sum construct using the default global dispatch context

◆ parallel_for_reduce() [2/4]

bool parallel_for_reduce ( cs_host_context ctx,
cs_lnum_t  n,
T &  result,
R &  reducer,
F &&  f,
Args &&...  args 
)

parallel_for_reduce_sum construct using the default global host context

◆ parallel_for_reduce() [3/4]

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

parallel_for_reduce construct using a dispatch context based on template parameter (enum) "exec_type"

◆ parallel_for_reduce() [4/4]

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

parallel_for_reduce construct using the default global dispatch context

◆ parallel_for_reduce_sum() [1/4]

bool parallel_for_reduce_sum ( cs_dispatch_context ctx,
cs_lnum_t  n,
T &  sum,
F &&  f,
Args &&...  args 
)

parallel_for_reduce_sum construct using the default global dispatch context

◆ parallel_for_reduce_sum() [2/4]

bool parallel_for_reduce_sum ( cs_host_context ctx,
cs_lnum_t  n,
T &  sum,
F &&  f,
Args &&...  args 
)

parallel_for_reduce_sum construct using the default global host context

◆ parallel_for_reduce_sum() [3/4]

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

parallel_for_reduce_sum construct using a dispatch context based on template parameter (enum) "exec_type"

◆ parallel_for_reduce_sum() [4/4]

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

parallel_for_reduce_sum construct using the default global dispatch context

◆ pow2() [1/2]

CS_F_HOST_DEVICE double pow2 ( double  x)
inline

◆ pow2() [2/2]

CS_F_HOST_DEVICE float pow2 ( float  x)
inline

Compute the square of a real value.

Parameters
[in]xvalue
Returns
the square of the given value

◆ swap_objects() [1/2]

CS_F_HOST_DEVICE constexpr std::enable_if_t< std::is_move_constructible< T >::value && std::is_move_assignable< T >::value > swap_objects ( T &  obj1,
T &  obj2 
)
constexpr

A swap method which is callable from GPU and not only CPU.

Template Parameters
Tclass object which is movable
Parameters
[in,out]obj1first object to swap
[in,out]obj2second object to swap

◆ swap_objects() [2/2]

CS_F_HOST_DEVICE constexpr void swap_objects ( T(&)  obj1[N],
T(&)  obj2[N] 
)
constexpr
Template Parameters
Tclass object which is movable
Nsize of array
Parameters
[in,out]obj1first array of objects to swap
[in,out]obj2second array of objects to swap

◆ uint_to_char()

CS_F_HOST_DEVICE void uint_to_char ( char *  dest,
Id1  val 
)
inline

Convert an unsigned integer to an array of char.

Parameters
[in,out]destchar* in which to store integer value
[in]valinteger to convert to string

◆ wait() [1/4]

bool wait ( cs_dispatch_context ctx)

wait construct using a dispatch context as input argument

◆ wait() [2/4]

bool wait ( cs_host_context ctx)

wait construct using a host context as input argument

◆ wait() [3/4]

bool wait ( void  )

wait construct using a dispatch context based on template parameter of exec_type (enum)

◆ wait() [4/4]

bool wait ( void  )

wait construct using the default global dispatch context