OpenLB 1.7
|
Classes | |
struct | derived_type_in_nested |
struct | eq |
Evaluates to true iff T is in TYPES. More... | |
struct | filter |
Return type list of all FIELDS meeting COND. More... | |
struct | filter< COND, TYPE > |
Return either nil type list or type list containing (single) FIELD depending on COND. More... | |
struct | first_type_with_base |
Get first type based on BASE contained in a given type list. More... | |
struct | first_type_with_base< BASE, HEAD > |
struct | id |
Identity type to pass non-constructible types as value. More... | |
struct | index_of_first_matching |
Helper for computing indices in type lists. More... | |
struct | index_of_first_matching< COND > |
struct | index_of_first_matching< COND, HEAD, TAIL... > |
struct | list |
Plain wrapper for list of types. More... | |
struct | list_base |
Base of any meta::list. More... | |
struct | list_item_with_base_default_base |
Get first type based on BASE contained in a given type list. More... | |
struct | list_item_with_base_default_base< BASE, HEAD > |
struct | neq |
Evaluates to true iff T is not in TYPES. More... | |
struct | plain_map |
struct | reverse |
Return type list of all FIELDS in reversed order. More... | |
struct | reverse< TYPE > |
Return either nil type list or type list containing FIELD in reversed order. More... | |
struct | unzip_flattened_keys |
struct | unzip_flattened_keys< KEY, VALUE, TAIL... > |
struct | unzip_flattened_keys<> |
struct | unzip_flattened_values |
struct | unzip_flattened_values< KEY, VALUE, TAIL... > |
struct | unzip_flattened_values<> |
Typedefs | |
template<typename TYPE > | |
using | id_t = typename id<TYPE>::type |
template<auto VALUE, typename TYPE = decltype(VALUE)> | |
using | value = typename std::integral_constant<TYPE, VALUE>::type |
Identity type to wrap non-type template arguments. | |
template<typename T > | |
using | is_arithmetic |
Checks whether T can be used as a scalar arithmetic type. | |
template<typename T , typename U = void> | |
using | enable_if_arithmetic_t = std::enable_if_t<is_arithmetic<T>::type::value, U> |
template<typename BASE , typename... TYPES> | |
using | first_type_with_base_t = typename first_type_with_base<BASE, TYPES...>::type |
template<template< typename > class COND, typename... TYPES> | |
using | filter_t = typename filter<COND,TYPES...>::type |
meta::list of TYPES meeting COND | |
template<typename... TYPES> | |
using | reverse_t = typename reverse<TYPES...>::type |
meta::list of TYPES in reversed order | |
template<typename... KVs> | |
using | map |
Map of types. | |
Functions | |
template<typename TYPE > | |
bool | is_aligned (const void *ptr) |
Returns true iff address ptr is aligned w.r.t. TYPE. | |
template<typename T > | |
std::string | name () |
Returns distinct name on GCC, Clang and ICC but may return arbitrary garbage as per the standard. | |
template<typename WANTED , typename... TYPES> | |
constexpr bool | contains () |
Returns true iff a given type list contains WANTED. | |
template<typename... TYPES> | |
bool | contains (std::type_index field) |
Returns true iff a given type list contains a type index. | |
template<typename TYPES , typename F , std::size_t... INDICES> | |
void | list_for_each_index (F &&f, std::index_sequence< INDICES... >) |
Apply F to each element of meta::list listed in INDICES. | |
template<typename TUPLE , typename F , std::size_t... INDICES> | |
void | tuple_for_each_index (TUPLE &tuple, F &&f, std::index_sequence< INDICES... >) |
Apply F to each element of TUPLE listed in INDICES. | |
template<typename TUPLE , typename F > | |
void | tuple_for_each (TUPLE &tuple, F &&f) |
Apply F to each element of TUPLE. | |
template<typename T , unsigned D, typename U , std::size_t... INDICES> | |
std::array< T, D > | make_array (U &&u, std::index_sequence< INDICES... >) |
Return std::array<T,D> where T is initialized with a common value (helper) | |
template<typename T , unsigned D, typename U > | |
std::array< T, D > | make_array (U &&u) |
Return std::array<T,D> where T is initialized with a common value. | |
template<typename T , unsigned D, typename F , std::size_t... INDICES> | |
std::array< T, D > | make_array_f (F &&f, std::index_sequence< INDICES... >) |
Return std::array<T,D> where T is initialized using a iDim-dependent function (helper) | |
template<typename T , unsigned D, typename F > | |
std::array< T, D > | make_array_f (F &&f) |
Return std::array<T,D> where T is initialized using a iDim-dependent function. | |
template<auto... VALUE, typename COND > | |
constexpr bool | indexed_pack_contains (COND cond) |
Returns true iff at least one VALUE satisfies COND. | |
template<std::size_t... Is, std::size_t... Js> | |
constexpr auto | operator+ (std::index_sequence< Is... >, std::index_sequence< Js... >) |
Concatenate two index sequences. | |
template<std::size_t... Is> | |
constexpr auto | array_from_index_sequence (std::index_sequence< Is... >) |
Convert index sequence into an array of its values. | |
template<typename PREDICATE , std::size_t... Is> | |
constexpr auto | filter_index_sequence (PREDICATE predicate, std::index_sequence< Is... >) |
Return index sequence of Is matching PREDICATE depending on index. | |
template<typename TYPES , typename PREDICATE , std::size_t... Is> | |
constexpr auto | filter_index_sequence (PREDICATE predicate, std::index_sequence< Is... >) |
Return index sequence of Is matching PREDICATE depending on type in TYPES. | |
template<typename TYPES , template< typename > class COND, std::size_t... Is> | |
constexpr auto | filter_index_sequence (std::index_sequence< Is... >) |
Return index sequence of Is matching COND in TYPES. | |
template<typename TYPES , template< typename > class COND> | |
constexpr auto | filter_index_sequence () |
Return index sequence of Is matching COND using index_sequence of TYPES. | |
template<typename MAP , std::size_t... Is> | |
constexpr auto | map_index_sequence (MAP map, std::index_sequence< Is... >) |
template<std::size_t N, std::size_t I, std::size_t... Is> | |
constexpr auto | take_n_sequence (std::index_sequence< I, Is... >) |
template<std::size_t N, std::size_t I, std::size_t... Is> | |
constexpr auto | drop_n_sequence (std::index_sequence< I, Is... >) |
template<std::size_t N> | |
constexpr auto | zero_sequence () |
template<std::size_t I, std::size_t O> | |
constexpr auto | make_index_sequence_in_range () |
template<std::size_t... Is> | |
constexpr bool | is_zero_sequence (std::index_sequence< Is... >) |
template<typename F , std::size_t... INDICES> | |
void | call_n_times (F &&f, std::index_sequence< INDICES... >) |
Call F for each index (exlicitly unrolled loop) | |
template<unsigned N, typename F > | |
void | call_n_times (F &&f) |
Call F for each i in 0..N-1 (exlicitly unrolled loop) | |
template<typename TYPES , typename Fa , typename Fb , std::size_t Ia, std::size_t Iaa, std::size_t... Is> | |
void | index_sequence_for_subsequence_L2 (Fa &&fa, Fb &&fb, std::index_sequence< Ia, Iaa, Is... > seq) |
Call fa for indices in index_sequence and call fb for indices in between indices in. | |
template<typename TYPES , typename Fa , typename Fb , std::size_t I, std::size_t... Is> | |
void | index_sequence_for_subsequence_L1 (Fa &&fa, Fb &&fb, std::index_sequence< I, Is... > seq) |
Call fa for indices in index_sequence and call fb for indices in between indices in. | |
template<typename TYPES , typename Fa , typename Fb , std::size_t... Is> | |
void | index_sequence_for_subsequence (Fa &&fa, Fb &&fb, std::index_sequence< Is... > seq) |
Call fa for indices in index_sequence and call fb for indices in between indices in. | |
using olb::meta::enable_if_arithmetic_t = std::enable_if_t<is_arithmetic<T>::type::value, U> |
using olb::meta::filter_t = typename filter<COND,TYPES...>::type |
meta::list of TYPES meeting COND
using olb::meta::first_type_with_base_t = typename first_type_with_base<BASE, TYPES...>::type |
using olb::meta::id_t = typename id<TYPE>::type |
using olb::meta::is_arithmetic |
Checks whether T can be used as a scalar arithmetic type.
Base checking for AD types to be replaced by e.g. concepts in C++20
using olb::meta::map |
using olb::meta::reverse_t = typename reverse<TYPES...>::type |
meta::list of TYPES in reversed order
using olb::meta::value = typename std::integral_constant<TYPE, VALUE>::type |
|
constexpr |
void olb::meta::call_n_times | ( | F && | f | ) |
void olb::meta::call_n_times | ( | F && | f, |
std::index_sequence< INDICES... > | ) |
|
constexpr |
bool olb::meta::contains | ( | std::type_index | field | ) |
|
constexpr |
Definition at line 485 of file meta.h.
References drop_n_sequence().
|
constexpr |
|
constexpr |
|
constexpr |
Return index sequence of Is matching PREDICATE depending on type in TYPES.
Definition at line 441 of file meta.h.
|
constexpr |
void olb::meta::index_sequence_for_subsequence | ( | Fa && | fa, |
Fb && | fb, | ||
std::index_sequence< Is... > | seq ) |
void olb::meta::index_sequence_for_subsequence_L1 | ( | Fa && | fa, |
Fb && | fb, | ||
std::index_sequence< I, Is... > | seq ) |
Call fa for indices in index_sequence and call fb for indices in between indices in.
Definition at line 546 of file meta.h.
void olb::meta::index_sequence_for_subsequence_L2 | ( | Fa && | fa, |
Fb && | fb, | ||
std::index_sequence< Ia, Iaa, Is... > | seq ) |
Call fa for indices in index_sequence and call fb for indices in between indices in.
Definition at line 530 of file meta.h.
|
constexpr |
bool olb::meta::is_aligned | ( | const void * | ptr | ) |
|
constexpr |
void olb::meta::list_for_each_index | ( | F && | f, |
std::index_sequence< INDICES... > | ) |
Apply F to each element of meta::list listed in INDICES.
Definition at line 344 of file meta.h.
std::array< T, D > olb::meta::make_array | ( | U && | u | ) |
std::array< T, D > olb::meta::make_array | ( | U && | u, |
std::index_sequence< INDICES... > | ) |
std::array< T, D > olb::meta::make_array_f | ( | F && | f | ) |
std::array< T, D > olb::meta::make_array_f | ( | F && | f, |
std::index_sequence< INDICES... > | ) |
|
constexpr |
Definition at line 502 of file meta.h.
References map_index_sequence().
|
constexpr |
Definition at line 470 of file meta.h.
std::string olb::meta::name | ( | ) |
Returns distinct name on GCC, Clang and ICC but may return arbitrary garbage as per the standard.
Definition at line 100 of file meta.h.
References name().
|
constexpr |
|
constexpr |
Definition at line 475 of file meta.h.
References take_n_sequence().
void olb::meta::tuple_for_each | ( | TUPLE & | tuple, |
F && | f ) |
Apply F to each element of TUPLE.
Definition at line 369 of file meta.h.
References tuple_for_each_index().
void olb::meta::tuple_for_each_index | ( | TUPLE & | tuple, |
F && | f, | ||
std::index_sequence< INDICES... > | ) |
Apply F to each element of TUPLE listed in INDICES.
Definition at line 355 of file meta.h.
|
constexpr |
Definition at line 495 of file meta.h.
References map_index_sequence().