DUNE-ACFEM (unstable)
A class applying a transposition to the given tensor's indices. More...
#include <dune/acfem/tensors/operations/transpose.hh>
Public Member Functions | |
template<class Arg , std::enable_if_t< std::is_constructible< ArgType, Arg >::value, int > = 0> | |
Transposition (Arg &&host) | |
Constructor from a given host-tensor. | |
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< ArgType >::value), int > = 0> | |
Transposition (Dummy &&...) | |
Allow default construction if contained types fulfill IsTypedValue. | |
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0> | |
decltype(auto) | operator() (Dims... indices) |
Insert the current view-indices at their proper positions and foward to the underlying "host" tensor. | |
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0> | |
decltype(auto) | operator() (Dims... indices) const |
Insert the current view-indices at their proper positions and foward to the underlying "host" tensor. | |
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0> | |
OperandType< I > && | operand (IndexConstant< I >=IndexConstant< I >{}) && |
Return one of the stored operands in an rvalue context. More... | |
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0> | |
decltype(auto) | operand (IndexConstant< I >=IndexConstant< I >{}) & |
Return one of the stored operands in a mutable reference context. More... | |
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0> | |
decltype(auto) | operand (IndexConstant< I >=IndexConstant< I >{}) const & |
Return one of the stored operands in a const reference context. More... | |
Static Public Attributes | |
template<std::size_t I> | |
static constexpr bool | emitByValue_ = EmitByValueV<OperandType<I> > |
Force some things to always be emitted as non-references. | |
Detailed Description
template<class Tensor, std::size_t... Perm>
class Dune::ACFem::Tensor::Transposition< Tensor, Seq< Perm... > >
A class applying a transposition to the given tensor's indices.
A "transposition" here refers to a permutation of the positions of the indices of the tensors, as generalization of a matrix-transposition which exchanges the position of the first and the second index.
- Parameters
-
Tensor The tensor the transposition is applied to. Perm The permutation. The number of permutation indices must equal the rank of the tensor. The permutation (Pk,...) is applied as follows to a tensor A:
\[ tr<P_0,\dots,P_k>(A)_{i_0,\dots,i_k} = A_{i_{P_0},\dots,i_{P_k}} \]
The Transposition class just permutes the indices and forwards everything to the underlying tensor.
Member Function Documentation
◆ operand() [1/3]
|
inlineinherited |
Return one of the stored operands in a mutable reference context.
In this case we assume that it is safe to return a reference as the storage container should be alive in a real object.
As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.
◆ operand() [2/3]
|
inlineinherited |
Return one of the stored operands in an rvalue context.
In this case exactly the contained type is returned, i.e. a copy for objects or a reference for references.
As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.
◆ operand() [3/3]
|
inlineinherited |
Return one of the stored operands in a const reference context.
In this case we assume that it is safe to return a reference as the storage container should be alive in a real object.
As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.
The documentation for this class was generated from the following file:
- dune/acfem/tensors/operations/transpose.hh