Eigen::StaticSGroup< Gen > Class Template Reference

Static symmetry group. More...

Public Member Functions

template<typename Tensor_ >
internal::tensor_symmetry_value_setter< Tensor_, StaticSGroup< Gen... > > operator() (Tensor_ &tensor, std::array< typename Tensor_::Index, Tensor_::NumIndices > const &indices) const
 
template<typename Tensor_ , typename... IndexTypes>
internal::tensor_symmetry_value_setter< Tensor_, StaticSGroup< Gen... > > operator() (Tensor_ &tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const
 
constexpr StaticSGroup ()
 
constexpr StaticSGroup (const StaticSGroup< Gen... > &)
 
constexpr StaticSGroup (StaticSGroup< Gen... > &&)
 

Static Public Member Functions

template<typename Op , typename RV , typename Index , std::size_t N, typename... Args>
static RV apply (const std::array< Index, N > &idx, RV initial, Args &&... args)
 
template<typename Op , typename RV , typename Index , typename... Args>
static RV apply (const std::vector< Index > &idx, RV initial, Args &&... args)
 
constexpr static int globalFlags ()
 
constexpr static std::size_t size ()
 

Static Public Attributes

constexpr static std::size_t static_size
 

Private Types

typedef group_elements::type ge
 
typedef internal::group_theory::enumerate_group_elements< internal::tensor_static_symgroup_multiply, internal::tensor_static_symgroup_equality, typename internal::tensor_static_symgroup_identity_ctor< NumIndices >::type, internal::type_list< typename internal::tensor_static_symgroup_element_ctor< Gen, NumIndices >::type... > > group_elements
 

Static Private Attributes

constexpr static std::size_t NumIndices
 

Detailed Description

template<typename... Gen>
class Eigen::StaticSGroup< Gen >

Static symmetry group.

This class represents a symmetry group that is known and resolved completely at compile time. Ideally, no run-time penalty is incurred compared to the manual unrolling of the symmetry.

CAUTION:

Do not use this class directly for large symmetry groups. The compiler may run into a limit, or segfault or in the very least will take a very, very, very long time to compile the code. Use the SGroup class instead if you want a static group. That class contains logic that will automatically select the DynamicSGroup class instead if the symmetry group becomes too large. (In that case, unrolling may not even be beneficial.)

Definition at line 183 of file StaticSymmetry.h.

Member Typedef Documentation

◆ ge

template<typename... Gen>
typedef group_elements::type Eigen::StaticSGroup< Gen >::ge
private

Definition at line 192 of file StaticSymmetry.h.

◆ group_elements

template<typename... Gen>
typedef internal::group_theory::enumerate_group_elements< internal::tensor_static_symgroup_multiply, internal::tensor_static_symgroup_equality, typename internal::tensor_static_symgroup_identity_ctor<NumIndices>::type, internal::type_list<typename internal::tensor_static_symgroup_element_ctor<Gen, NumIndices>::type...> > Eigen::StaticSGroup< Gen >::group_elements
private

Definition at line 191 of file StaticSymmetry.h.

Constructor & Destructor Documentation

◆ StaticSGroup() [1/3]

template<typename... Gen>
constexpr Eigen::StaticSGroup< Gen >::StaticSGroup ( )
inlineconstexpr

Definition at line 194 of file StaticSymmetry.h.

194 {}

◆ StaticSGroup() [2/3]

template<typename... Gen>
constexpr Eigen::StaticSGroup< Gen >::StaticSGroup ( const StaticSGroup< Gen... > &  )
inlineconstexpr

Definition at line 195 of file StaticSymmetry.h.

195 {}

◆ StaticSGroup() [3/3]

template<typename... Gen>
constexpr Eigen::StaticSGroup< Gen >::StaticSGroup ( StaticSGroup< Gen... > &&  )
inlineconstexpr

Definition at line 196 of file StaticSymmetry.h.

196 {}

Member Function Documentation

◆ apply() [1/2]

template<typename... Gen>
template<typename Op , typename RV , typename Index , std::size_t N, typename... Args>
static RV Eigen::StaticSGroup< Gen >::apply ( const std::array< Index, N > &  idx,
RV  initial,
Args &&...  args 
)
inlinestatic

Definition at line 199 of file StaticSymmetry.h.

200  {
201  return internal::tensor_static_symgroup_do_apply<ge>::template run<Op, RV, NumIndices>(idx, initial, args...);
202  }

◆ apply() [2/2]

template<typename... Gen>
template<typename Op , typename RV , typename Index , typename... Args>
static RV Eigen::StaticSGroup< Gen >::apply ( const std::vector< Index > &  idx,
RV  initial,
Args &&...  args 
)
inlinestatic

Definition at line 205 of file StaticSymmetry.h.

206  {
207  eigen_assert(idx.size() == NumIndices);
208  return internal::tensor_static_symgroup_do_apply<ge>::template run<Op, RV, NumIndices>(idx, initial, args...);
209  }
#define eigen_assert(x)
constexpr static std::size_t NumIndices

◆ globalFlags()

template<typename... Gen>
constexpr static int Eigen::StaticSGroup< Gen >::globalFlags ( )
inlinestaticconstexpr

Definition at line 216 of file StaticSymmetry.h.

216 { return group_elements::global_flags; }

◆ operator()() [1/2]

template<typename... Gen>
template<typename Tensor_ >
internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...> > Eigen::StaticSGroup< Gen >::operator() ( Tensor_ &  tensor,
std::array< typename Tensor_::Index, Tensor_::NumIndices > const &  indices 
) const
inline

Definition at line 226 of file StaticSymmetry.h.

227  {
228  return internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...>>(tensor, *this, indices);
229  }
constexpr StaticSGroup()

◆ operator()() [2/2]

template<typename... Gen>
template<typename Tensor_ , typename... IndexTypes>
internal::tensor_symmetry_value_setter<Tensor_, StaticSGroup<Gen...> > Eigen::StaticSGroup< Gen >::operator() ( Tensor_ &  tensor,
typename Tensor_::Index  firstIndex,
IndexTypes...  otherIndices 
) const
inline

Definition at line 219 of file StaticSymmetry.h.

220  {
221  static_assert(sizeof...(otherIndices) + 1 == Tensor_::NumIndices, "Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.");
222  return operator()(tensor, std::array<typename Tensor_::Index, Tensor_::NumIndices>{{firstIndex, otherIndices...}});
223  }
internal::tensor_symmetry_value_setter< Tensor_, StaticSGroup< Gen... > > operator()(Tensor_ &tensor, typename Tensor_::Index firstIndex, IndexTypes... otherIndices) const

◆ size()

template<typename... Gen>
constexpr static std::size_t Eigen::StaticSGroup< Gen >::size ( )
inlinestaticconstexpr

Definition at line 213 of file StaticSymmetry.h.

213  {
214  return ge::count;
215  }

Member Data Documentation

◆ NumIndices

template<typename... Gen>
constexpr static std::size_t Eigen::StaticSGroup< Gen >::NumIndices
staticconstexprprivate

Definition at line 185 of file StaticSymmetry.h.

◆ static_size

template<typename... Gen>
constexpr static std::size_t Eigen::StaticSGroup< Gen >::static_size
staticconstexpr

Definition at line 211 of file StaticSymmetry.h.


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