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

Read-only accessor that returns uni20::conj of the wrapped accessor value. More...

#include <conjugate_accessor.hpp>

Public Types

using data_handle_type = typename Accessor::data_handle_type
 
using element_type = value_type const
 
using offset_policy = conjugated_accessor
 
using offset_type = span_offset_t< Accessor >
 
using reference = std::invoke_result_t< detail::conjugate_function, typename Accessor::reference >
 
using value_type = std::remove_cv_t< typename Accessor::element_type >
 
using wrapped_accessor_type = Accessor
 

Public Member Functions

UNI20_HOST_DEVICE constexpr reference access (data_handle_type ptr, offset_type offset) const
 Return the conjugated value at a handle-relative offset.
 
UNI20_HOST_DEVICE constexpr conjugated_accessor ()
 
UNI20_HOST_DEVICE constexpr conjugated_accessor (Accessor accessor)
 Construct from the accessor whose values should be conjugated on read.
 
UNI20_HOST_DEVICE constexpr data_handle_type offset (data_handle_type ptr, offset_type offset) const
 Delegate handle offsetting to the wrapped accessor.
 
UNI20_HOST_DEVICE constexpr auto wrapped_accessor () &&-> Accessor
 Move out the wrapped accessor.
 
UNI20_HOST_DEVICE constexpr auto wrapped_accessor () const &-> Accessor const &
 Return the wrapped accessor.
 

Detailed Description

template<AccessorPolicy Accessor>
requires uni20::Complex<std::remove_cv_t<typename Accessor::element_type>>
class uni20::conjugated_accessor< Accessor >

Read-only accessor that returns uni20::conj of the wrapped accessor value.

The adaptor preserves the wrapped accessor's data handle and offset policy, so backend code can still recover the original storage pointer while seeing that the accessor semantically conjugates values. The name follows the C++26 std::linalg::conjugated_accessor terminology.

Member Typedef Documentation

◆ data_handle_type

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::data_handle_type = typename Accessor::data_handle_type

◆ element_type

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::element_type = value_type const

◆ offset_policy

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::offset_policy = conjugated_accessor

◆ offset_type

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::offset_type = span_offset_t<Accessor>

◆ reference

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::reference = std::invoke_result_t<detail::conjugate_function, typename Accessor::reference>

◆ value_type

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::value_type = std::remove_cv_t<typename Accessor::element_type>

◆ wrapped_accessor_type

template<AccessorPolicy Accessor>
using uni20::conjugated_accessor< Accessor >::wrapped_accessor_type = Accessor

Constructor & Destructor Documentation

◆ conjugated_accessor() [1/2]

template<AccessorPolicy Accessor>
UNI20_HOST_DEVICE constexpr uni20::conjugated_accessor< Accessor >::conjugated_accessor ( )
inlineconstexpr

◆ conjugated_accessor() [2/2]

template<AccessorPolicy Accessor>
UNI20_HOST_DEVICE constexpr uni20::conjugated_accessor< Accessor >::conjugated_accessor ( Accessor  accessor)
inlineexplicitconstexpr

Construct from the accessor whose values should be conjugated on read.

Member Function Documentation

◆ access()

template<AccessorPolicy Accessor>
UNI20_HOST_DEVICE constexpr reference uni20::conjugated_accessor< Accessor >::access ( data_handle_type  ptr,
offset_type  offset 
) const
inlineconstexpr

Return the conjugated value at a handle-relative offset.

◆ offset()

template<AccessorPolicy Accessor>
UNI20_HOST_DEVICE constexpr data_handle_type uni20::conjugated_accessor< Accessor >::offset ( data_handle_type  ptr,
offset_type  offset 
) const
inlineconstexpr

Delegate handle offsetting to the wrapped accessor.

◆ wrapped_accessor() [1/2]

template<AccessorPolicy Accessor>
UNI20_HOST_DEVICE constexpr auto uni20::conjugated_accessor< Accessor >::wrapped_accessor ( ) && -> Accessor
inlineconstexpr

Move out the wrapped accessor.

◆ wrapped_accessor() [2/2]

template<AccessorPolicy Accessor>
UNI20_HOST_DEVICE constexpr auto uni20::conjugated_accessor< Accessor >::wrapped_accessor ( ) const & -> Accessor const&
inlineconstexpr

Return the wrapped accessor.


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