Tensor View#
-
template<typename T, size_t Rank>
struct TensorView : public virtual einsums::tensor_props::CoreTensorBase, public virtual einsums::tensor_props::TRBasicTensorBase<T, Rank>, public virtual einsums::tensor_props::TRTensorViewBase<T, Rank, Tensor<T, Rank>>, public virtual einsums::tensor_props::LockableTensorBase, public virtual einsums::tensor_props::AlgebraOptimizedTensor# Public Functions
-
TensorView() = delete#
-
TensorView(const TensorView&) = default#
-
~TensorView() = default#
-
template<size_t OtherRank, typename ...Args>
inline explicit TensorView(const Tensor<T, OtherRank> &other, const Dim<Rank> &dim, Args&&... args)#
-
template<size_t OtherRank, typename ...Args>
inline explicit TensorView(Tensor<T, OtherRank> &other, const Dim<Rank> &dim, Args&&... args)#
-
template<size_t OtherRank, typename ...Args>
inline explicit TensorView(TensorView<T, OtherRank> &other, const Dim<Rank> &dim, Args&&... args)#
-
template<size_t OtherRank, typename ...Args>
inline explicit TensorView(const TensorView<T, OtherRank> &other, const Dim<Rank> &dim, Args&&... args)#
-
template<size_t OtherRank, typename ...Args>
inline explicit TensorView(std::string name, Tensor<T, OtherRank> &other, const Dim<Rank> &dim, Args&&... args)#
-
inline explicit TensorView(const T *data, const Dim<Rank> &dims)#
Wrap a const pointer in a tensor view, specifying the dimensions.
- Parameters:
data – The pointer to wrap.
dims – The dimensions of the view.
-
inline explicit TensorView(T *data, const Dim<Rank> &dims)#
Wrap a pointer in a tensor view, specifying the dimensions.
- Parameters:
data – The pointer to wrap.
dims – The dimensions of the view.
-
inline explicit TensorView(const T *data, const Dim<Rank> &dims, const Stride<Rank> &strides)#
Wrap a const pointer in a tensor view, specifying the dimensions and strides.
- Parameters:
data – The pointer to wrap.
dims – The dimensions of the view.
strides – The strides for the view.
-
inline explicit TensorView(T *data, const Dim<Rank> &dims, const Stride<Rank> &strides)#
Wrap a const pointer in a tensor view, specifying the dimensions and strides.
- Parameters:
data – The pointer to wrap.
dims – The dimensions of the view.
strides – The strides for the view.
-
inline TensorView &operator=(const T *other)#
-
inline TensorView &operator=(const TensorView<T, Rank> &other)#
-
template<template<typename, size_t> typename AType>
inline TensorView &operator=(const AType<T, Rank> &other)#
-
inline TensorView &operator=(const T &fill_value)#
-
inline TensorView &operator*=(const T &value)#
-
inline TensorView &operator/=(const T &value)#
-
inline TensorView &operator+=(const T &value)#
-
inline TensorView &operator-=(const T &value)#
-
template<typename ...MultiIndex>
inline T *data(MultiIndex... index) const#
-
template<typename ...MultiIndex>
inline const T &operator()(MultiIndex... index) const#
-
template<typename ...MultiIndex>
inline T &operator()(MultiIndex... index)#
-
inline virtual size_t dim(int d) const override#
-
inline virtual const std::string &name() const override#
-
inline virtual void set_name(const std::string &name) override#
-
inline virtual size_t stride(int d) const noexcept override#
-
inline TensorView<T, 1> to_rank_1_view() const#
-
inline virtual bool full_view_of_underlying() const noexcept override#
-
inline size_t size() const#
-
TensorView() = delete#