|
guanaqo
1.0.0-alpha.27
Utilities for scientific software
|
Core helpers such as lookup tables, chunked loops, and assertion/assumption macros.
Topics | |
| Strings & Parsing | |
| String utilities and portable parsing helpers. | |
| Macros & Build Helpers | |
| Public-facing preprocessor utilities. | |
Files | |
| file | demangled-typename.hpp |
| Pretty-print type names. | |
| file | loop.hpp |
| Chunked iteration helpers. | |
| file | lut.hpp |
| Compile-time lookup table generators. | |
| file | max-history.hpp |
| Sliding-window maximum tracker. | |
| file | not-implemented.hpp |
| Exception type for unimplemented functionality. | |
| file | possible-alias.hpp |
| Utility to guard against accidental template aliases. | |
| file | ringbuffer.hpp |
| Circular index utilities and iterators. | |
| file | type-traits.hpp |
| Lightweight type-trait helpers. | |
Concepts | |
| concept | guanaqo::no_leading_allocator |
Classes | |
| class | guanaqo::MaxHistory< T > |
| Keep track of the maximum value over a specified horizon length. More... | |
| struct | guanaqo::not_implemented_error |
| struct | guanaqo::CircularIndices< IndexT > |
| struct | guanaqo::CircularIndexIterator< IndexT > |
| struct | guanaqo::ReverseCircularIndexIterator< IndexT > |
| class | guanaqo::CircularRange< IndexT > |
| class | guanaqo::ReverseCircularRange< IndexT > |
| struct | guanaqo::last_type< First, Pack > |
| struct | guanaqo::last_type< Only > |
| struct | guanaqo::first_type_or_void< Pack > |
| struct | guanaqo::first_type_or_void< First, Pack... > |
| struct | guanaqo::first_type_or_void<> |
Typedefs | |
| template<class NewAlias, class... PossibleAliases> | |
| using | guanaqo::possible_alias_t |
If NewAlias is not the same type as any of PossibleAliases, the result is NewAlias. | |
| template<auto M> | |
| using | guanaqo::class_from_member_ptr_t = class_from_member_ptr_impl_t<decltype(M)> |
| template<class... Pack> | |
| using | guanaqo::last_type_t = typename last_type<Pack...>::type |
| template<class... Pack> | |
| using | guanaqo::first_type_or_void_t = typename first_type_or_void<Pack...>::type |
Enumerations | |
| enum class | guanaqo::LoopDir : bool { guanaqo::LoopDir::Forward , guanaqo::LoopDir::Backward } |
| Direction for chunked iteration. More... | |
Functions | |
| std::string | guanaqo::demangled_typename (const std::type_info &t) |
| Get the pretty name of the given type as a string. | |
| template<class I> | |
| void | guanaqo::foreach_chunked (I i_begin, I i_end, auto chunk_size, auto func_chunk, auto func_rem, LoopDir dir=LoopDir::Forward) |
| template<class I> | |
| void | guanaqo::foreach_chunked_merged (I i_begin, I i_end, auto chunk_size, auto func_chunk, LoopDir dir=LoopDir::Forward) |
| template<class I, I R, I C, class F> | |
| consteval auto | guanaqo::make_2d_lut (F f) |
| Returns a 2D array of the form: | |
| template<class I, I N, class F> | |
| consteval auto | guanaqo::make_1d_lut (F f) |
| Returns an array of the form: | |
| template<auto... Ranges, class F> | |
| consteval auto | guanaqo::make_lut (F f) |
| Generalization of make_1d_lut and make_2d_lut. | |
| struct guanaqo::last_type |
| struct guanaqo::last_type< Only > |
| struct guanaqo::first_type_or_void |
| struct guanaqo::first_type_or_void< First, Pack... > |
| struct guanaqo::first_type_or_void<> |
| using guanaqo::possible_alias_t |
#include <guanaqo/possible-alias.hpp>
If NewAlias is not the same type as any of PossibleAliases, the result is NewAlias.
If NewAlias is not distinct from PossibleAliases, the result is a dummy type, uniquely determined by NewAlias and PossibleAliases.
Definition at line 31 of file possible-alias.hpp.
| using guanaqo::class_from_member_ptr_t = class_from_member_ptr_impl_t<decltype(M)> |
#include <guanaqo/type-traits.hpp>
Definition at line 34 of file type-traits.hpp.
| using guanaqo::last_type_t = typename last_type<Pack...>::type |
#include <guanaqo/type-traits.hpp>
Definition at line 45 of file type-traits.hpp.
| using guanaqo::first_type_or_void_t = typename first_type_or_void<Pack...>::type |
#include <guanaqo/type-traits.hpp>
Definition at line 58 of file type-traits.hpp.
|
strong |
| std::string guanaqo::demangled_typename | ( | const std::type_info & | t | ) |
#include <guanaqo/demangled-typename.hpp>
Get the pretty name of the given type as a string.
Definition at line 11 of file demangled-typename.cpp.
|
inline |
#include <guanaqo/loop.hpp>
|
inline |
#include <guanaqo/loop.hpp>
|
consteval |
#include <guanaqo/lut.hpp>
Returns a 2D array of the form:
The argument f should be a function (or callable) that accepts two arguments of type std::integral_constant.
Example 1: compile-time arguments
Example 2: run-time arguments
|
consteval |
#include <guanaqo/lut.hpp>
Returns an array of the form:
The argument f should be a function (or callable) that accepts an argument of type std::integral_constant.
|
consteval |
#include <guanaqo/lut.hpp>
Generalization of make_1d_lut and make_2d_lut.
Generates an n-dimensional array of the given function f applied point-wise to the cartesian product of the ranges given as template parameters.
| Ranges | Integers or arrays of structural types: an integer N results in the half-open range [0, N), and arrays result in all array elements being passed to the given function. |
Example: