template <typename view_type_>
class axis_iterator For a rank-2 matrix, iterating yields rank-1 row views/spans. Dereference calls parent_.slice_leading(index_) to produce each sub-view.
The native containers are where most integration mistakes happen. They need to be documented explicitly.
vector<T, A> owns storage and defaults to aligned_allocator<T, 64>.vector_view<T> is a const strided non-owning view.vector_span<T> is a mutable strided non-owning view.tensor<T, A, R> owns rank-R storage and also defaults to aligned allocation.tensor_view<T> and tensor_span<T> are the view forms.matrix, matrix_view, and matrix_span are rank-2 aliases.The important layout rules are:
reshape and flatten require contiguous layout.Memory ownership is explicit. vector and tensor deallocate through their allocator. vector_view, tensor_view, matrix_view, and spans never own memory.
And heterogenous index types for operator[] enable more interesting access patterns:
#include <numkong/numkong.hpp>
namespace nk = ashvardanian::numkong;
using nk::slice, nk::all, nk::f32_t, nk::tensor, nk::tensor_view;
auto [t, status] = tensor<f32_t>::from({
{1, 2, 3},
{4, 5, 6},
{7, 8, 9},
});
assert(nk::succeeded(status) && "allocated");
f32_t scalar_at_2d_coordinate = t[1, -1];
f32_t scalar_at_global_offset = t[5];
assert(scalar_at_2d_coordinate == scalar_at_global_offset && "same value");
tensor_view<f32_t> scalar_as_tensor = t[1, 1, slice];
tensor_view<f32_t> second_row = t[1, slice];
tensor_view<f32_t> second_column = t[all, 1, slice];
assert(second_row[1] == second_column[1] && "same value");You can also use a more traditional syntax with member functions, also leveraging built-in functionality for hardware-accelerated strided reductions and elementwise operations along any axis combination. Similar to NumPy, but statically typed:
tensor_view<f32_t> second_column = t[all, 1, slice]; // strided column view → {2, 5, 8}
auto minimum_index = nk::argmin(second_column); // index of the minimum in the second columnThe view types are conceptually close to std::mdspan from C++23.
The main differences are sub-byte element support, signed strides, and the kernel dispatch integration that std::mdspan does not provide.
If your codebase already uses std::mdspan, converting at the NumKong call boundary is straightforward:
#include <numkong/numkong.hpp>
#include <mdspan>
namespace nk = ashvardanian::numkong;
// Existing std::mdspan from your codebase
float data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
auto md = std::mdspan<float, std::extents<std::size_t, 3, 3>>(data);
// Wrap into a NumKong matrix_view — data pointer, extents, and strides map directly
auto view = nk::matrix_view<nk::f32_t>(
reinterpret_cast<nk::f32_t const *>(md.data_handle()),
md.extent(0), md.extent(1));
// Now use any NumKong kernel on it
auto [dot, status] = nk::dot<nk::f32_t>(view.row(0).as_vector(), view.row(1).as_vector());NumKong containers expose random-access iterators for element and row traversal.
dim_iterator — random-access iterator over element values, used by vector, vector_view, and vector_span.
Supports all standard iterator operations plus index() to retrieve the current position.axis_iterator — random-access iterator over sub-views (rows), used by tensor_view and tensor_span.
Also exposes index().enumerate() — free function returning a lightweight view that yields {index, value} pairs from any container with begin()/end()/size().#include <numkong/numkong.hpp>
namespace nk = ashvardanian::numkong;
auto [v, v_status] = nk::vector<nk::f16_t>::zeros(128);
if (nk::failed(v_status)) return v_status;
for (auto [i, val] : nk::enumerate(v))
std::printf("[%zu] = %f\n", i, val.to_f32());
// index() on raw iterators
for (auto it = v.begin(); it != v.end(); ++it)
std::printf("[%zu] = %f\n", it.index(), (*it).to_f32());Since tensor.hpp includes vector.hpp, enumerate() works on tensor row views too.
Tensors also support range-for over all logical scalar elements, yielding (position, value) pairs.
For sub-byte types each dimension is a logical scalar.
Use .dims() to iterate values without positions.
for (auto [pos, val] : matrix) { /* pos is std::array<size_t, R> */ }
for (auto [pos, ref] : matrix.span()) { ref = nk::f32_t{1}; }
for (auto val : matrix.dims()) { /* scalar only, no position */ }axis_iteratorRandom-access iterator over slices along the leading dimension.template <typename view_type_>
class axis_iterator For a rank-2 matrix, iterating yields rank-1 row views/spans. Dereference calls parent_.slice_leading(index_) to produce each sub-view.
keep_dims_tControls whether reduction collapses or preserves the reduced axis.all_tTag type for selecting all elements along a dimension.struct all_t range_tSlicing descriptor: [start, stop) with optional step.struct range_t step must be non-zero. Negative start/stop indices wrap from the end.
start | std::ptrdiff_t | |
|---|---|---|
stop | std::ptrdiff_t | |
step | std::ptrdiff_t |
dim_iteratorRandom-access iterator over logical dimensions.template <typename container_type_>
class dim_iterator scaled_tensorOwning, allocating block-scaled tensor.17template <typename format_,
typename element_allocator_ = aligned_allocator<typename format_::element_t>,
typename scale_allocator_ = aligned_allocator<typename format_::scale_t>,
std::size_t max_rank_ = 8>
struct scaled_tensor scaled_tensorscaled_tensor() noexcept=default; scaled_tensor(scaled_tensor &&) noexcept=default; scaled_tensor(scaled_tensor const &)=delete; operator=scaled_tensor & operator=(scaled_tensor &&) noexcept=default; scaled_tensor & operator=(scaled_tensor const &)=delete; *× 2Contextual-bool: truthy when the tensor owns storage.capacityAllocated logical-element capacity — the ceiling coordinated resize() honors.size_type capacity() const noexcept; resizeReshape in place to extents whose last dimension is a multiple of block_size, resizing both tensors without reallocating.status_t resize(size_type const *extents, size_type rank) noexcept; status_t resize(std::initializer_list<size_type> extents) noexcept; unexpected_dimensions_k Leaving both untouched, if the rank is bad, the last extent is not block-aligned, or either component's capacity is exceeded.reserveGrow capacity to at least values logical elements, plus the matching per-block scales; may reallocate/move the component buffers.clearDrop to an empty shape while keeping both component capacities.void clear() noexcept; swapSwap contents: both component tensors and the per-tensor scale.void swap(scaled_tensor & other) noexcept; elementsImmutable component accessors.element_tensor_type::view_type elements() const noexcept; tensor_scalePer-tensor multiplier, NVFP4 only, absent for the MX family.requires (format_::has_tensor_scale())
f32_t tensor_scale() const noexcept; cast() derives and writes it on encode through span().tensor_scale_slot().
viewImmutable whole-tensor view.view_type view() const noexcept; spanMutable whole-tensor span, writes through to the per-tensor scale.span_type span() noexcept; rowLeading-axis row view.template <std::integral index_type_>
view_type row(index_type_ i) const noexcept; columnsBlock-aligned last-axis, column, range view.view_type columns(size_type start, size_type stop) const noexcept; rows_viewsIterate leading-axis rows as immutable views.view_type::rows_views_t rows_views() const noexcept; uninitializedFactory: allocate an uninitialized block-scaled tensor with the given extents.expected<scaled_tensor> uninitialized(
size_type const *extents,
size_type rank,
element_allocator_ element_alloc = {},
scale_allocator_ scale_alloc = {}) noexcept; expected<scaled_tensor> uninitialized(
std::initializer_list<size_type> extents,
element_allocator_ element_alloc = {},
scale_allocator_ scale_alloc = {}) noexcept; Allocate from an extents list; see the pointer overload for the failure statuses.
extents | in | Logical extents; the last one must be a multiple of block_size. |
|---|---|---|
rank | in | Number of extents. |
element_alloc | in | Allocator of the element tensor. |
scale_alloc | in | Allocator of the block-scale tensor. |
The tensor.
unexpected_dimensions_k A bad rank or an unaligned last extent.from_componentsAdopt already-built component tensors and a per-tensor scale.expected<scaled_tensor> from_components(
element_tensor_type elements,
scale_tensor_type block_scales,
f32_t tensor_scale = 1.0f) noexcept; The tensor.
unexpected_dimensions_k block_scales isn't shaped like elements with the last extent divided by block_size.scaled_tensor_spanNon-owning, mutable span of a block-scaled tensor, a write target for cast().6template <typename format_,
std::size_t max_rank_>
struct scaled_tensor_span scaled_tensor_spanconstexpr scaled_tensor_span() noexcept=default; constexpr scaled_tensor_span(
element_span_type elements,
scale_span_type block_scales,
f32_t *tensor_scale = nullptr) noexcept; *× 6Contextual-bool: truthy when the handle is non-empty.constexpr operator bool() const noexcept; Enables the if(!span) empty-check idiom.
Enables the if(!view) empty-check idiom.
Enables the if(!view) empty-check idiom.
Enables the if(!v) empty-check idiom.
elementsMutable span of the packed micro-float elements.element_span_type elements() const noexcept; block_scalesMutable span of the per-block scales.scale_span_type block_scales() const noexcept; tensor_scale_slotPointer to the per-tensor multiplier slot, NVFP4 only; kernels write it here.requires (format_::has_tensor_scale())
f32_t * tensor_scale_slot() const noexcept; viewDecay to an immutable view.view_type view() const noexcept; scaled_tensor_viewA block-scaled tensor = packed micro-float elements + per-block scales + an optional per-tensor scale, all on the last, quantized, axis.13template <typename format_,
std::size_t max_rank_>
struct scaled_tensor_view Non-owning, immutable view of a block-scaled tensor.
Composes two ordinary tensors rather than inventing a parallel container family:
* - elements() — tensor<format::element_t> of the logical shape, packed sub-byte.
* - block_scales() — tensor<format::scale_t> of the same shape with the last extent
* divided by block_size ; one scale per block.
* - tensor_scale() — a scalar f32_t multiplier, NVFP4 only; the call is removed by a
* requires clause for the MX family, which has no per-tensor scale.
* Because the scales are a real reduced-shape tensor, slicing reuses the tensor machinery and slices both components in lockstep; a last-axis, column, range is divided by block_size. Encode / decode / transcode all go through cast() in cast.hpp; scaled_tensor itself is pure storage and never calls a kernel. The struct-of-arrays layout is exactly the NVFP4/MXFP8 GPU representation — elements() and block_scales() each export a DLPack / CUDA-array interface for zero-copy access.
Shape convention: elements() reports the logical shape [rows,columns] because its value type is the sub-byte-aware packed scalar, e.g. e2m1x2_t, so extent(last) is the element count even though storage is packed. Array-protocol bindings without a sub-byte scalar — the Python ScaledTensor.elements ndarray, Rust's packed slice — instead expose the packed byte shape [rows,columns] with the column extent scaled by element_bits/8, same bytes, reported per their type system.
scaled_tensor_viewconstexpr scaled_tensor_view() noexcept=default; constexpr scaled_tensor_view(
element_view_type elements,
scale_view_type block_scales,
f32_t tensor_scale = 1.0f) noexcept; *× 4Number of dimensions.size_type rank() const noexcept; extentLogical extent along dimension i.size_type extent(size_type i) const noexcept; numelTotal number of logical elements.size_type numel() const noexcept; *× 4True if empty.bool empty() const noexcept; elementsImmutable view of the packed micro-float elements, DLPack/CAI-exportable.element_view_type elements() const noexcept; block_scalesImmutable view of the per-block scales, one per block_size on the last axis.scale_view_type block_scales() const noexcept; tensor_scalePer-tensor multiplier, NVFP4 only; the call is absent for the MX family.requires (format_::has_tensor_scale())
f32_t tensor_scale() const noexcept; slice_leadingSlice along the leading axis, rank-reducing; shares the per-tensor scale.template <std::integral index_type_>
scaled_tensor_view slice_leading(index_type_ i) const noexcept; *× 2Row access, an alias for slice_leading.template <std::integral index_type_>
scaled_tensor_view row(index_type_ i) const noexcept; columnsBlock-aligned last-axis (column) range; preserves every leading axis.scaled_tensor_view columns(
size_type start,
size_type stop) const noexcept; Zero-copy.
start and stop must be multiples of block_size so both the element and the scale offsets stay integral and land on container boundaries, essential for packed sub-byte elements. Returns an empty view otherwise; materialize sub-block ranges with cast() first.
row_iterator_tForward iterator over leading-axis row views.rows_views_tRange of leading-axis row views, each carries the per-tensor scale.tensorOwning, N-dimensional tensor: allocated once, reshaped freely within its capacity.51template <typename value_type_,
typename allocator_type_ = aligned_allocator<value_type_>,
std::size_t max_rank_ = 8>
struct tensor resize() adjusts the shape within the allocated capacity() and fails beyond it, so data() is stable across resizes — the contract capture-replaying GPU code depends on. reserve() is the explicit opt-in that may reallocate to grow capacity(), and thus move data(). Allocate at the worst-case extents, or reserve() up front, then resize() to each step's live extents; clear() drops back to an empty shape while keeping the buffer.
tensortensor() noexcept=default; constexpr tensor(allocator_type_ const & alloc) noexcept; constexpr tensor(tensor && other) noexcept; tensor(tensor const &)=delete; ~tensor~tensor() noexcept; operator=tensor & operator=(tensor && other) noexcept; tensor & operator=(tensor const &)=delete; capacityAllocated values — the ceiling resize() honors; at least numel().size_type capacity() const noexcept; resizeReshape in place to contiguous extents, without reallocating: succeeds iff the new volume fits capacity(), the rank fits max_rank_ and the last extent is a whole number of storage values, so data() never moves — resizing to a step's live extents is safe under captured GPU graphs.status_t resize(std::initializer_list<size_type> extents) noexcept; status_t resize(size_type const *extents, size_type rank) noexcept; Reshape in place from an extents array of rank dims, mirroring the list overload.
unexpected_dimensions_k Leaving the shape untouched.reserveGrow the allocated capacity() to at least values elements.status_t reserve(size_type values) noexcept; Unlike resize(), this may reallocate and move data(); the live numel()-storage elements are preserved. No-op when capacity() >= values.
A failed growth leaves the state unchanged.
clearReset to a logically empty shape, empty() becomes true, while keeping capacity(), so the buffer can be refilled via resize() without reallocating.swapSwap contents: data, shape, capacity, and allocator if it propagates on swap.void swap(tensor & other) noexcept; extentExtent along dimension i.size_type extent(size_type i) const noexcept; stride_bytesStride in bytes along dimension i, signed.difference_type stride_bytes(size_type i) const noexcept; *× 3Total number of elements.size_type numel() const noexcept; dataTyped pointer to data.raw_values_dataThe storage as C kernels take it: raw_t for NumKong's types, else the type itself.raw_value_type * raw_values_data() noexcept; raw_value_type const * raw_values_data() const noexcept; shapeShape storage.shape_storage_<max_rank_> const & shape() const noexcept; get_allocatorAllocator.allocator_type get_allocator() const noexcept; *× 2Create an immutable view.view_type view() const noexcept; *× 2Create a mutable span.span_type span() noexcept; rows_viewsIterate rows as immutable views.rows_views_t rows_views() const noexcept; rows_spansIterate rows as mutable spans.rows_spans_t rows_spans() noexcept; rowsIterate rows as immutable views, a convenience alias for rows_views.view_type::rows_views_t rows() const noexcept; span_type::rows_spans_t rows() noexcept; Iterate rows as mutable spans, a convenience alias for rows_spans.
beginConst element iterator, begin.tensor_view_iterator_<view_type> begin() const noexcept; tensor_span_iterator_<span_type> begin() noexcept; Mutable element iterator, begin.
endConst element iterator, end.tensor_view_iterator_<view_type> end() const noexcept; tensor_span_iterator_<span_type> end() noexcept; Mutable element iterator, end.
*× 3Number of logical scalar elements.size_type size() const noexcept; dimsConst dimension-only view.tensor_dims_view_<tensor_view_iterator_<view_type>> dims() const noexcept; tensor_dims_view_<tensor_span_iterator_<span_type>> dims() noexcept; Mutable dimension-only view.
as_matrix_viewReinterpret as a 2D immutable matrix view.as_matrix_spanReinterpret as a 2D mutable matrix span.transposeTranspose: reverse dimension order, immutable view.view_type transpose() const noexcept; span_type transpose() noexcept; Transpose: reverse dimension order, mutable span.
reshapeReshape, immutable view.template <std::size_t out_rank_ = max_rank_>
tensor_view<value_type_, out_rank_> reshape(
std::initializer_list<size_type> new_extents) const noexcept; template <std::size_t out_rank_ = max_rank_>
tensor_span<value_type_, out_rank_> reshape(
std::initializer_list<size_type> new_extents) noexcept; Reshape, mutable span.
The output rank may differ from the source; pass it as the template argument when narrowing or widening, given contiguous layout and matching element counts.
is_*_contiguous× 2Check if contiguous in memory.bool is__contiguous() const noexcept; Always true for freshly-constructed tensors.
valuesStorage values as a contiguous span, refused like tensor_view::values.expected<std::span<value_type const>> values() const noexcept; expected<std::span<value_type>> values() noexcept; Mutable storage values as a contiguous span, refused like tensor_span::values.
slice_leadingSlice along leading dimension, immutable view.template <std::integral index_type_>
view_type slice_leading(index_type_ idx) const noexcept; template <std::integral index_type_>
span_type slice_leading(index_type_ idx) noexcept; Slice along leading dimension, mutable span.
rowRow access, immutable view, an alias for slice_leading.template <std::integral index_type_>
view_type row(index_type_ i) const noexcept; template <std::integral index_type_>
span_type row(index_type_ i) noexcept; Row access, mutable span, an alias for slice_leading.
operator[]Flat logical scalar access.template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) noexcept; template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) const noexcept; Const flat logical scalar access.
span_type operator[](tensor_slice_t) noexcept; Trailing slice returns the same tensor view/span category.
view_type operator[](tensor_slice_t) const noexcept; operator()Exact multi-dimensional scalar lookup via call syntax, C++20-portable.template <std::integral... index_types_>
requires (sizeof...(index_types_) >= 2)
decltype(auto) operator()(index_types_... idxs) noexcept; template <std::integral... index_types_>
requires (sizeof...(index_types_) >= 2)
decltype(auto) operator()(index_types_... idxs) const noexcept; Const multidimensional lookup via call syntax.
template <typename first_type_, typename second_type_, typename... rest_types_>
requires (trailing_tensor_slice_args_v<first_type_, second_type_, rest_types_...>)
auto operator()(
first_type_ first,
second_type_ second,
rest_types_... rest) noexcept; Prefix leading-axis slicing via call syntax, C++20-portable, narrowed like the span's.
template <typename first_type_, typename second_type_, typename... rest_types_>
requires (trailing_tensor_slice_args_v<first_type_, second_type_, rest_types_...>)
auto operator()(
first_type_ first,
second_type_ second,
rest_types_... rest) const noexcept; Const prefix leading-axis slicing via call syntax.
scalar_*_ref× 2Rank-0 mutable scalar access.decltype(auto) scalar__ref() noexcept; *× 2Rank-0 const scalar access.decltype(auto) scalar() const noexcept; as_vector_viewConvert to vector_view; requires rank == 1.vector_view<value_type> as_vector_view() const noexcept; as_vector_spanConvert to vector_span; requires rank == 1.vector_span<value_type> as_vector_span() noexcept; flattenFlatten, immutable view.template <std::size_t out_rank_ = max_rank_>
tensor_view<value_type_, out_rank_> flatten() const noexcept; template <std::size_t out_rank_ = max_rank_>
tensor_span<value_type_, out_rank_> flatten() noexcept; Flatten, mutable span.
Requires contiguous layout.
squeezeSqueeze, immutable view.view_type squeeze() const noexcept; span_type squeeze() noexcept; Squeeze, mutable span.
Removes size-1 dimensions.
fill_*_zeros× 3Zero-fill every element.status_t fill__zeros() noexcept; memset on the contiguous fast path, one memset per element on the strided slow path.
misaligned_k A strided sub-byte span.*× 2Fill every element with value.status_t fill(value_type value) noexcept; copy_fromCopy from a same-shape view.status_t copy_from(view_type input) noexcept; uninitializedFactory: allocate an uninitialized tensor from an extents array of rank dims.expected<tensor> uninitialized(
size_type const *extents,
size_type rank,
allocator_type_ alloc = {}) noexcept; expected<tensor> uninitialized(
std::initializer_list<size_type> extents,
allocator_type_ alloc = {}) noexcept; Factory: allocate an uninitialized tensor.
The tensor, empty for a zero volume.
Contents are uninitialized. Caller must fill before reading.
unexpected_dimensions_k rank exceeds max_rank_ or the last extent is not a whole number of storage values.unexpected_dimensions_k As the pointer overload reports.zerosFactory: zero-initialized tensor from an extents array; fails like uninitialized.expected<tensor> zeros(
size_type const *extents,
size_type rank,
allocator_type_ alloc = {}) noexcept; expected<tensor> zeros(
std::initializer_list<size_type> extents,
allocator_type_ alloc = {}) noexcept; Factory: allocate a zero-initialized tensor with the given extents.
unexpected_dimensions_k As uninitialized reports.fullFactory: tensor filled with val from an extents array; fails like uninitialized.expected<tensor> full(
size_type const *extents,
size_type rank,
value_type_ val,
allocator_type_ alloc = {}) noexcept; expected<tensor> full(
std::initializer_list<size_type> extents,
value_type_ val,
allocator_type_ alloc = {}) noexcept; Factory: allocate a tensor filled with a given value.
unexpected_dimensions_k As uninitialized reports.onesFactory: allocate a tensor filled with ones.expected<tensor> ones(
std::initializer_list<size_type> extents,
allocator_type_ alloc = {}) noexcept; extents | in | Extents, one per dimension, e.g. {3, 4}. |
|---|---|---|
alloc | in | Allocator instance. |
The tensor.
unexpected_dimensions_k As uninitialized reports.fromFactory: create a rank-1 tensor from an initializer list of values.expected<tensor> from(
std::initializer_list<value_type_> values,
allocator_type_ alloc = {}) noexcept; requires (max_rank_ >= 2)
expected<tensor> from(
std::initializer_list<std::initializer_list<value_type_>> rows,
allocator_type_ alloc = {}) noexcept; Factory: create a rank-2 tensor from a nested initializer list.
values | in | Values to fill the tensor with. |
|---|---|---|
alloc | in | Allocator instance. |
rows | in | Each inner list is a row. All rows must have the same length. |
The tensor.
unexpected_dimensions_k As uninitialized reports.unexpected_dimensions_k Ragged rows, or as uninitialized reports.from_rawFactory: adopt raw memory, whose shape must end in a whole number of storage values.tensor from_raw(
pointer ptr,
shape_storage_<max_rank_> const & shape,
allocator_type_ alloc = {}) noexcept; rows_views_tRange of immutable row views, slicing along the leading dimension.rows_spans_tRange of mutable row spans, slicing along the leading dimension.tensor_spanNon-owning, mutable, N-dimensional view.26template <typename value_type_,
std::size_t max_rank_ = 8>
struct tensor_span tensor_spanConvenience constructor for rank-2 spans from typed pointer, rows, and columns.constexpr tensor_span() noexcept=default; constexpr tensor_span(
char *data,
shape_storage_<max_rank_> const & shape) noexcept; requires (max_rank_ >= 2)
constexpr tensor_span(
value_type *data,
size_type rows,
size_type columns) noexcept; Convenience constructor for rank-2 spans from typed pointer, rows, and columns.
requires (max_rank_ >= 1)
constexpr tensor_span(value_type *data, size_type count) noexcept; Convenience constructor for a rank-1 span from a typed pointer and element count.
template <std::size_t span_extent_>
requires (max_rank_ >= 1)
constexpr tensor_span(
std::span<value_type, span_extent_> values) noexcept; Spans contiguous storage values as a rank-1 tensor of every logical dimension they hold, the inverse of values.
constexpr tensor_span(
value_type *data,
std::initializer_list<size_type> extents) noexcept; Convenience constructor from a typed pointer and an explicit extents list, where rank equals the list size.
template <std::size_t array_rank_>
requires (array_rank_ <= max_rank_)
constexpr tensor_span(
value_type *data,
std::array<size_type, array_rank_> const & extents) noexcept; Convenience constructor from a typed pointer and a fixed-size extents array, where rank equals array_rank_.
An out-of-range rank, empty or greater than max_rank_, yields an empty handle rather than overflowing the fixed-capacity shape storage.
*× 2Extent along the i-th dimension.size_type extent(size_type i) const noexcept; stride_*_bytes× 2Stride in bytes along the i-th dimension, signed.difference_type stride__bytes(size_type i) const noexcept; byte_*_data× 3Raw byte pointer.char * byte__data() const noexcept; *× 2Typed pointer, assumes data is contiguous from this pointer.value_type * data() const noexcept; raw_values_*_values_data× 4The storage as C kernels take it: raw_t for NumKong's types, else the type itself.raw_value_type * raw_values__values_data() const noexcept; *× 2Access the shape storage.shape_storage_<max_rank_> const & shape() const noexcept; slice_leadingSlice along leading dimension.template <std::integral index_type_>
tensor_span slice_leading(index_type_ idx) const noexcept; rowMutable row access, an alias for slice_leading.template <std::integral index_type_>
tensor_span row(index_type_ i) const noexcept; operator[]Flat logical scalar access — constexpr like the other accessors, so it stays device-callable.template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) const noexcept; tensor_span operator[](tensor_slice_t) const noexcept; Trailing slice returns the same span.
operator()Exact multi-dimensional scalar lookup via call syntax, C++20-portable.template <std::integral... index_types_>
requires (sizeof...(index_types_) >= 2)
decltype(auto) operator()(index_types_... idxs) const noexcept; template <typename first_type_, typename second_type_, typename... rest_types_>
requires (trailing_tensor_slice_args_v<first_type_, second_type_, rest_types_...>)
auto operator()(
first_type_ first,
second_type_ second,
rest_types_... rest) const noexcept; Prefix leading-axis slicing via call syntax, C++20-portable.
Every integral index drops one static rank.
with_max_rankThe same span under the static rank out_rank_, which must hold its runtime rank; an empty span otherwise.template <std::size_t out_rank_>
tensor_span<value_type_, out_rank_> with_max_rank() const noexcept; as_vectorConvert to vector_span; requires rank == 1.vector_span<value_type> as_vector() const noexcept; as_*_matrix× 2Narrow an already-2D handle to a rank-2 type.tensor_span<value_type_, 2> as__matrix() const noexcept; Requires rank == 2; use reshape<2>({...}) to collapse a higher-rank tensor.
valuesStorage values as a contiguous span; unexpected_dimensions_k for a strided span or one whose last extent ends mid-value.expected<std::span<value_type>> values() const noexcept; *× 2Transpose: reverse the order of all dimensions, swapping extents and strides.tensor_span transpose() const noexcept; *× 2Reshape to new extents, requires contiguous layout and matching element count.template <std::size_t out_rank_ = max_rank_>
tensor_span<value_type_, out_rank_> reshape(
std::initializer_list<size_type> new_extents) const noexcept; The output rank may differ from the source; pass it as the template argument when narrowing or widening. Returns an empty span if not contiguous, if element counts don't match, or if the last extent is not a whole number of storage values.
The output rank may differ from the source; pass it as the template argument when narrowing or widening. Returns an empty view when not contiguous, when element counts disagree, or when the last extent is not a whole number of storage values.
beginMutable element iterator, begin: yields (position,ref_or_proxy) pairs.tensor_span_iterator_<tensor_span> begin() const noexcept; endMutable element iterator, end.tensor_span_iterator_<tensor_span> end() const noexcept; dimsMutable dimension-only view.tensor_dims_view_<tensor_span_iterator_<tensor_span>> dims() const noexcept; flattenFlatten to 1D span, requires contiguous layout.template <std::size_t out_rank_ = max_rank_>
tensor_span<value_type_, out_rank_> flatten() const noexcept; Returns empty span if not contiguous.
fill_zerosZero-fill every element; declared here, defined after the free fill_zeros.status_t fill_zeros() noexcept; fillFill every element with value; declared here, defined after the free fill.status_t fill(value_type value) noexcept; copy_fromCopy from a same-shape view; declared here, defined after the free copy.status_t copy_from(tensor_view<value_type_, max_rank_> input) noexcept; *× 2Remove dimensions of size 1.tensor_span squeeze() const noexcept; rows_spans_tRange of mutable sub-spans along the leading dimension.tensor_viewNon-owning, immutable, N-dimensional view.14template <typename value_type_,
std::size_t max_rank_ = 8>
struct tensor_view tensor_viewConvenience constructor for rank-2 views from typed pointer, rows, and columns.constexpr tensor_view() noexcept=default; constexpr tensor_view(
char const *data,
shape_storage_<max_rank_> const & shape) noexcept; requires (max_rank_ >= 2)
constexpr tensor_view(
value_type const *data,
size_type rows,
size_type columns) noexcept; Convenience constructor for rank-2 views from typed pointer, rows, and columns.
requires (max_rank_ >= 1)
constexpr tensor_view(value_type const *data, size_type count) noexcept; Convenience constructor for a rank-1 view from a typed pointer and element count.
template <typename span_value_type_, std::size_t span_extent_>
requires (max_rank_ >= 1 && std::is_same_v<std::remove_const_t<span_value_type_>, value_type>)
constexpr tensor_view(
std::span<span_value_type_, span_extent_> values) noexcept; Views contiguous storage values as a rank-1 tensor of every logical dimension they hold, the inverse of values.
constexpr tensor_view(
value_type const *data,
std::initializer_list<size_type> extents) noexcept; Convenience constructor from a typed pointer and an explicit extents list, where rank equals the list size.
template <std::size_t array_rank_>
requires (array_rank_ <= max_rank_)
constexpr tensor_view(
value_type const *data,
std::array<size_type, array_rank_> const & extents) noexcept; Convenience constructor from a typed pointer and a fixed-size extents array, where rank equals array_rank_.
An out-of-range rank, empty or greater than max_rank_, yields an empty handle rather than overflowing the fixed-capacity shape storage.
slice_leadingSlice along the leading dimension.template <std::integral index_type_>
tensor_view<value_type_, max_rank_> slice_leading(
index_type_ idx) const noexcept; operator[]Rank-0 scalar access — constexpr like the accessors, so it stays device-callable.template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) const noexcept; tensor_view operator[](tensor_slice_t) const noexcept; Trailing slice returns the same view.
operator()Exact multi-dimensional scalar lookup via call syntax, C++20-portable.template <std::integral... index_types_>
requires (sizeof...(index_types_) >= 2)
decltype(auto) operator()(index_types_... idxs) const noexcept; template <typename first_type_, typename second_type_, typename... rest_types_>
requires (trailing_tensor_slice_args_v<first_type_, second_type_, rest_types_...>)
auto operator()(
first_type_ first,
second_type_ second,
rest_types_... rest) const noexcept; Prefix leading-axis slicing with a trailing slice marker, call syntax, C++20-portable.
Every integral index drops one static rank.
with_max_rankThe same view under the static rank out_rank_, which must hold its runtime rank; an empty view otherwise.template <std::size_t out_rank_>
tensor_view<value_type_, out_rank_> with_max_rank() const noexcept; scalarRank-0 scalar access.decltype(auto) scalar() const noexcept; as_vectorConvert to vector_view; requires rank == 1.vector_view<value_type> as_vector() const noexcept; is_contiguousCheck if the tensor is contiguous in memory.bool is_contiguous() const noexcept; valuesStorage values as a contiguous span; unexpected_dimensions_k for a strided view or one whose last extent ends mid-value.expected<std::span<value_type const>> values() const noexcept; beginElement iterator, begin: yields (position,scalar) pairs.tensor_view_iterator_<tensor_view> begin() const noexcept; endElement iterator, end.tensor_view_iterator_<tensor_view> end() const noexcept; dimsDimension-only view: iterate scalars without positions.tensor_dims_view_<tensor_view_iterator_<tensor_view>> dims() const noexcept; flattenFlatten to 1D view, requires contiguous layout.template <std::size_t out_rank_ = max_rank_>
tensor_view<value_type_, out_rank_> flatten() const noexcept; Returns empty view if not contiguous.
rows_views_tRange of sub-views along the leading dimension.vectorOwning, resizable-within-capacity, SIMD-aligned vector.25template <typename value_type_,
typename allocator_type_ = aligned_allocator<value_type_>>
struct vector Use the zeros()/uninitialized() factories for non-throwing construction, which return the vector with the status_t explaining a failure, or from_raw() to adopt existing memory. resize() changes the size within the allocated capacity() without moving values_data(); reserve() is the explicit opt-in that may reallocate to grow capacity.
Supports signed indexing (v[-1]), sub-byte types via proxy references, and slicing via operator[](range_t).
vectorDefault constructor — empty vector with default allocator.vector() noexcept=default; constexpr vector(allocator_type_ const & alloc) noexcept; Construct with custom allocator.
constexpr vector(vector && other) noexcept; Move constructor.
vector(vector const &)=delete; ~vectorDestructor — deallocates memory.~vector() noexcept; operator=Move assignment with allocator propagation.vector & operator=(vector && other) noexcept; vector & operator=(vector const &)=delete; swapSwap with another vector.void swap(vector & other) noexcept; capacityAllocated storage-value capacity — the ceiling resize() honors.size_type capacity() const noexcept; resizeResize in place to dims dimensions without reallocating: succeeds iff dims is a whole number of storage values that fits capacity(), so values_data() never moves.status_t resize(size_type dims) noexcept; unexpected_dimensions_k Leaving the size untouched.reserveGrow the allocated capacity() to at least values storage values.status_t reserve(size_type values) noexcept; Unlike resize(), this may reallocate and move values_data(); the live elements are preserved. No-op when already large enough.
A failed growth leaves the state unchanged.
clearReset to an empty size while keeping capacity(); storage frees on destruction.void clear() noexcept; *× 3Number of logical dimensions.size_type size() const noexcept; *× 3Check if empty.bool empty() const noexcept; operator boolContextual-bool: truthy when the vector owns storage.size_valuesNumber of storage values.size_type size_values() const noexcept; size_bytesSize in bytes.size_type size_bytes() const noexcept; values_dataPointer to underlying data.value_type * values_data() noexcept; value_type const * values_data() const noexcept; dataPointer to underlying data, so the vector satisfies vector_of through std::data.get_allocatorGet a copy of the allocator.allocator_type get_allocator() const noexcept; operator[]Signed dimension access.template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) noexcept; template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) const noexcept; vector_span<value_type> operator[](range_t r) noexcept; Slice via range_t, returns a vector_span.
vector_view<value_type> operator[](range_t r) const noexcept; Slice via range_t (const), returns a vector_view.
vector_span<value_type> operator[](all_t) noexcept; Select all elements as a span.
vector_view<value_type> operator[](all_t) const noexcept; Select all elements as a view.
Negative indices wrap from end.
A proxy reference for sub-byte types, or a direct reference for normal types.
beginDimension iterator to beginning.endDimension iterator to end.copy_*_from× 2Copy from a same-size view.status_t copy__from(vector_view<value_type> input) noexcept; memcpy on the contiguous fast path, per-element copy on the strided slow path.
unexpected_dimensions_k A size mismatch.misaligned_k Strided sub-byte operands.zerosFactory: allocate a zero-initialized vector with dims dimensions.expected<vector> zeros(
size_type dims,
allocator_type_ alloc = {}) noexcept; The vector, empty for zero dims.
unexpected_dimensions_k dims is not a whole number of storage values.onesFactory: allocate a vector filled with ones.expected<vector> ones(
size_type dims,
allocator_type_ alloc = {}) noexcept; The vector.
unexpected_dimensions_k As full reports.fullFactory: allocate a vector filled with val.expected<vector> full(
size_type dims,
value_type_ val,
allocator_type_ alloc = {}) noexcept; The vector, empty for zero dims.
unexpected_dimensions_k dims is not a whole number of storage values.uninitializedFactory: allocate an uninitialized vector.expected<vector> uninitialized(
size_type dims,
allocator_type_ alloc = {}) noexcept; The vector, empty for zero dims.
Contents are uninitialized. Caller must fill before reading.
unexpected_dimensions_k dims is not a whole number of storage values.from_rawFactory: adopt raw memory.vector from_raw(
pointer ptr,
size_type dims,
allocator_type_ alloc = {}) noexcept; Caller transfers ownership.
ptr | in | Pointer to data (must have been allocated by alloc). |
|---|---|---|
dims | in | Number of logical dimensions, a whole number of storage values. |
alloc | in | Allocator instance. |
vector_spanNon-owning, mutable, strided view into a vector.10template <typename value_type_>
struct vector_span Same as vector_view but allows mutation. Implicitly converts to vector_view.
vector_spanConstruct from contiguous typed pointer.constexpr vector_span() noexcept=default; template <std::unsigned_integral dims_type_, std::integral stride_type_>
constexpr vector_span(
char *data,
dims_type_ dims,
stride_type_ stride) noexcept; template <std::unsigned_integral dims_type_>
constexpr vector_span(value_type *data, dims_type_ dims) noexcept; Construct from contiguous typed pointer.
template <std::size_t span_extent_>
constexpr vector_span(
std::span<value_type, span_extent_> values) noexcept; Spans contiguous storage values as every logical dimension they hold, the inverse of values.
stride_bytesStride in bytes.difference_type stride_bytes() const noexcept; is_contiguousTrue if contiguous.bool is_contiguous() const noexcept; *× 2Typed pointer (only valid if contiguous).value_type * data() const noexcept; valuesStorage values as a contiguous span; unexpected_dimensions_k for a strided span or one ending mid-value.expected<std::span<value_type>> values() const noexcept; operator vector_view< value_type >Implicit conversion to const view.constexpr operator vector_view< value_type >() const noexcept; operator[]Mutable integral indexing.template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) const noexcept; vector_span operator[](range_t r) const noexcept; Sub-slice via range.
vector_span operator[](all_t) const noexcept; Select all elements.
Signed negatives wrap from end.
*× 2Dimension iterator to beginning.iterator begin() const noexcept; The handle is shallow-const, so iteration yields mutable refs.
*× 2Dimension iterator to end.iterator end() const noexcept; fillFill every element with value, mirroring the free fill on tensor_span: 1-byte storage uses a single byte_pattern memset, multi-byte storage a typed broadcast loop.status_t fill(value_type value) noexcept; misaligned_k A strided sub-byte span.vector_viewNon-owning, immutable, strided view into a vector.7template <typename value_type_>
struct vector_view Supports signed indexing (v[-1] = last element) and strided access. For sub-byte types, only contiguous views are meaningful.
vector_viewConstruct from contiguous typed pointer.constexpr vector_view() noexcept=default; template <std::unsigned_integral dims_type_, std::integral stride_type_>
constexpr vector_view(
char const *data,
dims_type_ dims,
stride_type_ stride) noexcept; template <std::unsigned_integral dims_type_>
constexpr vector_view(value_type const *data, dims_type_ dims) noexcept; Construct from contiguous typed pointer.
template <typename span_value_type_, std::size_t span_extent_>
requires std::is_same_v<std::remove_const_t<span_value_type_>, value_type>
constexpr vector_view(
std::span<span_value_type_, span_extent_> values) noexcept; Views contiguous storage values as every logical dimension they hold, the inverse of values.
stride_bytesStride in bytes between consecutive elements.difference_type stride_bytes() const noexcept; is_contiguousTrue if elements are stored contiguously.bool is_contiguous() const noexcept; byte_dataRaw byte pointer to the first element.char const * byte_data() const noexcept; valuesStorage values as a contiguous span; unexpected_dimensions_k for a strided view or one ending mid-value.expected<std::span<value_type const>> values() const noexcept; operator[]Integral indexing: signed negatives wrap from end.template <std::integral index_type_>
decltype(auto) operator[](index_type_ idx) const noexcept; vector_view operator[](range_t r) const noexcept; Sub-slice via range.
vector_view operator[](all_t) const noexcept; Select all elements (identity).
revCreate a reversed view by negating the stride and pointing to the last element.vector_view rev() const noexcept; Iterating the returned view visits elements in reverse order.
clampLightweight clamp to avoid pulling in <algorithm> for std::clamp.template <typename scalar_type_>
scalar_type_ clamp(
scalar_type_ val,
scalar_type_ low,
scalar_type_ high) noexcept; fill_uniformFill array with uniform random values.template <typename value_type_, typename generator_type_, typename component_type_ = typename value_type_::component_t>
void fill_uniform(
generator_type_ & generator,
value_type_ *values_ptr,
std::size_t values_count,
component_type_ min_val,
component_type_ max_val) noexcept; template <typename value_type_, typename generator_type_>
void fill_uniform(
generator_type_ & generator,
value_type_ *values_ptr,
std::size_t values_count) noexcept; Fill array with uniform random values within specified range.
generator | inout | The random number generator. |
|---|---|---|
values_ptr | out | Pointer to the array to fill. |
values_count | in | Number of storage values to fill, not dimensions for sub-byte types. |
min_val | in | Lowest value drawn. |
max_val | in | Highest value drawn. |
fill_lognormalFill array with lognormal distribution, good for detecting numerical edge cases.template <typename value_type_, typename generator_type_>
void fill_lognormal(
generator_type_ & generator,
value_type_ *values_ptr,
std::size_t values_count,
double mean = 0.0,
double stddev = 0.5) noexcept; Probability Density Function (PDF):
f(x; μ, σ) = 1 / (x · σ · √(2π)) · exp(−(ln x − μ)² / (2σ²)), x > 0
Equivalently, if X ~ 𝒩(μ, σ²), then eˣ ~ LogNormal(μ, σ). Values span many orders of magnitude, which is useful for exercising overflow/underflow paths in low-precision arithmetic. Common in modeling latencies, file sizes, and NLP token frequencies.
fill_cauchyFill array with Cauchy distribution, heavy tails for stress testing.template <typename value_type_, typename generator_type_>
void fill_cauchy(
generator_type_ & generator,
value_type_ *values_ptr,
std::size_t values_count,
double location = 0.0,
double scale = 1.0) noexcept; Probability Density Function (PDF):
f(x; x₀, γ) = 1 / (π · γ · (1 + ((x − x₀) / γ)²))
The Cauchy distribution has no defined mean or variance, as all its moments diverge, making it ideal for stress-testing numerical stability with extreme outliers. Common in robust Bayesian priors, half-Cauchy, metaheuristic Levy flights, and adversarial robustness evaluation.
fill_coordinatesFill arrays with latitude and longitude coordinate values in radians.template <typename value_type_, typename generator_type_>
void fill_coordinates(
generator_type_ & generator,
value_type_ *lats_ptr,
value_type_ *lons_ptr,
std::size_t values_count) noexcept; fill_nearby_coordinatesFill destination coordinate arrays within a max angular separation of origin coordinates.template <typename value_type_, typename generator_type_>
void fill_nearby_coordinates(
generator_type_ & generator,
value_type_ const *origin_lats_ptr,
value_type_ const *origin_lons_ptr,
value_type_ *dest_lats_ptr,
value_type_ *dest_lons_ptr,
std::size_t values_count,
double max_separation_rad) noexcept; Uses the great-circle destination formula to place each destination point at a random angular distance (uniform in [0, max_separation_rad]) and random bearing from the corresponding origin point. Coordinates are in radians.
fill_probabilityFill array as a probability distribution (sums to 1.0).template <typename value_type_, typename generator_type_>
void fill_probability(
generator_type_ & generator,
value_type_ *values_ptr,
std::size_t values_count) noexcept; fill_sorted_uniqueFill array with sorted unique random integer values, in-place.template <typename value_type_, typename generator_type_>
void fill_sorted_unique(
generator_type_ & generator,
value_type_ *values_ptr,
std::size_t values_count,
value_type_ max_val) noexcept; Draws values_count values from [0, max_val - values_count], sorts once, then adds each element's index. Duplicates become distinct, which guarantees uniqueness and keeps sorted order in O(n log n) with one sort and no retry loop. Requires max_val ≥ values_count.
*× 2Non-member swap.template <typename V, typename A, std::size_t R>
void swap(tensor<V, A, R> & a, tensor<V, A, R> & b) noexcept; fill_zerosZero-fill every element of output with one memset per maximal contiguous run, valid for every dtype as is_memset_zero_safe_v holds for all of them; returns misaligned_k on a layout that no contiguous run can cover.template <typename value_type_, std::size_t max_rank_>
status_t fill_zeros(
tensor_span<value_type_, max_rank_> output) noexcept; fillFill every element of output with value.template <typename value_type_, std::size_t max_rank_>
status_t fill(
tensor_span<value_type_, max_rank_> output,
value_type_ value) noexcept; Two-step strategy: first memsets the buffer to binary zero, avoiding NaN/inf propagation from uninitialised memory, then overlays the value via memset for 1-byte storage or a typed scalar broadcast loop for multi-byte storage. Returns misaligned_k on an unsupported layout.
copyCopy input element-by-element into output.template <typename value_type_, std::size_t max_rank_>
status_t copy(
tensor_view<value_type_, max_rank_> input,
tensor_span<value_type_, max_rank_> output) noexcept; template <typename value_type_, std::size_t max_rank_ = 8, typename allocator_type_ = aligned_allocator<value_type_>>
expected<tensor<value_type_, allocator_type_, max_rank_>> copy(
tensor_view<value_type_, max_rank_> input,
allocator_type_ alloc = {}) noexcept; Allocating copy: returns a fresh contiguous tensor with the same shape and contents as input, empty for an empty input, or the allocation's or the copy's failure.
Recursive traversal collapses contiguous tail dims into one memcpy per leaf, and a strided last dim, as in a transposed view, copies value by value. Returns unexpected_dimensions_k on a shape mismatch and misaligned_k on a layout it does not support.
rangeBuilds a range_t, so slices read v[nk::range(1, 4)].template <std::integral start_type_, std::integral stop_type_, std::integral step_type_ = int>
range_t range(
start_type_ start,
stop_type_ stop,
step_type_ step = 1) noexcept; enumerateReturns a view yielding (index, value) pairs over a vector, view, or span.template <typename container_type_>
enumerate_view_<container_type_> enumerate(
container_type_ & c) noexcept; allGlobal instance of all_t for use in slicing expressions.all_t all; Member types60scaled_tensor::format_type | format_ |
|---|---|
scaled_tensor::element_type | typename format_::element_t |
scaled_tensor::scale_type | typename format_::scale_t |
scaled_tensor::element_tensor_type | tensor<element_type, element_allocator_, max_rank_> |
scaled_tensor::scale_tensor_type | tensor<scale_type, scale_allocator_, max_rank_> |
scaled_tensor::view_type | scaled_tensor_view<format_, max_rank_> |
scaled_tensor::span_type | scaled_tensor_span<format_, max_rank_> |
scaled_tensor::size_type | std::size_t |
scaled_tensor_span::format_type | format_ |
scaled_tensor_span::element_type | typename format_::element_t |
scaled_tensor_span::scale_type | typename format_::scale_t |
scaled_tensor_span::element_span_type | tensor_span<element_type, max_rank_> |
scaled_tensor_span::scale_span_type | tensor_span<scale_type, max_rank_> |
scaled_tensor_span::view_type | scaled_tensor_view<format_, max_rank_> |
scaled_tensor_span::size_type | std::size_t |
scaled_tensor_view::format_type | format_ |
scaled_tensor_view::element_type | typename format_::element_t |
scaled_tensor_view::scale_type | typename format_::scale_t |
scaled_tensor_view::element_view_type | tensor_view<element_type, max_rank_> |
scaled_tensor_view::scale_view_type | tensor_view<scale_type, max_rank_> |
scaled_tensor_view::size_type | std::size_t |
scaled_tensor_view::difference_type | std::ptrdiff_t |
tensor::value_type | value_type_ |
tensor::raw_value_type | typename raw_pod_type<value_type>::type |
tensor::allocator_type | allocator_type_ |
tensor::alloc_traits | std::allocator_traits<allocator_type_> |
tensor::size_type | std::size_t |
tensor::difference_type | std::ptrdiff_t |
tensor::pointer | value_type_ * |
tensor::view_type | tensor_view<value_type_, max_rank_> |
tensor::span_type | tensor_span<value_type_, max_rank_> |
tensor_span::value_type | value_type_ |
tensor_span::raw_value_type | typename raw_pod_type<value_type>::type |
tensor_span::size_type | std::size_t |
tensor_span::difference_type | std::ptrdiff_t |
tensor_view::value_type | value_type_ |
tensor_view::raw_value_type | typename raw_pod_type<value_type>::type |
tensor_view::size_type | std::size_t |
tensor_view::difference_type | std::ptrdiff_t |
vector::value_type | value_type_ |
vector::raw_value_type | typename raw_pod_type<value_type>::type |
vector::allocator_type | allocator_type_ |
vector::alloc_traits | std::allocator_traits<allocator_type_> |
vector::size_type | std::size_t |
vector::difference_type | std::ptrdiff_t |
vector::pointer | value_type_ * |
vector::const_pointer | value_type_ const * |
vector::iterator | dim_iterator<vector> |
vector::const_iterator | dim_iterator<vector const> |
vector_span::value_type | value_type_ |
vector_span::raw_value_type | typename raw_pod_type<value_type>::type |
vector_span::size_type | std::size_t |
vector_span::difference_type | std::ptrdiff_t |
vector_span::iterator | dim_iterator<vector_span> |
vector_span::const_iterator | dim_iterator<vector_span const> |
vector_view::value_type | value_type_ |
vector_view::raw_value_type | typename raw_pod_type<value_type>::type |
vector_view::size_type | std::size_t |
vector_view::difference_type | std::ptrdiff_t |
vector_view::const_iterator | dim_iterator<vector_view const> |