|
Stratax 0.2.0
|
#include <cstddef>#include <stratax/core/Exceptions.hpp>#include <stratax/core/containers/Strides.hpp>#include <stratax/core/containers/Shape.hpp>#include <stratax/core/validation/Validation.hpp>Go to the source code of this file.
Functions | |
| template<typename IndexContainer> | |
| std::size_t | offset (const stratax::core::Shape &shape, const stratax::core::Strides &strides, const IndexContainer &index) |
| Computes a flat storage offset from a shape, strides, and index container. | |
| std::size_t offset | ( | const stratax::core::Shape & | shape, |
| const stratax::core::Strides & | strides, | ||
| const IndexContainer & | index ) |
Computes a flat storage offset from a shape, strides, and index container.
| shape | Array shape. |
| strides | Row-major or custom strides matching the shape. |
| index | Index container with one entry per dimension. |
| Exceptions::DimensionError | If the ranks do not match. |
| Exceptions::IndexError | If an index is out of bounds or the offset overflows. |
Definition at line 23 of file Indexing.hpp.