Runtime Tensor Views#
-
template<typename T>
class RuntimeTensorView : public virtual einsums::tensor_props::TensorViewBase<RuntimeTensor<T>>, public virtual einsums::tensor_props::TypedTensorBase<T>, public virtual einsums::tensor_props::BasicTensorBase, public virtual einsums::detail::RuntimeTensorViewNoType, public virtual einsums::tensor_props::CoreTensorBase# Represents a view of a tensor whose properties can be determined at runtime but not compile time.
Subclassed by einsums::python::PyTensorView< T >
Public Functions
-
RuntimeTensorView() = default#
-
RuntimeTensorView(const RuntimeTensorView<T> ©) = default#
-
inline RuntimeTensorView(RuntimeTensor<T> &view)#
-
inline RuntimeTensorView(const RuntimeTensor<T> &view)#
-
inline RuntimeTensorView(const RuntimeTensor<T> &other, const std::vector<size_t> &dims)#
-
inline RuntimeTensorView(RuntimeTensor<T> &other, const std::vector<size_t> &dims)#
-
inline RuntimeTensorView(RuntimeTensorView<T> &other, const std::vector<size_t> &dims)#
-
inline RuntimeTensorView(const RuntimeTensorView<T> &other, const std::vector<size_t> &dims)#
-
inline RuntimeTensorView(RuntimeTensor<T> &other, const std::vector<size_t> &dims, const std::vector<size_t> &strides, const std::vector<size_t> &offsets)#
-
inline RuntimeTensorView(const RuntimeTensor<T> &other, const std::vector<size_t> &dims, const std::vector<size_t> &strides, const std::vector<size_t> &offsets)#
-
inline RuntimeTensorView(RuntimeTensorView<T> &other, const std::vector<size_t> &dims, const std::vector<size_t> &strides, const std::vector<size_t> &offsets)#
-
inline RuntimeTensorView(const RuntimeTensorView<T> &other, const std::vector<size_t> &dims, const std::vector<size_t> &strides, const std::vector<size_t> &offsets)#
-
template<size_t Rank>
inline RuntimeTensorView(TensorView<T, Rank> ©)#
-
template<size_t Rank>
inline RuntimeTensorView(const TensorView<T, Rank> ©)#
-
virtual ~RuntimeTensorView() = default#
-
inline virtual void zero()#
-
template<typename ...Args>
inline T &operator()(Args... args)# TODO: std::variant can’t handle references.
We might be able to make our own variant that can. This new variant may also be able to replace HostDevReference.
-
template<typename ...Args>
inline std::variant<T, RuntimeTensorView<T>> operator()(Args... args) const#
-
template<typename ...Args>
inline const RuntimeTensorView<T> operator()(Args... args) const#
-
template<typename ...Args>
inline RuntimeTensorView<T> operator()(Args... args)#
-
inline RuntimeTensorView<T> operator()(const std::vector<Range> &slices)#
-
inline RuntimeTensorView<T> operator()(const std::vector<Range> &slices) const#
-
template<typename TOther, size_t Rank>
inline RuntimeTensorView<T> &operator=(const Tensor<TOther, Rank> &other)#
-
template<typename TOther, size_t Rank>
inline RuntimeTensorView<T> &operator=(const TensorView<TOther, Rank> &other)#
-
inline virtual RuntimeTensorView<T> &operator=(const RuntimeTensor<T> &other)#
-
inline virtual RuntimeTensorView<T> &operator=(const RuntimeTensorView<T> &other)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator=(const RuntimeTensor<TOther> &other)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator=(const RuntimeTensorView<TOther> &other)#
-
inline virtual RuntimeTensorView<T> &operator=(T value)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator*=(const TOther &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator*=(const RuntimeTensor<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator*=(const RuntimeTensorView<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator/=(const TOther &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator/=(const RuntimeTensor<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator/=(const RuntimeTensorView<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator+=(const TOther &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator+=(const RuntimeTensor<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator+=(const RuntimeTensorView<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator-=(const TOther &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator-=(const RuntimeTensor<TOther> &b)#
-
template<typename TOther>
inline RuntimeTensorView<T> &operator-=(const RuntimeTensorView<TOther> &b)#
-
inline virtual size_t dim(int d) const#
-
inline virtual std::vector<size_t> dims() const noexcept#
-
inline virtual size_t stride(int d) const#
-
inline virtual std::vector<size_t> strides() const noexcept#
-
inline virtual RuntimeTensorView<T> to_rank_1_view() const#
-
inline virtual size_t size() const noexcept#
-
inline virtual bool full_view_of_underlying() const noexcept override#
-
inline virtual const std::string &name() const override#
-
inline virtual void set_name(const std::string &new_name) override#
-
inline virtual size_t rank() const noexcept override#
-
RuntimeTensorView() = default#