|
NumericAL
A header-only C++20 lexer built on REAL
|
numerical::buffer, the storage of the library's vectors, matrices and tensors: a std::vector whose elements constructed with no value are left uninitialised. More...
#include <algorithm>#include <atomic>#include <cstddef>#include <cstring>#include <new>#include <memory>#include <type_traits>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | numerical::detail::default_init_allocator< T > |
The allocator of numerical::buffer. An element constructed with no value is default-initialised, so a double keeps whatever its memory held, where std::allocator zeroes it; one constructed with a value is constructed from it. A result written in full is then written once, by the threads that compute it, not zeroed first on one of them (a product of order 512 on eight arm64 threads spent a fifth of its time in that zeroing). More... | |
| struct | numerical::detail::default_init_allocator< T >::rebind< U > |
| The allocator of another element type, as std::allocator_traits rebinds it. More... | |
Namespaces | |
| namespace | numerical |
| The NumericAL public API. | |
| namespace | numerical::detail |
Typedefs | |
| template<typename T > | |
| using | numerical::buffer = std::vector< T, detail::default_init_allocator< T > > |
The storage of vector, matrix and tensor, namely a std::vector whose buffer<T>(n) and resize(n) leave a double uninitialised, for a result about to be written in full. buffer<T>(n, T {}) zeroes, as std::vector<T>(n) does. | |
Functions | |
| template<typename T > | |
| bool | numerical::detail::operator== (const std::vector< T, default_init_allocator< T > > &buffer, const std::vector< T > &other) |
| Element-wise equality of a numerical::buffer and a std::vector, found by argument-dependent lookup through the allocator: code that compared a tensor's elements with a std::vector keeps doing so. | |
numerical::buffer, the storage of the library's vectors, matrices and tensors: a std::vector whose elements constructed with no value are left uninitialised.
Definition in file buffer.hpp.