Template Class Transpose#
Defined in File transpose.hpp
Class Documentation#
-
template<typename T>
class Transpose# Public Types
-
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(T &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
-
Transpose &operator=(const Transpose &other) = default#
Assign another Transpose object to this one
- Parameters
other – The Transpose to assign
- Returns
*this;
-
ArrayView<ArrayType> operator[](int64_t index) const#
Access sub-array of this Transpose object
- Parameters
index – Array index
- Returns
ArrayView<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 StorageType>
void applyTo(ArrayRef<StorageType> &out) const#
Public Static Attributes
-
static constexpr bool allowVectorisation = typetraits::TypeInfo<Scalar>::allowVectorisation#
-
static constexpr bool isArray = typetraits::IsArrayContainer<BaseType>::value#
-
using Scalar = typename typetraits::TypeInfo<BaseType>::Scalar#