Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
uni20::ConstTensorView< Tensor > Class Template Reference

Non-owning read-only view of a tensor-level object. More...

#include <conjugate.hpp>

Public Types

using async_alias_tag = void
 Marks this descriptor as a structurally copied async alias.
 
using storage_policy = tensor_storage_policy_t< tensor_type >
 
using tensor_type = std::remove_cvref_t< Tensor >
 

Public Member Functions

constexpr decltype(auto) backend_selector () const noexcept(noexcept(std::declval< tensor_type const & >().backend_selector()))
 Return the underlying tensor's backend selector.
 
constexpr tensor_type const & base () const noexcept
 Return the tensor referenced by this view.
 
constexpr ConstTensorView (tensor_type const &tensor) noexcept
 Bind a read-only view to an existing tensor.
 
constexpr ConstTensorView (tensor_type const *tensor) noexcept
 Bind a read-only view to externally retained tensor storage.
 
constexpr decltype(auto) extent (std::size_t axis) const noexcept(noexcept(std::declval< tensor_type const & >().extent(axis)))
 Return one underlying tensor extent.
 
constexpr decltype(auto) extents () const noexcept(noexcept(std::declval< tensor_type const & >().extents()))
 Return the underlying tensor extents.
 
constexpr decltype(auto) mdspan () const noexcept(noexcept(std::declval< tensor_type const & >().mdspan()))
 Resolve the underlying tensor's read-only mdspan.
 
constexpr decltype(auto) mdspec () const noexcept(noexcept(mdspec_of(std::declval< tensor_type const & >())))
 Return the underlying tensor's read-only immediate or deferred metadata.
 

Detailed Description

template<TensorView Tensor>
class uni20::ConstTensorView< Tensor >

Non-owning read-only view of a tensor-level object.

Member Typedef Documentation

◆ async_alias_tag

template<TensorView Tensor>
using uni20::ConstTensorView< Tensor >::async_alias_tag = void

Marks this descriptor as a structurally copied async alias.

◆ storage_policy

template<TensorView Tensor>
using uni20::ConstTensorView< Tensor >::storage_policy = tensor_storage_policy_t<tensor_type>

◆ tensor_type

template<TensorView Tensor>
using uni20::ConstTensorView< Tensor >::tensor_type = std::remove_cvref_t<Tensor>

Constructor & Destructor Documentation

◆ ConstTensorView() [1/2]

template<TensorView Tensor>
constexpr uni20::ConstTensorView< Tensor >::ConstTensorView ( tensor_type const &  tensor)
inlineexplicitconstexprnoexcept

Bind a read-only view to an existing tensor.

◆ ConstTensorView() [2/2]

template<TensorView Tensor>
constexpr uni20::ConstTensorView< Tensor >::ConstTensorView ( tensor_type const *  tensor)
inlineexplicitconstexprnoexcept

Bind a read-only view to externally retained tensor storage.

Warning
The pointer may identify reserved but unconstructed storage; callers must not resolve the view until the tensor is constructed.

Member Function Documentation

◆ backend_selector()

template<TensorView Tensor>
constexpr decltype(auto) uni20::ConstTensorView< Tensor >::backend_selector ( ) const
inlineconstexprnoexcept

Return the underlying tensor's backend selector.

◆ base()

template<TensorView Tensor>
constexpr tensor_type const & uni20::ConstTensorView< Tensor >::base ( ) const
inlineconstexprnoexcept

Return the tensor referenced by this view.

◆ extent()

template<TensorView Tensor>
constexpr decltype(auto) uni20::ConstTensorView< Tensor >::extent ( std::size_t  axis) const
inlineconstexprnoexcept

Return one underlying tensor extent.

◆ extents()

template<TensorView Tensor>
constexpr decltype(auto) uni20::ConstTensorView< Tensor >::extents ( ) const
inlineconstexprnoexcept

Return the underlying tensor extents.

◆ mdspan()

template<TensorView Tensor>
constexpr decltype(auto) uni20::ConstTensorView< Tensor >::mdspan ( ) const
inlineconstexprnoexcept

Resolve the underlying tensor's read-only mdspan.

◆ mdspec()

template<TensorView Tensor>
constexpr decltype(auto) uni20::ConstTensorView< Tensor >::mdspec ( ) const
inlineconstexprnoexcept

Return the underlying tensor's read-only immediate or deferred metadata.


The documentation for this class was generated from the following file: