Eigen::internal::tensor_index_linearization_helper< Index, NumIndices, n, RowMajor > Struct Template Reference

#include <TensorDimensions.h>

Static Public Member Functions

static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run (array< Index, NumIndices > const &indices, array< Index, NumIndices > const &dimensions)
 

Member Function Documentation

◆ run()

template<typename Index , std::ptrdiff_t NumIndices, std::ptrdiff_t n, bool RowMajor>
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::internal::tensor_index_linearization_helper< Index, NumIndices, n, RowMajor >::run ( array< Index, NumIndices > const &  indices,
array< Index, NumIndices > const &  dimensions 
)
inlinestatic
140  {
141  return array_get < RowMajor ? n
142  : (NumIndices - n - 1) > (indices) + array_get < RowMajor
143  ? n
144  : (NumIndices - n - 1) >
146  indices, dimensions);
147  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
@ RowMajor
Definition: Constants.h:320
constexpr T & array_get(std::array< T, N > &a)
Definition: EmulateArray.h:251
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, array< Index, NumIndices > const &dimensions)
Definition: TensorDimensions.h:139

References Eigen::internal::array_get(), n, and Eigen::RowMajor.

Referenced by Eigen::DSizes< DenseIndex, NumDims >::IndexOfColMajor(), and Eigen::DSizes< DenseIndex, NumDims >::IndexOfRowMajor().


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