Reference Base Utilities Member Functions A function histogram_data<Bins, TCount>:: above() Returns the count of values that fell above the histogram range. function tensor<T, NDims>:: access(const shape_type &) Returns a reference to the element at indices. function shape<Dims>:: adapt(const shape<indims> &, cbool_t<stop>) Adapt a higher-rank shape to the current rank for indexing. function shape<0>:: adapt(const shape<odims> &, cbool_t<stop>) Adapt any shape to a scalar; always returns the empty shape. function shape<Dims>:: add_at(index_t, cval_t<index_t, Axis>) Add value to the axis selected by the template parameter. function shape<Dims>:: add_shape_undef(const shape<dims> &, const shape<dims> &) Variant of add_shape that also propagates undefined_size . function shape<Dims>:: add_shape(const shape<dims> &, const shape<dims> &) Combine two shapes using the broadcasting rule max(max(x, y), x + y). function shape<Dims>:: add(const shape<dims> &) Element-wise addition of two shapes. function shape<Dims>:: add(index_t) Add value to the last axis. function tensor<T, NDims>:: allocate(size_t) Allocates aligned memory for size elements. function filter<T>:: apply_zeros(T (&)[Size]) Feeds zero-valued samples to the filter and writes its tail to a fixed-size C array. function filter<T>:: apply_zeros(T *, size_t) Feeds size zero-valued samples to the filter and writes the resulting tail. function filter<T>:: apply_zeros(univector<T, Tag> &) Feeds zero-valued samples to the filter and writes its tail to a univector. function filter<T>:: apply(T *, const expression_handle<T, 1> &, size_t) Evaluates src into a raw destination buffer through the filter. function filter<T>:: apply(T *, const Expr &, size_t) Evaluates the 1-dimensional expression src into a raw destination buffer through the filter. function filter<T>:: apply(T *, const T *, size_t) Applies the filter to a raw buffer and writes the result to another buffer. function filter<T>:: apply(T (&)[Size]) Applies the filter in-place to a fixed-size C array. function filter<T>:: apply(T *, size_t) Applies the filter in-place to a raw buffer. function filter<T>:: apply(T (&)[Size], T (&)[Size]) Applies the filter to a fixed-size C array and writes the result to another array. function filter<T>:: apply(univector<T, Tag> &) Applies the filter in-place to a univector. function filter<T>:: apply(univector<T, Tag1> &, const univector<T, Tag2> &) Applies the filter to a univector and writes the result to another univector. function filter<T>:: apply(univector<T, Tag> &, const Expr &) Evaluates the 1-dimensional expression src into dest through the filter. function filter<T>:: apply(univector<T, Tag> &, const expression_handle<T, 1> &) Evaluates src into dest through the filter. function univector_base<T, Class, true>:: assign_expr(Input &&) Evaluates input and writes the result into the derived vector. function small_buffer<T, Capacity>:: assign(const small_buffer<T, Capacity> &) Replaces the contents with a copy of other. function tensor<T, NDims>:: assign(const T &) Fills the tensor with a scalar value. function tensor<T, NDims>:: assign(const tensor<T, NDims> &) Copies the contents of src into this tensor. Both tensors must have the same shape. function tensor<T, NDims>:: astype() Returns a tensor with elements converted to type U. function inline_vector<T, N>:: at(size_type) Returns a const reference to the element at index with bounds checking. function inline_vector<T, N>:: at(size_type) Returns a reference to the element at index with bounds checking. B function expression_counter<T, Dims>:: back() function inline_vector<T, N>:: back() Returns a reference to the last element. function inline_vector<T, N>:: back() Returns a const reference to the last element. function small_buffer<T, Capacity>:: back() function small_buffer<T, Capacity>:: back() function inline_vector<T, N>:: begin() Returns an iterator to the first element. function inline_vector<T, N>:: begin() Returns a const iterator to the first element. function tensor<T, NDims>:: begin() Returns an iterator to the first element. function small_buffer<T, Capacity>:: begin() function small_buffer<T, Capacity>:: begin() function histogram_data<Bins, TCount>:: below() Returns the count of values that fell below the histogram range. function tensor<T, NDims>:: binary_inplace(const tensor<U, dims> &, Fn &&) Applies a binary function element-wise with rhs in place. function tensor<T, NDims>:: binary(const tensor<U, dims> &, Fn &&) Applies a binary function element-wise with rhs and returns the resulting tensor. C function tensor<T, NDims>:: calc_index(const shape_type &) Computes the linear offset of the element at indices using the tensor's strides. function inline_vector<T, N>:: cbegin() Returns a const iterator to the first element. function small_buffer<T, Capacity>:: cbegin() function inline_vector<T, N>:: cend() Returns a const iterator to one past the last element. function small_buffer<T, Capacity>:: cend() function small_buffer<T, Capacity>:: clear() Resets the buffer to zero elements, releasing any heap allocation. function expression_traits<expression_concatenate<Arg1, Arg2, ConcatAxis>>:: concat_shape(const shape<dims> &, const shape<dims> &) function tensor<T, NDims>:: contiguous_begin() Returns a contiguous iterator to the first element. The tensor must be contiguous. function tensor<T, NDims>:: contiguous_begin_unsafe() Returns a contiguous iterator to the first element without checking contiguity. function tensor<T, NDims>:: contiguous_end() Returns a contiguous iterator past the last element. The tensor must be contiguous. function tensor<T, NDims>:: contiguous_end_unsafe() Returns a contiguous iterator past the last element without checking contiguity. function tensor<T, NDims>:: copy() Returns a deep copy of the tensor. function tensor<T, NDims>:: copy_from(const tensor<T, NDims> &) Copies the contents of other into this tensor. function univector_base<T, Class, true>:: cref() Returns a const reference to the underlying data. function univector_base<T, Class, false>:: cref() Returns a const reference to the underlying data. D E function inline_vector<T, N>:: empty() Returns true if the vector holds no elements. function tensor<T, NDims>:: empty() Returns true if the tensor has no elements. function small_buffer<T, Capacity>:: empty() function inline_vector<T, N>:: end() Returns an iterator to one past the last element. function inline_vector<T, N>:: end() Returns a const iterator to one past the last element. function tensor<T, NDims>:: end() Returns the end sentinel iterator. function small_buffer<T, Capacity>:: end() function small_buffer<T, Capacity>:: end() function expression_vtable<T, Dims>:: expression_vtable<T, Dims>(ctype_t<Expression>) Build the vtable for concrete expression type Expression. function shape<Dims>:: extend(index_t) Promote the shape to a higher rank by prepending axes. function shape<0>:: extend(index_t) Promote the scalar shape to a higher rank by prepending axes of size value. F function tensor<T, NDims>:: finalizer() Returns the memory finalizer holding the data alive. function expression_with_arguments<Args>:: first() Returns a reference to the first argument. function expression_with_arguments<Args>:: first() Returns a const reference to the first argument. function expression_with_arguments<Arg>:: first() Returns a reference to the stored argument. function expression_with_arguments<Arg>:: first() Returns a const reference to the stored argument. function tensor<T, NDims>::tensor_iterator:: flat_index() Returns the flat (linear) index of the current element. function tensor<T, NDims>:: flatten() Returns a 1D tensor view of the data. function tensor<T, NDims>:: flatten_may_copy(bool) Returns a 1D tensor view of the data, copying if necessary. function expression_with_arguments<Args>:: fold_idx(Fn &&) Folds a callable over compile-time indices of the arguments. function expression_with_arguments<Arg>:: fold_idx(Fn &&) Folds a callable over the compile-time index of the argument. function expression_with_arguments<Args>:: fold(Fn &&) Folds a callable over the stored arguments, passing them by value. function expression_with_arguments<Arg>:: fold(Fn &&) Folds a callable over the stored argument. function shape<Dims>:: from_flat(size_t) Convert a flat offset to multi-dimensional indices. function shape<0>:: from_flat(size_t) Inverse of to_flat : returns the empty shape. function shape<Dims>:: from_std_array(const std::array<TI, Dims> &) Build a shape from a std::array. function expression_counter<T, Dims>:: front() function inline_vector<T, N>:: front() Returns a reference to the first element. function inline_vector<T, N>:: front() Returns a const reference to the first element. function small_buffer<T, Capacity>:: front() function small_buffer<T, Capacity>:: front() G function shape<Dims>:: ge(const shape<dims> &) Element-wise greater-than-or-equal comparison. function generator<T, VecWidth, Class, Twork>:: generate() Produces a vector of N values from the generator and advances its internal state. function fixed_shape_t<Values>:: get() function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: get() Returns the reduced value. function expression_adjacent<Fn, E>:: get_elements(const expression_adjacent<Fn, E> &, shape<dims>, axis_params<VecAxis, N>) function expression_dimensions<Dims, E>:: get_elements(const expression_dimensions<Dims, E> &, shape<dims>, axis_params<VecAxis, N>) function expression_histogram<Bins, E, TCount>:: get_elements(const expression_histogram<Bins, E, TCount> &, const shape<expression_with_traits<E>::dims> &, const axis_params<Axis, N> &) function expression_random_normal<T, Dims, Reference>:: get_elements(const expression_random_normal<T, Dims, Reference> &, shape<Dims>, axis_params<VecAxis, N>) Internal ADL-provided implementation for function expression_random_range<T, Dims, Reference>:: get_elements(const expression_random_range<T, Dims, Reference> &, shape<Dims>, axis_params<VecAxis, N>) Internal ADL-provided implementation for function expression_random_uniform<T, Dims, Reference>:: get_elements(const expression_random_uniform<T, Dims, Reference> &, shape<Dims>, axis_params<VecAxis, N>) Internal ADL-provided implementation for function expression_trace<E>:: get_elements(const expression_trace<E> &, shape<dims>, axis_params<VecAxis, N>) function generator<T, VecWidth, Class, Twork>:: get_elements(const generator<T, VecWidth, Class, Twork> &, const shape<1> &, const axis_params<0, N> &) Internal ADL-provided implementation for generator expressions. Returns a vector of N generated values at the given index. function tensor<T, NDims>:: get_range(index_t &, index_t &, index_t &, signed_index_t, const tensor_range &) Computes the range for a tensor_range specifier. Handles optional start/stop/step, negative indices, and clamping to the axis size. function tensor<T, NDims>:: get_range(index_t &, index_t &, index_t &, signed_index_t, index_t) Computes the range for a single integer index. function tensor<T, NDims>:: get_ranges(shape_type &, shape_type &, shape_type &, cvals_t<index_t, Num...>, const std::tuple<Index...> &) Computes the start, shape, and step for each axis given a set of indices and ranges. Axes without a corresponding index cover the full extent of the axis. function expression_traits<T>:: get_shape() function expression_with_traits<Arg>:: get_shape() function expression_function<Fn, Args>:: get_shape() Returns the static shape of the expression type. function expression_discard<Tin, Dims>:: get_shape() function expression_traits<expression_scalar<T>>:: get_shape() function expression_traits<expression_counter<T, Dims>>:: get_shape() function expression_traits<expression_slice<Arg>>:: get_shape() function expression_traits<expression_cast<T, Arg>>:: get_shape() function expression_traits<expression_lambda<T, Dims, Fn, Rnd>>:: get_shape() function expression_traits<expression_padded<Arg>>:: get_shape() function expression_traits<expression_reverse<Arg>>:: get_shape() function expression_traits<expression_fixshape<Arg, fixed_shape_t<ShapeValues...>>>:: get_shape() function expression_traits<expression_reshape<Arg, OutDims>>:: get_shape() function expression_traits<expression_linspace<T, truncated>>:: get_shape() function expression_traits<expression_concatenate<Arg1, Arg2, ConcatAxis>>:: get_shape() function expression_unpack<E>:: get_shape() function expression_dimensions<Dims, E>:: get_shape() function expression_traits<univector<T, Tag>>:: get_shape() Returns the static shape of the univector type. For fixed-size vectors this is the compile-time size; otherwise it is undefined_size . function expression_traits<expression_handle<T, Dims>>:: get_shape() Static shape query: undefined for an unbound handle. function expression_traits<expression_placeholder<T, Dims, Key>>:: get_shape() Static shape query: undefined for an unbound placeholder. function generator<T, VecWidth, Class, Twork>:: get_shape() function expression_traits<tensor<T, Dims>>:: get_shape() Returns the static shape of the expression, with undefined extents. function expression_random_uniform<T, Dims, Reference>:: get_shape() function expression_random_range<T, Dims, Reference>:: get_shape() function expression_random_normal<T, Dims, Reference>:: get_shape() function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: get_shape() function generator<T, VecWidth, Class, Twork>:: get_shape(const Class &) function expression_traits<expression_cast<T, Arg>>:: get_shape(const expression_cast<T, Arg> &) function expression_traits<expression_concatenate<Arg1, Arg2, ConcatAxis>>:: get_shape(const expression_concatenate<Arg1, Arg2, ConcatAxis> &) function expression_traits<expression_counter<T, Dims>>:: get_shape(const expression_counter<T, Dims> &) function expression_dimensions<Dims, E>:: get_shape(const expression_dimensions<Dims, E> &) function expression_discard<Tin, Dims>:: get_shape(const expression_discard<Tin, Dims> &) function expression_traits<expression_fixshape<Arg, fixed_shape_t<ShapeValues...>>>:: get_shape(const expression_fixshape<Arg, fixed_shape_t<ShapeValues...>> &) function expression_function<Fn, Args>:: get_shape(const expression_function<Fn, Args...> &) Returns the shape of the expression instance. function expression_traits<expression_handle<T, Dims>>:: get_shape(const expression_handle<T, Dims> &) Query the shape of the referenced expression via its vtable. function expression_traits<expression_lambda<T, Dims, Fn, Rnd>>:: get_shape(const expression_lambda<T, Dims, Fn, Rnd> &) function expression_traits<expression_linspace<T, truncated>>:: get_shape(const expression_linspace<T, truncated> &) function expression_traits<expression_padded<Arg>>:: get_shape(const expression_padded<Arg> &) function expression_traits<expression_placeholder<T, Dims, Key>>:: get_shape(const expression_placeholder<T, Dims, Key> &) Shape of the bound expression, or infinite_size when unbound. function expression_random_normal<T, Dims, Reference>:: get_shape(const expression_random_normal<T, Dims, Reference> &) function expression_random_range<T, Dims, Reference>:: get_shape(const expression_random_range<T, Dims, Reference> &) function expression_random_uniform<T, Dims, Reference>:: get_shape(const expression_random_uniform<T, Dims, Reference> &) function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: get_shape(const expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn> &) function expression_traits<expression_reshape<Arg, OutDims>>:: get_shape(const expression_reshape<Arg, OutDims> &) function expression_traits<expression_reverse<Arg>>:: get_shape(const expression_reverse<Arg> &) function expression_traits<expression_scalar<T>>:: get_shape(const expression_scalar<T> &) function expression_traits<expression_slice<Arg>>:: get_shape(const expression_slice<Arg> &) function expression_unpack<E>:: get_shape(const expression_unpack<E...> &) function expression_with_traits<Arg>:: get_shape(const expression_with_traits<Arg> &) function expression_traits<T>:: get_shape(const T &) function expression_traits<tensor<T, Dims>>:: get_shape(const tensor<T, Dims> &) Returns the shape of self. function expression_traits<univector<T, Tag>>:: get_shape(const univector<T, Tag> &) Returns the runtime shape of u. function generator_sin<T, VecWidth>:: get_value() Returns the sine components of the current interleaved cos/sin state. function representation<fmt_t<kfr::tensor<T, dims>, t, width, prec>>:: get(const fmt_t<kfr::tensor<T, dims>, t, width, prec> &) Returns the formatted string representation of value. function representation<fmt_t<kfr::univector<T, Tag>, t, width, prec>>:: get(const fmt_t<kfr::univector<T, Tag>, t, width, prec> &) Returns a string representation of value with per-element formatting. function representation<kfr::fraction>:: get(const kfr::fraction &) function representation<kfr::shape<dims>>:: get(const kfr::shape<dims> &) Returns the string representation of value. function representation<kfr::tensor<T, dims>>:: get(const kfr::tensor<T, dims> &) Returns the string representation of value. function representation<kfr::univector<T, Tag>>:: get(const kfr::univector<T, Tag> &) Returns a string representation of value. function representation<kfr::npy_decode_result>:: get(kfr::npy_decode_result) function expression_with_arguments<Args>:: getmask(csize_t<idx>) Returns the dimension mask for the argument at position idx. function expression_with_arguments<Arg>:: getmask(csize_t<idx>) Returns the sentinel dimension mask for the single argument. function univector<T, Size>:: get(size_t, value_type) Returns the element at index, or fallback_value if index is out of range. function univector<T, tag_array_ref>:: get(size_t, value_type) Returns the element at index, or fallback_value if index is out of range. function univector<T, tag_dynamic_vector>:: get(size_t, value_type) Returns the element at index, or fallback_value if index is out of range. H I function generator_expj<T, VecWidth>:: init_cossin(ST, ST) Initializes a vector of complex exponentials with angular frequency w and starting phase phase. function generator_cossin<T, VecWidth>:: init_cossin(T, T) Initializes a vector of interleaved cosine/sine pairs with angular frequency w and starting phase phase. function inline_vector<T, N>:: inline_vector<T, N>(Iter, Iter) Creates a vector from the range [first, last) . function expression_resource:: instance() function expression_resource_impl<E>:: instance() function tensor<T, NDims>:: is_contiguous() Returns true if the tensor data is stored contiguously. function tensor<T, NDims>::tensor_iterator:: is_end() Returns true if this iterator is the end sentinel. function tensor<T, NDims>:: is_last_contiguous() Returns true if the last axis has stride 1. function tensor<T, NDims>:: iterate(Fn &&) Calls fn for each element together with its multi-dimensional index. L M N O function shape<Dims>:: operator*() Access the underlying static array. function shape<Dims>:: operator->() Pointer-like access to the underlying static array. function fraction:: operator+() Unary plus (returns a copy of the fraction). function fraction:: operator-() Unary minus (negates the numerator). function tensor<T, NDims>::tensor_iterator:: operator*() Dereferences the iterator to the referenced element. function tensor<T, NDims>::tensor_iterator:: operator->() Accesses the referenced element by pointer. function tensor<T, NDims>::tensor_iterator:: operator++() Prefix increment, advancing to the next element in row-major order. function tensor<T, NDims>::nested_iterator_t:: operator*() Dereferences the iterator to the sub-tensor at the current index. function tensor<T, NDims>::nested_iterator_t:: operator++() Prefix increment, advancing to the next sub-tensor. function state_holder<T, false>:: operator->() Returns a pointer to the state (const overload). function state_holder<T, false>:: operator->() Returns a pointer to the state (non-const overload). function state_holder<T, false>:: operator*() Returns a reference to the state (const overload). function state_holder<T, false>:: operator*() Returns a reference to the state (non-const overload). function state_holder<T, true>:: operator->() Returns a pointer to the state (const overload). function state_holder<T, true>:: operator->() Returns a pointer to the state (non-const overload). function state_holder<T, true>:: operator*() Returns a reference to the state (const overload). function state_holder<T, true>:: operator*() Returns a reference to the state (non-const overload). function fraction:: operator+=(const fraction &) Add-assign. function fraction:: operator-=(const fraction &) Subtract-assign. function fraction:: operator*=(const fraction &) Multiply-assign. function fraction:: operator/=(const fraction &) Divide-assign. function fraction:: operator+(const fraction &, const fraction &) Add two fractions. function fraction:: operator-(const fraction &, const fraction &) Subtract two fractions. function fraction:: operator*(const fraction &, const fraction &) Multiply two fractions. function fraction:: operator/(const fraction &, const fraction &) Divide two fractions. function fraction:: operator==(const fraction &, const fraction &) Equality comparison. function fraction:: operator!=(const fraction &, const fraction &) Inequality comparison. function fraction:: operator<(const fraction &, const fraction &) Less-than comparison. function fraction:: operator<=(const fraction &, const fraction &) Less-than-or-equal comparison. function fraction:: operator>(const fraction &, const fraction &) Greater-than comparison. function fraction:: operator>=(const fraction &, const fraction &) Greater-than-or-equal comparison. function tensor<T, NDims>:: operator()(const Index &...) Returns a sub-tensor (slice) selected by a mix of integer indices and tensor_range specifiers. Axes indexed by integers are removed from the result; axes indexed by tensor_range are kept. function inline_vector<T, N>:: operator=(const inline_vector<T, N> &) function inline_vector<T, N>:: operator==(const inline_vector<T, N> &) Returns true if both vectors contain the same elements in the same order. function inline_vector<T, N>:: operator!=(const inline_vector<T, N> &) Returns true if the vectors differ in size or contents. function tensor<T, NDims>::nested_iterator_t:: operator==(const nested_iterator_t &) Returns true if two iterators refer to the same position. function tensor<T, NDims>::nested_iterator_t:: operator!=(const nested_iterator_t &) Returns true if two iterators refer to different positions. function random_state:: operator=(const random_state &) function shape<0>:: operator==(const shape<0> &) Two scalar shapes are always equal. function shape<0>:: operator!=(const shape<0> &) Two scalar shapes are never unequal. function tensor<T, NDims>:: operator()(const shape_type &, const shape_type &) Returns a sub-tensor (slice) spanning from start to stop. function tensor<T, NDims>:: operator=(const T &) Fills the tensor with a scalar value (const overload). function tensor<T, NDims>:: operator=(const T &) Fills the tensor with a scalar value (rvalue overload). function tensor<T, NDims>::tensor_iterator:: operator==(const tensor_iterator &) Returns true if two iterators refer to the same position. function tensor<T, NDims>::tensor_iterator:: operator!=(const tensor_iterator &) Returns true if two iterators refer to different positions. function tensor<T, NDims>:: operator=(const tensor<T, NDims> &) Copy-assigns the tensor, sharing the data of src. function tensor<T, NDims>:: operator=(const tensor<T, NDims> &) Copy-assigns the tensor from src (const overload). function tensor<T, NDims>:: operator=(const tensor<T, NDims> &) Copy-assigns the tensor from src (rvalue overload). function tensor<T, NDims>:: operator==(const tensor<T, NDims> &, const tensor<T, NDims> &) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(const tensor<T, NDims> &, tensor<T, NDims> &&) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(const tensor<T, NDims> &, tensor<T, NDims> &) Returns true if both tensors have the same shape and equal elements. function univector<T, tag_dynamic_vector>:: operator=(const univector<T, tag_dynamic_vector> &) function expression_resource_impl<E>:: operator Aligned delete overload matching the aligned allocation in make_resource . function expression_function<Fn, Args>:: operator=(In &&) Processes an input expression into this output expression. function tensor<T, NDims>:: operator[](index_t) Returns a reference to the element at the given flat index. function inline_vector<T, N>:: operator=(inline_vector<T, N> &&) function expression_unpack<E>:: operator=(Input &&) Assigns the values of input to all wrapped output expressions. function univector_base<T, Class, true>:: operator=(Input &&) Assigns an expression to the vector. The expression must have at most one dimension; its elements are written to the vector starting at index 0. function univector_base<T, Class, false>:: operator=(Input &&) Assignment from an expression is disabled for non-expression vectors. Always triggers a static assertion failure. function univector<T, tag_dynamic_vector>:: operator=(Input &&) Assigns an expression to the vector, resizing it when the expression has a finite size. function tensor<T, NDims>:: operator=(Input &&) Evaluates input and assigns the result to this tensor (const overload). function tensor<T, NDims>:: operator=(Input &&) Evaluates input and assigns the result to this tensor (rvalue overload). function tensor<T, NDims>:: operator=(Input &&) Evaluates input and assigns the result to this tensor (lvalue overload). function tensor<T, NDims>::tensor_iterator:: operator++(int) Postfix increment. function tensor<T, NDims>::nested_iterator_t:: operator++(int) Postfix increment. function random_state:: operator=(random_state &&) function histogram_data<Bins, TCount>:: operator[](size_t) Returns the count in bin n. function inline_vector<T, N>:: operator[](size_type) Returns a const reference to the element at index (no bounds checking). function inline_vector<T, N>:: operator[](size_type) Returns a reference to the element at index (no bounds checking). function small_buffer<T, Capacity>:: operator=(small_buffer<T, Capacity>) Copy- and move-assigns from other using copy-and-swap. function small_buffer<T, Capacity>:: operator[](std::size_t) function small_buffer<T, Capacity>:: operator[](std::size_t) function tensor<T, NDims>:: operator=(tensor<T, NDims> &&) Move-assigns the tensor from src. function tensor<T, NDims>:: operator==(tensor<T, NDims> &&, const tensor<T, NDims> &) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(tensor<T, NDims> &, const tensor<T, NDims> &) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(tensor<T, NDims> &&, tensor<T, NDims> &&) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(tensor<T, NDims> &&, tensor<T, NDims> &) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(tensor<T, NDims> &, tensor<T, NDims> &&) Returns true if both tensors have the same shape and equal elements. function tensor<T, NDims>:: operator==(tensor<T, NDims> &, tensor<T, NDims> &) Returns true if both tensors have the same shape and equal elements. function tensor_subscript<T, Derived, std::integer_sequence<index_t, Dims...>>:: operator()(type_for<index_t, Dims>...) Accesses the element at the given multi-dimensional index. function univector<T, tag_dynamic_vector>:: operator=(univector<T, tag_dynamic_vector> &&) function univector<T, tag_dynamic_vector>:: operator=(univector<T, tag_dynamic_vector> &) Copy assignment from a mutable univector (forwards to the const overload). function shape<Dims>:: operator Implicit conversion to index_t for 1D shapes. P function small_buffer<T, Capacity>:: pop_back() Removes the last element. function filter<T>:: process_buffer(T *, const T *, size_t) Filters size samples from src into dest. function expression_filter<T>:: process_buffer(T *, const T *, size_t) function filter<T>:: process_expression(T *, const expression_handle<T, 1> &, size_t) Evaluates size samples of the expression src into dest. function expression_filter<T>:: process_expression(T *, const expression_handle<T, 1> &, size_t) function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: process(const vec<Tin, N> &) function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: process(const vec<Tin, width> &) function shape<Dims>:: product() Product of every axis size (total number of elements). function shape<0>:: product() Product of all axes; the empty product is 0. function shape<dynamic_shape>:: product() Product of every axis size; 0 for an empty shape. function small_buffer<T, Capacity>:: push_back(const T &) Appends value to the end of the buffer. function inline_vector<T, N>:: push_back(T) Appends value to the end of the vector. function histogram_data<Bins, TCount>:: put(const vec<T, N> &) Adds a vector of values to the histogram, incrementing the appropriate bins. function histogram_data<Bins, TCount>:: put(T) Adds a single value to the histogram. R function tensor<T, NDims>:: reduce(Fn &&, T) Reduces all elements using fn and an initial value. function univector_base<T, Class, true>:: ref() Returns a mutable reference to the underlying data. function univector_base<T, Class, true>:: ref() Returns a const reference to the underlying data. function univector_base<T, Class, false>:: ref() Returns a mutable reference to the underlying data. function univector_base<T, Class, false>:: ref() Returns a const reference to the underlying data. function univector<T, tag_array_ref>:: ref() Returns *this as a reference. Intended for use on rvalues to forward the contained reference without copying. function shape<Dims>:: remove_back() Drop the last axis. function shape<dynamic_shape>:: remove_back() Drop the last axis. function shape<Dims>:: remove_front() Drop the first axis. function shape<dynamic_shape>:: remove_front() Drop the first axis. function tensor<T, NDims>:: require_contiguous() Throws if the tensor is not contiguous. function filter<T>:: reset() Resets the internal state (such as a delay line). function expression_filter<T>:: reset() Resets the state of the wrapped expression. function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: reset() function tensor<T, NDims>:: reshape_may_copy(const kfr::shape<dims> &, bool) Returns a tensor with a different shape, copying if necessary. function tensor<T, NDims>:: reshape(const kfr::shape<dims> &) Returns a tensor with a different shape without copying. The tensor must be contiguous. function univector<T, Size>:: resize(size_t) No-op for API compatibility with dynamically sized vectors. function univector<T, tag_array_ref>:: resize(size_t) No-op for API compatibility with dynamically sized vectors. function small_buffer<T, Capacity>:: resize(std::size_t) Resizes the buffer to newsize elements. function generator<T, VecWidth, Class, Twork>:: resync(T) Reinitializes the generator state so that the next produced value corresponds to the given start. function shape<Dims>:: revindex(size_t) Read an axis by its position from the back. function shape<0>:: revindex(size_t) Read an axis by its position from the back; always returns 1 because there are no axes. function univector_base<T, Class, true>:: ringbuf_read(size_t &, T &) Reads a single element from the ring buffer at cursor into value and advances the cursor. function univector_base<T, Class, true>:: ringbuf_read(size_t &, T *, size_t) Reads destsize elements from the ring buffer at cursor into dest. The buffer is treated as circular: reads that cross the end wrap around to the beginning. If destsize exceeds the buffer capacity, only the most recent size() elements are produced and the leading portion of dest is skipped. cursor is advanced by the number of elements actually read and wrapped into [0, size()). function univector_base<T, Class, true>:: ringbuf_read(size_t &, vec<T, N> &) Reads N elements from the ring buffer at cursor into the SIMD vector x. function univector_base<T, Class, true>:: ringbuf_step(size_t &, size_t) Advances cursor by step, wrapping it into the [0, size()) range. function univector_base<T, Class, true>:: ringbuf_write(size_t &, const T &) Writes a single value into the ring buffer at cursor and advances the cursor. function univector_base<T, Class, true>:: ringbuf_write(size_t &, const T *, size_t) Writes srcsize elements from src into the ring buffer starting at cursor. The buffer is treated as circular: data that does not fit before the end wraps around to the beginning. If srcsize exceeds the buffer capacity, only the most recent size() elements are kept and the rest is skipped. cursor is advanced by the number of elements actually written and wrapped into [0, size()). function univector_base<T, Class, true>:: ringbuf_write(size_t &, const vec<T, N> &) Writes the N elements of the SIMD vector x into the ring buffer at cursor. function shape<Dims>:: rotate_left() Rotate the axes left by one position. function shape<dynamic_shape>:: rotate_left() Rotate the axes left by one position. function shape<Dims>:: rotate_right() Rotate the axes right by one position. function shape<dynamic_shape>:: rotate_right() Rotate the axes right by one position. S function expression_discard<Tin, Dims>:: set_elements(const expression_discard<Tin, Dims> &, shape<Dims>, axis_params<VecAxis, N>, const std::type_identity_t<vec<Tin, N>> &) Discards a vector write. function expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn>:: set_elements(expression_reduce<Tout, Dims, Twork, Tin, ReduceFn, TransformFn, FinalFn> &, shape<Dims>, axis_params<VecAxis, N>, const std::type_identity_t<vec<Tin, N>> &) function expression_unpack<E>:: set_elements(expression_unpack<E...> &, shape<dims>, axis_params<Axis, N>, const std::type_identity_t<vec<value_type, N>> &) function shape<Dims>:: set_revindex(size_t, index_t) Write an axis by its position from the back. function shape<0>:: set_revindex(size_t, index_t) Set an axis by its position from the back; a no-op. function tensor<T, NDims>:: shape() Returns the shape of the tensor. function shape<dynamic_shape>:: shape(shape<Dims>) Construct a dynamic-rank shape from a fixed-rank one. function shape<0>:: size() Returns the number of elements (always 0). function spsc_ring_buffer<T>:: size() Returns an approximate number of elements currently available for dequeue. function inline_vector<T, N>:: size() Returns the number of elements currently stored. function tensor<T, NDims>:: size() Returns the total number of elements in the tensor. function histogram_data<Bins, TCount>:: size() Returns the number of bins. function small_buffer<T, Capacity>:: size() function univector_base<T, Class, true>:: slice(size_t, size_t) Returns subrange of the vector. If start is greater or equal to this->size, returns empty univector If requested size is greater than this->size, returns only available elements function univector_base<T, Class, true>:: slice(size_t, size_t) Returns subrange of the vector. If start is greater or equal to this->size, returns empty univector If requested size is greater than this->size, returns only available elements function expression_vtable<T, Dims>:: static_begin_pass(void *, shape<Dims>, shape<Dims>) begin_pass trampoline: forwards to begin_pass for Expression. function expression_vtable<T, Dims>:: static_end_pass(void *, shape<Dims>, shape<Dims>) end_pass trampoline: forwards to end_pass for Expression. function expression_vtable<T, Dims>:: static_get_elements(void *, shape<Dims>, T *) get_elements trampoline: forwards to get_elements for Expression. function expression_vtable<T, Dims>:: static_reset(void *) reset trampoline: forwards to reset for Expression. function expression_vtable<T, Dims>:: static_set_elements(void *, shape<Dims>, const T *) set_elements trampoline: forwards to set_elements for Expression. function expression_vtable<T, Dims>:: static_shapeof(void *, shape<Dims> &) shapeof trampoline: queries expression_traits::get_shape for Expression. function expression_vtable<T, Dims>:: static_substitute(void *, expression_handle<T, Dims>) substitute trampoline: invokes kfr::substitute on Expression. function tensor<T, NDims>:: strides() Returns the strides of the tensor. function shape<Dims>:: sub_shape_undef(const shape<dims> &, const shape<dims> &) Variant of sub_shape that also propagates undefined_size . function shape<Dims>:: sub_shape(const shape<dims> &, const shape<dims> &) Subtract one shape from another, treating infinite_size as infinite. function shape<Dims>:: sub(const shape<dims> &) Element-wise subtraction of two shapes. function expression_handle<T, Dims>:: substitute(expression_handle<T, Dims>) Replace the placeholder inside the referenced expression with new_handle. function shape<Dims>:: sum() Sum of every axis size. function small_buffer<T, Capacity>:: swap(small_buffer<T, Capacity> &, small_buffer<T, Capacity> &) Swaps the contents of two buffers. function generator_linear<T, VecWidth>:: sync(T) Reinitializes the generator so the next vector starts at start. function generator_exp<T, VecWidth>:: sync(T) Reinitializes the generator so the next vector starts at start. function generator_expj<T, VecWidth>:: sync(T) Reinitializes the generator so the next vector starts at phase start. function generator_exp2<T, VecWidth>:: sync(T) Reinitializes the generator so the next vector starts at start. function generator_cossin<T, VecWidth>:: sync(T) Reinitializes the generator so the next vector starts at phase start. function generator_sin<T, VecWidth>:: sync(T) Reinitializes the generator so the next vector starts at phase start. T function tensor<T, NDims>:: tensor<T, NDims>(const std::initializer_list<std::initializer_list<std::initializer_list<std::initializer_list<U>>>> &) Initializes a 4D tensor from a braced list. Defined for 4D tensors only. function tensor<T, NDims>:: tensor<T, NDims>(const std::initializer_list<std::initializer_list<std::initializer_list<U>>> &) Initializes a 3D tensor from a braced list. Defined for 3D tensors only. function tensor<T, NDims>:: tensor<T, NDims>(const std::initializer_list<std::initializer_list<U>> &) Initializes a 2D tensor from a braced list. Defined for 2D tensors only. function tensor<T, NDims>:: tensor<T, NDims>(const std::initializer_list<U> &) Initializes a 1D tensor from a braced list. Defined for 1D tensors only. function tensor<T, NDims>:: tensor<T, NDims>(Input &&) Constructs a tensor by evaluating an expression. function tensor<T, NDims>:: to_array() Copies the tensor elements into a std::array. function shape<0>:: to_flat(const shape<0> &) Flat offset for a scalar; the only valid offset is 0. function shape<Dims>:: to_flat(const shape<Dims> &) Convert multi-dimensional indices to a flat offset. function shape<Dims>:: to_std_array() Convert the shape to a std::array. function tensor<T, NDims>:: to_string(int, int, std::string, std::string, std::string) Returns a string representation of the tensor. function shape<Dims>:: tomask() Build a dimset mask with bits set for non-collapsed axes. function shape<0>:: tomask() Build a dimset with all bits set. function histogram_data<Bins, TCount>:: total() Returns the total number of values added to the histogram. function shape<Dims>:: trailing_zeros() Number of trailing axes of size 1, counting from the back. function shape<0>:: trailing_zeros() A scalar shape has no trailing collapsed axes. function shape<Dims>:: transpose() Reverse the order of the axes. function tensor<T, NDims>:: transpose() Returns a tensor with the order of axes reversed. For 0D and 1D tensors returns *this. function shape<Dims>:: trim() Reduce the shape to a lower rank by dropping leading axes. function shape<0>:: trim() Reduce the scalar shape to a smaller rank. function shape<Dims>:: trunc() Drop the last axis. Synonym for remove_back . function univector_base<T, Class, true>:: truncate(size_t) Returns subrange of the vector starting from 0. If requested size is greater than this->size, returns only available elements function univector_base<T, Class, true>:: truncate(size_t) Returns subrange of the vector starting from 0. If requested size is greater than this->size, returns only available elements function spsc_ring_buffer<T>:: try_dequeue(T *, size_t, const univector<T, Tag> &, bool) Attempts to dequeue size elements from buffer into dest. function spsc_ring_buffer<T>:: try_enqueue(const T *, size_t, univector<T, Tag> &, bool) Attempts to enqueue size elements from source into buffer. U function tensor<T, NDims>:: unary_inplace(Fn &&) Applies fn to each element in place. function tensor<T, NDims>:: unary(Fn &&) Applies a unary function to each element and returns the resulting tensor. function univector<T, Size>:: univector<T, Size>(const T &, const Args &...) Constructs the vector from a brace-enclosed list of values. function univector<T, Size>:: univector<T, Size>(Input &&) Constructs the vector and initializes it from an input expression. function univector<T, tag_array_ref>:: univector<T, tag_array_ref>(const univector<T, Tag> &) Constructs a reference from a const univector of any storage tag. function univector<T, tag_array_ref>:: univector<T, tag_array_ref>(const univector<U, Tag> &) Constructs a const reference from a const univector of a different element type. Only participates in overload resolution when T is const-qualified and the underlying element types match after removing const. function univector<T, tag_array_ref>:: univector<T, tag_array_ref>(univector<T, Tag> &) Constructs a reference from a mutable univector of any storage tag. function univector<T, tag_array_ref>:: univector<T, tag_array_ref>(univector<U, Tag> &) Constructs a const reference from a mutable univector of a different element type. function univector<T, tag_array_ref>:: univector<T, tag_array_ref>(univector<U, Tag> &&) Constructs a const reference by taking a reference to the data of a temporary univector. function univector<T, tag_dynamic_vector>:: univector<T, tag_dynamic_vector>(const std::vector<T, Allocator> &) Deleted overload to prevent construction from a std::vector with a foreign allocator. function univector<T, tag_dynamic_vector>:: univector<T, tag_dynamic_vector>(Input &&) Constructs the vector from an input expression, resizing to the expression's size. The expression must be finite and have at most one dimension. function univector<T, tag_dynamic_vector>:: univector<T, tag_dynamic_vector>(std::vector<T, Allocator> &&) Deleted overload to prevent construction from a std::vector with a foreign allocator. V Back to top