Eigen::Sizes< Indices > Struct Template Reference

Public Types

typedef internal::numeric_list< std::ptrdiff_t, Indices... > Base
 

Public Member Functions

template<typename DenseIndex >
ptrdiff_t IndexOfColMajor (const array< DenseIndex, Base::count > &indices) const
 
template<typename DenseIndex >
ptrdiff_t IndexOfRowMajor (const array< DenseIndex, Base::count > &indices) const
 
template<typename T >
Sizesoperator= (const T &)
 
std::ptrdiff_t operator[] (const std::ptrdiff_t index) const
 
std::ptrdiff_t rank () const
 
 Sizes ()
 
template<typename DenseIndex >
 Sizes (const array< DenseIndex, Base::count > &)
 
template<typename... DenseIndex>
 Sizes (DenseIndex...)
 
 Sizes (std::initializer_list< std::ptrdiff_t >)
 

Static Public Member Functions

static std::ptrdiff_t TotalSize ()
 

Public Attributes

const Base t
 

Static Public Attributes

static const ptrdiff_t count
 
static const std::ptrdiff_t total_size
 

Detailed Description

template<typename std::ptrdiff_t... Indices>
struct Eigen::Sizes< Indices >

Definition at line 95 of file TensorDimensions.h.

Member Typedef Documentation

◆ Base

template<typename std::ptrdiff_t... Indices>
typedef internal::numeric_list<std::ptrdiff_t, Indices...> Eigen::Sizes< Indices >::Base

Definition at line 96 of file TensorDimensions.h.

Constructor & Destructor Documentation

◆ Sizes() [1/4]

template<typename std::ptrdiff_t... Indices>
Eigen::Sizes< Indices >::Sizes ( )
inline

Definition at line 109 of file TensorDimensions.h.

109 { }

◆ Sizes() [2/4]

template<typename std::ptrdiff_t... Indices>
template<typename DenseIndex >
Eigen::Sizes< Indices >::Sizes ( const array< DenseIndex, Base::count > &  )
inlineexplicit

Definition at line 111 of file TensorDimensions.h.

111  {
112  // todo: add assertion
113  }

◆ Sizes() [3/4]

template<typename std::ptrdiff_t... Indices>
template<typename... DenseIndex>
Eigen::Sizes< Indices >::Sizes ( DenseIndex...  )
inline

Definition at line 114 of file TensorDimensions.h.

114 { }

◆ Sizes() [4/4]

template<typename std::ptrdiff_t... Indices>
Eigen::Sizes< Indices >::Sizes ( std::initializer_list< std::ptrdiff_t >  )
inlineexplicit

Definition at line 115 of file TensorDimensions.h.

115  {
116  // todo: add assertion
117  }

Member Function Documentation

◆ IndexOfColMajor()

template<typename std::ptrdiff_t... Indices>
template<typename DenseIndex >
ptrdiff_t Eigen::Sizes< Indices >::IndexOfColMajor ( const array< DenseIndex, Base::count > &  indices) const
inline

Definition at line 129 of file TensorDimensions.h.

129  {
130  return internal::fixed_size_tensor_index_linearization_helper<DenseIndex, Base::count, Base::count, false>::run(indices, t);
131  }
const Base t

◆ IndexOfRowMajor()

template<typename std::ptrdiff_t... Indices>
template<typename DenseIndex >
ptrdiff_t Eigen::Sizes< Indices >::IndexOfRowMajor ( const array< DenseIndex, Base::count > &  indices) const
inline

Definition at line 133 of file TensorDimensions.h.

133  {
134  return internal::fixed_size_tensor_index_linearization_helper<DenseIndex, Base::count, Base::count, true>::run(indices, t);
135  }

◆ operator=()

template<typename std::ptrdiff_t... Indices>
template<typename T >
Sizes& Eigen::Sizes< Indices >::operator= ( const T )
inline

Definition at line 119 of file TensorDimensions.h.

119  {
120  // add assertion failure if the size of other is different
121  return *this;
122  }

◆ operator[]()

template<typename std::ptrdiff_t... Indices>
std::ptrdiff_t Eigen::Sizes< Indices >::operator[] ( const std::ptrdiff_t  index) const
inline

Definition at line 124 of file TensorDimensions.h.

124  {
125  return internal::fixed_size_tensor_index_extraction_helper<std::ptrdiff_t, Base::count>::run(index, t);
126  }

◆ rank()

template<typename std::ptrdiff_t... Indices>
std::ptrdiff_t Eigen::Sizes< Indices >::rank ( ) const
inline

Definition at line 101 of file TensorDimensions.h.

101  {
102  return Base::count;
103  }

◆ TotalSize()

template<typename std::ptrdiff_t... Indices>
static std::ptrdiff_t Eigen::Sizes< Indices >::TotalSize ( )
inlinestatic

Definition at line 105 of file TensorDimensions.h.

105  {
106  return internal::arg_prod(Indices...);
107  }
constexpr decltype(reduce< product_op, Ts... >::run((*((Ts *) 0))... arg_prod))(Ts... ts)

Member Data Documentation

◆ count

template<typename std::ptrdiff_t... Indices>
const ptrdiff_t Eigen::Sizes< Indices >::count
static

Definition at line 99 of file TensorDimensions.h.

◆ t

template<typename std::ptrdiff_t... Indices>
const Base Eigen::Sizes< Indices >::t

Definition at line 97 of file TensorDimensions.h.

◆ total_size

template<typename std::ptrdiff_t... Indices>
const std::ptrdiff_t Eigen::Sizes< Indices >::total_size
static

Definition at line 98 of file TensorDimensions.h.


The documentation for this struct was generated from the following file: