|
Uni20
Asynchronous tensor and runtime library.
|
Tensor-level descriptor that resolves a reshape through its parent tensor. More...
#include <reshape.hpp>
Public Types | |
| using | async_alias_tag = void |
| using | backend_selector_type = std::remove_cvref_t< decltype(std::declval< tensor_type const & >().backend_selector())> |
| using | const_mdspec_type = decltype(detail::make_reshape_view< LayoutPolicy >(mdspec_of(std::declval< tensor_type const & >()), std::declval< RequestedExtents >()...)) |
| using | element_type = typename mdspec_type::element_type |
| using | extents_type = typename mdspec_type::extents_type |
| using | index_type = typename mdspec_type::index_type |
| using | layout_type = typename mdspec_type::layout_type |
| using | mapping_type = typename mdspec_type::mapping_type |
| using | mdspec_type = decltype(detail::make_reshape_view< LayoutPolicy >(mdspec_of(std::declval< tensor_type & >()), std::declval< RequestedExtents >()...)) |
| using | requested_extents_type = std::tuple< RequestedExtents... > |
| using | storage_policy = tensor_storage_policy_t< std::remove_cv_t< tensor_type > > |
| using | tensor_type = std::remove_reference_t< Tensor > |
| using | value_type = typename mdspec_type::value_type |
Public Member Functions | |
| constexpr decltype(auto) | backend_selector () const |
| Return the source storage's backend selector. | |
| tensor_type const & | base () const noexcept |
| Return the tensor referenced by this descriptor. | |
| tensor_type & | base () noexcept |
| Return the tensor referenced by this descriptor. | |
| auto | extent (std::size_t axis) const -> index_type |
| Return one reshaped extent. | |
| auto | extents () const -> extents_type |
| Return the reshaped extents. | |
| IndirectReshapedTensorView (tensor_type &tensor, RequestedExtents... requested_extents) | |
| Bind and immediately validate a reshape of an existing tensor. | |
| IndirectReshapedTensorView (tensor_type *tensor, RequestedExtents... requested_extents) | |
| Bind a reshape to externally retained tensor storage. | |
| auto | mdspan () &-> mdspec_type |
| Resolve the reshaped mdspan when the parent is immediately accessible. | |
| auto | mdspan () const &-> const_mdspec_type |
| Resolve the read-only reshaped mdspan when the parent is immediately accessible. | |
| auto | mdspec () &-> mdspec_type |
| Return the reshaped immediate or deferred metadata with source mutability. | |
| auto | mdspec () const &-> const_mdspec_type |
| Return the reshaped immediate or deferred metadata for read-only access. | |
| template<class... Index> requires MdspanLike<mdspec_type> && (sizeof...(Index) == extents_type::rank()) | |
| decltype(auto) | operator[] (Index... indices) |
| Evaluate or assign one reshaped element according to source mutability. | |
| template<class... Index> requires MdspanLike<const_mdspec_type> && (sizeof...(Index) == extents_type::rank()) | |
| decltype(auto) | operator[] (Index... indices) const |
| Evaluate one reshaped element through the read-only accessor. | |
Tensor-level descriptor that resolves a reshape through its parent tensor.
The descriptor aliases the same element storage as its source and preserves source mutability. Parent indirection allows an async alias to bind reserved storage before the parent value is constructed.
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::async_alias_tag = void |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::backend_selector_type = std::remove_cvref_t<decltype(std::declval<tensor_type const&>().backend_selector())> |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::const_mdspec_type = decltype(detail::make_reshape_view<LayoutPolicy>( mdspec_of(std::declval<tensor_type const&>()), std::declval<RequestedExtents>()...)) |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::element_type = typename mdspec_type::element_type |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::extents_type = typename mdspec_type::extents_type |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::index_type = typename mdspec_type::index_type |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::layout_type = typename mdspec_type::layout_type |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::mapping_type = typename mdspec_type::mapping_type |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::mdspec_type = decltype(detail::make_reshape_view<LayoutPolicy>(mdspec_of(std::declval<tensor_type&>()), std::declval<RequestedExtents>()...)) |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::requested_extents_type = std::tuple<RequestedExtents...> |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::storage_policy = tensor_storage_policy_t<std::remove_cv_t<tensor_type> > |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::tensor_type = std::remove_reference_t<Tensor> |
| using uni20::IndirectReshapedTensorView< Tensor, LayoutPolicy, RequestedExtents >::value_type = typename mdspec_type::value_type |
|
inline |
Bind and immediately validate a reshape of an existing tensor.
|
inlineexplicit |
Bind a reshape to externally retained tensor storage.
|
inlineconstexpr |
Return the source storage's backend selector.
|
inlinenoexcept |
Return the tensor referenced by this descriptor.
|
inlinenoexcept |
Return the tensor referenced by this descriptor.
|
inline |
Return one reshaped extent.
|
inline |
Return the reshaped extents.
|
inline |
Resolve the reshaped mdspan when the parent is immediately accessible.
|
inline |
Resolve the read-only reshaped mdspan when the parent is immediately accessible.
|
inline |
Return the reshaped immediate or deferred metadata with source mutability.
|
inline |
Return the reshaped immediate or deferred metadata for read-only access.
|
inline |
Evaluate or assign one reshaped element according to source mutability.
|
inline |
Evaluate one reshaped element through the read-only accessor.