|
Stratax 0.4.0rc1
|
Internal result staging for compound operations on aliased arrays. More...
#include <stratax/core/dtypes/Concepts.hpp>#include <cstddef>#include <type_traits>#include <vector>

Go to the source code of this file.
Functions | |
| template<bool Stage, Array A, typename Evaluate > | |
| A & | stratax::core::compound_detail::write_results (A &lhs, Evaluate evaluate) |
| Writes computed values, staging them when storage may overlap. | |
Variables | |
| template<typename A > | |
| constexpr bool | stratax::core::compound_detail::owns_storage = is_array<std::remove_cvref_t<A>>::value |
| True for a Stratax container with unique owning element storage. | |
Internal result staging for compound operations on aliased arrays.
Definition in file Compound.hpp.
| A & stratax::core::compound_detail::write_results | ( | A & | lhs, |
| Evaluate | evaluate | ||
| ) |
Writes computed values, staging them when storage may overlap.
Staging evaluates every logical result before the first write. Repeated destination offsets receive the last result in logical row-major order. Owning Stratax containers have unique storage and may skip staging when their other operand also owns storage or is a copied scalar.
| Stage | Whether all results must be computed before writing. |
| lhs | Mutable destination array. |
| evaluate | Callable returning the result at a logical flat index. |
lhs. | Any | exception propagated by allocation, indexing, or evaluate. |
Definition at line 34 of file Compound.hpp.
|
inlineconstexpr |
True for a Stratax container with unique owning element storage.
Definition at line 62 of file Compound.hpp.