|
Stratax 0.4.0rc1
|
Unchecked offsets from element strides. More...


Go to the source code of this file.
Functions | |
| template<typename IndexContainer > | |
| std::size_t | stratax::indexing::offset (const core::Shape &strides, const IndexContainer &indices) |
| Computes an unchecked flat offset from strides and normalized indices. | |
Unchecked offsets from element strides.
Definition in file Indexing.hpp.
| std::size_t stratax::indexing::offset | ( | const core::Shape & | strides, |
| const IndexContainer & | indices | ||
| ) |
Computes an unchecked flat offset from strides and normalized indices.
Each index is multiplied by the stride for the corresponding dimension, and the products are summed to produce an element offset from the data pointer.
| IndexContainer | Iterable container of non-negative indices. |
| strides | Element strides, either canonical or a view's custom strides. |
| indices | One normalized index for every stride. |
indices. strides.rank(). strides. std::size_t. Definition at line 28 of file Indexing.hpp.