MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::tensor::indexed_tensor< TensorType, Names > Struct Template Reference

A tensor expression with named indices attached. More...

#include <index.hpp>

Public Attributes

const TensorType & ref

Static Public Attributes

static constexpr std::size_t num_indices = sizeof...(Names)
static constexpr std::array< char, sizeof...(Names)> names {Names...}

Detailed Description

template<typename TensorType, char... Names>
struct mtl::tensor::indexed_tensor< TensorType, Names >

A tensor expression with named indices attached.

Created by: bind(A, i, j) where i, j are Index objects. It holds a reference to A, so bind() of a temporary is rejected at compile time (#857: it dangled once the full-expression ended).

Member Data Documentation

◆ names

template<typename TensorType, char... Names>
std::array<char, sizeof...(Names)> mtl::tensor::indexed_tensor< TensorType, Names >::names {Names...}
staticconstexpr

◆ num_indices

template<typename TensorType, char... Names>
std::size_t mtl::tensor::indexed_tensor< TensorType, Names >::num_indices = sizeof...(Names)
staticconstexpr

◆ ref

template<typename TensorType, char... Names>
const TensorType& mtl::tensor::indexed_tensor< TensorType, Names >::ref

The documentation for this struct was generated from the following file:
  • /home/runner/work/mtl5/mtl5/include/mtl/tensor/index.hpp