|
Uni20
Asynchronous tensor and runtime library.
|
Tensor-level descriptor owning a reshaped mdspan and backend selector. More...
#include <reshape.hpp>
Public Types | |
| using | async_alias_tag = void |
| using | backend_selector_type = BackendSelector |
| using | const_accessor_type = const_accessor_t< typename mdspan_type::accessor_type > |
| using | const_element_type = std::add_const_t< std::remove_const_t< element_type > > |
| using | const_mdspan_type = stdex::mdspan< const_element_type, extents_type, layout_type, const_accessor_type > |
| using | element_type = typename mdspan_type::element_type |
| using | extents_type = typename mdspan_type::extents_type |
| using | index_type = typename mdspan_type::index_type |
| using | layout_type = typename mdspan_type::layout_type |
| using | mapping_type = typename mdspan_type::mapping_type |
| using | mdspan_type = Mdspan |
| using | storage_policy = StoragePolicy |
| using | value_type = typename mdspan_type::value_type |
Public Member Functions | |
| constexpr auto | backend_selector () const -> backend_selector_type |
| Return the source storage's backend selector. | |
| constexpr auto | extent (std::size_t axis) const noexcept -> index_type |
| Return one reshaped extent. | |
| constexpr auto | extents () const noexcept -> extents_type const & |
| Return the reshaped extents. | |
| constexpr auto | mdspan () &-> mdspan_type |
| Resolve the stored reshaped mdspan descriptor for mutable access. | |
| constexpr auto | mdspan () const &-> const_mdspan_type |
| Resolve the stored reshaped mdspan descriptor for read-only access. | |
| template<class... Index> requires (sizeof...(Index) == extents_type::rank()) | |
| constexpr decltype(auto) | operator[] (Index... indices) |
| Evaluate or assign one reshaped element according to accessor mutability. | |
| template<class... Index> requires detail::MdspanIndexPack<mdspan_type, Index...> | |
| constexpr decltype(auto) | operator[] (Index... indices) const |
| Evaluate one reshaped element through the read-only accessor. | |
| constexpr | ReshapedTensor (mdspan_type span, backend_selector_type selector) |
| Construct from a reshaped mdspan and source backend selector. | |
Tensor-level descriptor owning a reshaped mdspan and backend selector.
The descriptor aliases the same element storage as its source. Mutability follows the preserved source accessor.
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::async_alias_tag = void |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::backend_selector_type = BackendSelector |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::const_accessor_type = const_accessor_t<typename mdspan_type::accessor_type> |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::const_element_type = std::add_const_t<std::remove_const_t<element_type> > |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::const_mdspan_type = stdex::mdspan<const_element_type, extents_type, layout_type, const_accessor_type> |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::element_type = typename mdspan_type::element_type |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::extents_type = typename mdspan_type::extents_type |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::index_type = typename mdspan_type::index_type |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::layout_type = typename mdspan_type::layout_type |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::mapping_type = typename mdspan_type::mapping_type |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::mdspan_type = Mdspan |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::storage_policy = StoragePolicy |
| using uni20::ReshapedTensor< Mdspan, StoragePolicy, BackendSelector >::value_type = typename mdspan_type::value_type |
|
inlineconstexpr |
Construct from a reshaped mdspan and source backend selector.
|
inlineconstexpr |
Return the source storage's backend selector.
|
inlineconstexprnoexcept |
Return one reshaped extent.
|
inlineconstexprnoexcept |
Return the reshaped extents.
|
inlineconstexpr |
Resolve the stored reshaped mdspan descriptor for mutable access.
|
inlineconstexpr |
Resolve the stored reshaped mdspan descriptor for read-only access.
|
inlineconstexpr |
Evaluate or assign one reshaped element according to accessor mutability.
|
inlineconstexpr |
Evaluate one reshaped element through the read-only accessor.