ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
|
Classes | |
class | ryujin::MPIEnsemble |
class | ryujin::SynchronizationDispatch |
class | ryujin::Scope |
Functions | |
template<int dim, typename Number , typename Callable > | |
ToFunction< dim, Number, Callable > | ryujin::to_function (const Callable &callable, const unsigned int k) |
Various convenience functions and macros | |
#define | AssertThrowSIMD(variable, condition, exception) |
#define | ACCESSOR_READ_ONLY(member) |
#define | ACCESSOR(member) |
#define | ACCESSOR_READ_ONLY_NO_DEREFERENCE(member) |
#define | ASM_LABEL(label) asm("#" label); |
OpenMP parallel for macros | |
Intended use: // serial work
// per thread work and thread-local storage declarations
for (unsigned int i = 0; i < size_internal; i += simd_length) {
// parallel for loop that is statically distributed on all available
// worker threads by slicing the interval [0,size_internal)
}
| |
#define | RYUJIN_PRAGMA(x) _Pragma(#x) |
#define | RYUJIN_PARALLEL_REGION_BEGIN |
#define | RYUJIN_PARALLEL_REGION_END } |
#define | RYUJIN_OMP_FOR RYUJIN_PRAGMA(omp for) |
#define | RYUJIN_OMP_FOR_NOWAIT RYUJIN_PRAGMA(omp for nowait) |
#define | RYUJIN_OMP_BARRIER RYUJIN_PRAGMA(omp barrier) |
#define | RYUJIN_OMP_CRITICAL RYUJIN_PRAGMA(omp critical) |
#define | RYUJIN_OMP_SINGLE RYUJIN_PRAGMA(omp single) |
#define | RYUJIN_LIKELY(x) (__builtin_expect(!!(x), 1)) |
#define | RYUJIN_UNLIKELY(x) (__builtin_expect(!!(x), 0)) |
Miscellaneous helper functions, macros and classes.
#define AssertThrowSIMD | ( | variable, | |
condition, | |||
exception | |||
) |
Mixed serial/SIMD variant of the dealii AssertThrow macro. If variable is just a plain double or float, then this macro defaults to a simple call to dealii::AssertThrow(condition(variable), exception)
. Otherwise (if decltype(variable)
has a subscript operator operator[]
, the dealii::AssertThrow
macro is expanded for all components of the variable
.
Definition at line 120 of file convenience_macros.h.
#define ACCESSOR_READ_ONLY | ( | member | ) |
A convenience macro that automatically writes out an accessor (or getter) function:
or
depending on whether bar_ can be dereferenced, or not.
Definition at line 186 of file convenience_macros.h.
#define ACCESSOR | ( | member | ) |
Variant of the macro above that returns a mutable reference.
Definition at line 198 of file convenience_macros.h.
#define ACCESSOR_READ_ONLY_NO_DEREFERENCE | ( | member | ) |
Variant of the macro above that does not attempt to dereference the underlying object.
Definition at line 211 of file convenience_macros.h.
#define ASM_LABEL | ( | label | ) | asm("#" label); |
Injects a label into the generated assembly.
Definition at line 223 of file convenience_macros.h.
#define RYUJIN_PRAGMA | ( | x | ) | _Pragma(#x) |
#define RYUJIN_PARALLEL_REGION_BEGIN |
Begin an openmp parallel region.
#define RYUJIN_PARALLEL_REGION_END } |
#define RYUJIN_OMP_FOR RYUJIN_PRAGMA(omp for) |
#define RYUJIN_OMP_FOR_NOWAIT RYUJIN_PRAGMA(omp for nowait) |
#define RYUJIN_OMP_BARRIER RYUJIN_PRAGMA(omp barrier) |
#define RYUJIN_OMP_CRITICAL RYUJIN_PRAGMA(omp critical) |
#define RYUJIN_OMP_SINGLE RYUJIN_PRAGMA(omp single) |
#define RYUJIN_LIKELY | ( | x | ) | (__builtin_expect(!!(x), 1)) |
Compiler hint annotating a boolean to be likely true.
Intended use:
#define RYUJIN_UNLIKELY | ( | x | ) | (__builtin_expect(!!(x), 0)) |
Compiler hint annotating a boolean expression to be likely false.
Intended use:
ToFunction< dim, Number, Callable > ryujin::to_function | ( | const Callable & | callable, |
const unsigned int | k | ||
) |
Convenience wrapper that creates a (scalar) dealii::Function object out of a (fairly general) callable object returning array-like values. An example usage is given by the interpolation of initial values performed in InitialValues::interpolate_hyperbolic_vector() and InitialValues::interpolate_initial_precomputed_vector()
callable | A callable object that provides an operator(const Point<dim> &) and returns an array or rank-1 tensor. More precisely, the return type must have a subscript operator operator[] . |
k | Index describing the component that is returned by the function object. |
Definition at line 69 of file convenience_macros.h.