10 #ifndef EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H
11 #define EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H
37 template<
int One_,
int Two_>
40 static_assert(One_ != Two_,
"Symmetries must cover distinct indices.");
41 constexpr
static int One = One_;
42 constexpr
static int Two = Two_;
46 template<
int One_,
int Two_>
49 static_assert(One_ != Two_,
"Symmetries must cover distinct indices.");
50 constexpr
static int One = One_;
51 constexpr
static int Two = Two_;
55 template<
int One_,
int Two_>
58 static_assert(One_ != Two_,
"Symmetries must cover distinct indices.");
59 constexpr
static int One = One_;
60 constexpr
static int Two = Two_;
64 template<
int One_,
int Two_>
67 static_assert(One_ != Two_,
"Symmetries must cover distinct indices.");
68 constexpr
static int One = One_;
69 constexpr
static int Two = Two_;
98 template<
typename... Gen>
120 template<
typename... Gen>
135 template<
typename... Gen>
154 template<
typename... Sym>
struct tensor_symmetry_num_indices
167 constexpr
static std::size_t maxOneTwoPlusOne = ((One > Two) ? One : Two) + 1;
169 constexpr
static std::size_t value = (maxOneTwoPlusOne > Three) ? maxOneTwoPlusOne : Three;
226 template<std::
size_t NumIndices>
232 template<
std::size_t NumIndices,
typename Gen_,
typename... Gens_>
241 possible_size == 0 || possible_size >= max_static_elements,
247 template<
bool instantiate,
std::size_t NumIndices,
typename... Gens>
257 template<
typename Tensor_>
264 static inline int run(
const std::array<Index, NumIndices>& transformed_indices,
int transformation_flags,
int dummy, Tensor_& tensor,
const Scalar& value_)
271 tensor.coeffRef(transformed_indices) =
value;
276 template<
typename Tensor_>
277 struct tensor_symmetry_calculate_flags
282 static inline int run(
const std::array<Index, NumIndices>& transformed_indices,
int transform_flags,
int current_flags,
const std::array<Index, NumIndices>& orig_indices)
284 if (transformed_indices == orig_indices) {
292 return current_flags;
296 template<
typename Tensor_,
typename Symmetry_,
int Flags = 0>
319 #ifdef EIGEN_TENSOR_SYMMETRY_CHECK_VALUES
334 #endif // EIGEN_CXX11_TENSORSYMMETRY_SYMMETRY_H