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>
97 static const ptrdiff_t count = Base::count;
108 template <
typename DenseIndex>
112 #if EIGEN_HAS_VARIADIC_TEMPLATES 119 template <
typename T>
Sizes& operator = (
const T& ) {
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 {
158 static const std::ptrdiff_t count = Base::count;
170 template <
typename DenseIndex>
174 template <
typename T>
Sizes& operator = (
const T& ) {
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>
265 static const int count = 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) {
316 for (
int i = 0;
i < dimensions.count; ++
i) {
317 (*this)[
i] = dimensions[
i];
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)
373 *
static_cast<Base*
>(
this) = other;
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> > {
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
#define EIGEN_ALWAYS_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfColMajor(const array< DenseIndex, NumDims > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t rank() const
internal::numeric_list< std::ptrdiff_t, Indices... > Base
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &dims1, Dims2 &dims2)
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2)
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 array< DenseIndex, NumDims > &a)
EIGEN_DEVICE_FUNC DSizes(const DimensionList< DenseIndex, NumDims > &a)
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool dimensions_match(Dims1 dims1, Dims2 dims2)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &, const Dimensions &)
Namespace containing all symbols from the Eigen library.
array< DenseIndex, NumDims > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfRowMajor(const array< DenseIndex, NumDims > &indices) const
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &, Dims2 &)
EIGEN_DEVICE_FUNC Sizes()
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool run(Dims1 &, Dims2 &)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, std::vector< DenseIndex > const &)
EIGEN_DEVICE_FUNC Sizes(const array< DenseIndex, Base::count > &)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex TotalSize() const
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t IndexOfColMajor(const array< DenseIndex, Base::count > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0, const DenseIndex i1, const DenseIndex i2, const DenseIndex i3)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, array< Index, NumIndices > const &)
#define EIGEN_DEVICE_FUNC
EIGEN_DEFAULT_DENSE_INDEX_TYPE DenseIndex
ofstream os("timeSchurFactors.csv")
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ptrdiff_t IndexOfRowMajor(const array< DenseIndex, Base::count > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DSizes()
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t TotalSize()
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)
EIGEN_DEVICE_FUNC DSizes(const DenseIndex i0)
const Index array_get(DimensionList< Index, Rank > &)
std::vector< size_t > Indices
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, std::vector< DenseIndex > const &dimensions)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index run(array< Index, NumIndices > const &indices, const Dimensions &dimensions)
EIGEN_DEVICE_FUNC DSizes(const Sizes< Indices... > &a)
const std::vector< size_t > dimensions
std::ostream & operator<<(std::ostream &s, const Packet16c &v)
EIGEN_DEVICE_FUNC constexprdecltype(reduce< product_op, Ts... >::run((*((Ts *) 0))...)) EIGEN_STRONG_INLIN arg_prod)(Ts... ts)
static const std::ptrdiff_t value