![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Namespaces | |
| namespace | internal |
Classes | |
| class | ExpressionParser |
| Compiles and evaluates a scalar math expression at runtime. More... | |
Functions | |
| void | configureVtkThreading () |
| Configure the VTK SMP thread budget. | |
| void | checkOpenBlasThreading () |
| Validate the active OpenBLAS thread count. | |
| template<typename T, typename IndexType> | |
| std::vector< T > | slice (const std::vector< T > &source, const std::vector< IndexType > &indices) |
| Build a new vector by selecting elements of source at the given indices. | |
| template<typename Tuple, typename Func, std::size_t... Is> | |
| void | for_each_impl (Tuple &&tuple, Func &&func, std::index_sequence< Is... >) |
| template<typename Tuple, typename Func> | |
| void | for_each (Tuple &&tuple, Func &&func) |
| Apply func to every element of tuple, in order. | |
| template<typename Tuple, typename Func, std::size_t... Is> | |
| void | for_each_impl_idxed (Tuple &&tuple, Func &&func, std::index_sequence< Is... >) |
| template<typename Tuple, typename Func> | |
| void | for_each_idxed (Tuple &&tuple, Func &&func) |
| Apply func to every element of tuple together with its index. | |
| void vulpes::vutils::checkOpenBlasThreading | ( | ) |
Validate the active OpenBLAS thread count.
The function compares the number of threads reported by OpenBLAS with the requested thread budget:
OpenBLAS is inspected dynamically through libopenblas.so.0 and openblas_get_num_threads(). Diagnostic warnings are emitted if OpenBLAS cannot be inspected or if its active thread count differs from the expected value.
| void vulpes::vutils::configureVtkThreading | ( | ) |
Configure the VTK SMP thread budget.
The thread budget is read from the OMP_NUM_THREADS environment variable. The value must be a positive integer representable as an int.
If OMP_NUM_THREADS is absent or invalid, Vulpes configures VTK to use one thread per MPI process and emits a warning.
| void vulpes::vutils::for_each | ( | Tuple && | tuple, |
| Func && | func ) |
Apply func to every element of tuple, in order.
| Tuple | Any std::tuple-like type. |
| Func | Callable invocable with each element of tuple. |
| tuple | The tuple to iterate over. |
| func | The callable applied to each element. |
| void vulpes::vutils::for_each_idxed | ( | Tuple && | tuple, |
| Func && | func ) |
Apply func to every element of tuple together with its index.
| Tuple | Any std::tuple-like type. |
| Func | Callable invocable with each element of tuple and its std::size_t index. |
| tuple | The tuple to iterate over. |
| func | The callable applied to each (element, index) pair. |
| void vulpes::vutils::for_each_impl | ( | Tuple && | tuple, |
| Func && | func, | ||
| std::index_sequence< Is... > | ) |
| void vulpes::vutils::for_each_impl_idxed | ( | Tuple && | tuple, |
| Func && | func, | ||
| std::index_sequence< Is... > | ) |
| std::vector< T > vulpes::vutils::slice | ( | const std::vector< T > & | source, |
| const std::vector< IndexType > & | indices ) |
Build a new vector by selecting elements of source at the given indices.
| T | Element type. |
| IndexType | Integral index type. |
| source | The vector to select elements from. |
| indices | Indices into source, in the desired output order. |