Go to the documentation of this file.
10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
35 template<std::ptrdiff_t n,
typename Dimension>
struct dget {
40 template<
typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n,
bool RowMajor>
53 template<
typename Index, std::ptrdiff_t NumIndices,
bool RowMajor>
63 template<
typename Index, std::ptrdiff_t n>
70 const Index mult = (index ==
n-1) ? 1 : 0;
76 template<
typename Index>
91 #ifndef EIGEN_EMULATE_CXX11_META_H
92 template <
typename std::ptrdiff_t...
Indices>
108 template <
typename DenseIndex>
112 #if EIGEN_HAS_VARIADIC_TEMPLATES
139 template <
typename std::ptrdiff_t...
Indices>
147 template <std::ptrdiff_t n>
148 struct non_zero_size {
149 typedef internal::type2val<std::ptrdiff_t, n>
type;
152 struct non_zero_size<0> {
153 typedef internal::null_type
type;
156 template <std::ptrdiff_t V1=0, std::ptrdiff_t V2=0, std::ptrdiff_t V3=0, std::ptrdiff_t V4=0, std::ptrdiff_t V5=0>
struct Sizes {
170 template <
typename DenseIndex>
179 #if EIGEN_HAS_VARIADIC_TEMPLATES
181 explicit Sizes(std::initializer_list<std::ptrdiff_t>) {
211 return static_cast<Index>(-1);
226 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>
236 template<
typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n,
bool RowMajor>
248 template<
typename Index, std::ptrdiff_t NumIndices,
bool RowMajor>
262 template <
typename DenseIndex,
int NumDims>
276 for (
int i = 0 ;
i < NumDims; ++
i) {
288 for (
int i = 0 ;
i < NumDims; ++
i) {
295 template<
typename OtherIndex>
307 for (
int i = 0;
i < NumDims; ++
i) {
312 #ifdef EIGEN_HAS_INDEX_LIST
313 template <
typename FirstType,
typename... OtherTypes>
315 explicit DSizes(
const Eigen::IndexList<FirstType, OtherTypes...>&
dimensions) {
322 #ifndef EIGEN_EMULATE_CXX11_META_H
323 template <
typename std::ptrdiff_t...
Indices>
325 for (
int i = 0 ;
i < NumDims; ++
i) {
330 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>
332 for (
int i = 0 ;
i < NumDims; ++
i) {
338 #if EIGEN_HAS_VARIADIC_TEMPLATES
341 EIGEN_STATIC_ASSERT(
sizeof...(otherDimensions) + 2 == NumDims, YOU_MADE_A_PROGRAMMING_MISTAKE)
386 template <
typename IndexType,
int NumDims>
390 for (
int i = 0;
i < NumDims; ++
i) {
391 if (
i > 0)
os <<
", ";
400 template<
typename Index, std::ptrdiff_t NumIndices, std::ptrdiff_t n,
bool RowMajor>
412 template<
typename Index, std::ptrdiff_t NumIndices,
bool RowMajor>
427 static const ptrdiff_t
value = NumDims;
430 static const ptrdiff_t
value = NumDims;
432 #ifndef EIGEN_EMULATE_CXX11_META_H
447 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>
struct array_size<const
Sizes<V1,V2,V3,V4,V5> > {
450 template <std::ptrdiff_t V1, std::ptrdiff_t V2, std::ptrdiff_t V3, std::ptrdiff_t V4, std::ptrdiff_t V5>
struct array_size<Sizes<V1,V2,V3,V4,V5> > {
454 return get<n, typename Sizes<V1,V2,V3,V4,V5>::Base>
::value;
460 template <
typename Dims1,
typename Dims2, ptrdiff_t n, ptrdiff_t m>
466 template <
typename Dims1,
typename Dims2, ptrdiff_t n>
469 return (array_get<n-1>(dims1) == array_get<n-1>(dims2)) &&
473 template <
typename Dims1,
typename Dims2>
483 template <
typename Dims1,
typename Dims2>
490 #endif // EIGEN_CXX11_TENSOR_TENSOR_DIMENSIONS_H
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, const Dimensions &dimensions)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t operator[](const std::ptrdiff_t index) const
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &, const Dimensions &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t rank() const
constexpr EIGEN_DEVICE_FUNCdecltype(reduce< product_op, Ts... >::run((*((Ts *) 0))...)) EIGEN_STRONG_INLIN arg_prod)(Ts... ts)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &dims1, Dims2 &dims2)
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
const std::vector< size_t > dimensions
std::ostream & operator<<(std::ostream &os, const DSizes< IndexType, NumDims > &dims)
EIGEN_DEVICE_FUNC DSizes(const Sizes< Indices... > &a)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, std::vector< DenseIndex > const &dimensions)
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2)
EIGEN_DEVICE_FUNC DSizes(const DimensionList< DenseIndex, NumDims > &a)
EIGEN_DEVICE_FUNC DSizes(const array< DenseIndex, NumDims > &a)
static const ptrdiff_t count
static const std::ptrdiff_t total_size
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, array< Index, NumIndices > const &)
ofstream os("timeSchurFactors.csv")
EIGEN_DEVICE_FUNC DSizes(const array< OtherIndex, NumDims > &other, typename internal::enable_if< internal::is_same< DenseIndex, typename internal::promote_index_type< DenseIndex, OtherIndex >::type >::value, void * >::type=0)
const Index array_get(DimensionList< Index, Rank > &)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool dimensions_match(Dims1 dims1, Dims2 dims2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfRowMajor(const array< DenseIndex, NumDims > &indices) const
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &, Dims2 &)
internal::numeric_list< std::ptrdiff_t, Indices... > Base
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t TotalSize()
array< DenseIndex, NumDims > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
EIGEN_DEVICE_FUNC Sizes(const array< DenseIndex, Base::count > &)
#define EIGEN_STRONG_INLINE
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, std::vector< DenseIndex > const &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex TotalSize() const
static const std::ptrdiff_t value
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DSizes()
#define EIGEN_ALWAYS_INLINE
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3, const DenseIndex i4)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, array< Index, NumIndices > const &dimensions)
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0)
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3)
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &, Dims2 &)
EIGEN_DEVICE_FUNC DSizes & operator=(const array< DenseIndex, NumDims > &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfColMajor(const array< DenseIndex, NumDims > &indices) const
EIGEN_DEVICE_FUNC Sizes()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t IndexOfColMajor(const array< DenseIndex, Base::count > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t IndexOfRowMajor(const array< DenseIndex, Base::count > &indices) const
Sizes & operator=(const T &)
constexpr static std::size_t count
std::vector< size_t > Indices
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:37:33