Template Class Transpose#
Defined in File transpose.hpp
Class Documentation#
-
template<typename TransposeType>
class Transpose# Public Types
-
using ArrayType = TransposeType#
-
using BaseType = typename std::decay_t<TransposeType>#
-
using Scalar = typename typetraits::TypeInfo<BaseType>::Scalar#
-
using Backend = typename typetraits::TypeInfo<BaseType>::Backend#
Public Functions
-
Transpose() = delete#
Default constructor should never be used.
-
Transpose(TransposeType &&array, const ShapeType &axes, Scalar alpha = Scalar(1.0))#
Create a Transpose object from an array/operation
- Parameters
array – The array to copy
axes – The transposition axes
-
auto operator=(const Transpose &other) -> Transpose& = default#
Assign another Transpose object to this one
- Parameters
other – The Transpose to assign
- Returns
*this;
-
GeneralArrayView<ArrayType> operator[](int64_t index) const#
Access sub-array of this Transpose object
- Parameters
index – Array index
- Returns
GeneralArrayView<T>
-
auto size() const -> size_t#
-
int64_t ndim() const#
Return the number of dimensions of the Transpose object
- Returns
Number of dimensions
-
auto scalar(int64_t index) const#
Access a scalar at a given index in the object. The index will be converted into a multi-dimensional index using the shape of the object, and counts in row-major order
- Parameters
index – Index of the scalar
- Returns
Scalar type at the given index
-
const ShapeType &axes() const#
Return the axes of the Transpose object.
- Returns
ShapeType
containing the axes
-
const Scalar &alpha() const#
Return the alpha value of the Transpose object.
- Returns
Alpha scaling factor
-
template<typename ShapeType_, typename StorageType_>
void applyTo(ArrayContainer<ShapeType_, StorageType_> &out) const#
Public Static Attributes
-
static constexpr bool allowVectorisation = typetraits::TypeInfo<Scalar>::allowVectorisation#
-
static constexpr bool isArray = typetraits::IsArrayContainer<BaseType>::value#
-
using ArrayType = TransposeType#