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

Read access that owns a moved CUDA buffer. More...

#include <buffer.hpp>

Public Types

using element_type = T
 

Public Member Functions

T const * data () const noexcept
 Return the typed device pointer owned by this access state.
 
OwningReadAccess & operator= (OwningReadAccess &&)=delete
 
OwningReadAccess & operator= (OwningReadAccess const &)=delete
 
 OwningReadAccess (OwningReadAccess &&other) noexcept
 
 OwningReadAccess (OwningReadAccess const &)=delete
 
void release () noexcept
 End access and destroy the owned allocation.
 
 ~OwningReadAccess ()
 

Friends

class CudaBuffer< T >
 

Detailed Description

template<typename T>
class uni20::cuda::OwningReadAccess< T >

Read access that owns a moved CUDA buffer.

The owned buffer is moved before access begins, so the access state needs no back-pointer and remains valid when this object moves. Blocking access waits for the prior writer during construction. Stream-ordered access installs the prior-writer wait and publishes its reader completion on release.

Member Typedef Documentation

◆ element_type

template<typename T >
using uni20::cuda::OwningReadAccess< T >::element_type = T

Constructor & Destructor Documentation

◆ OwningReadAccess() [1/2]

template<typename T >
uni20::cuda::OwningReadAccess< T >::OwningReadAccess ( OwningReadAccess< T > const &  )
delete

◆ OwningReadAccess() [2/2]

template<typename T >
uni20::cuda::OwningReadAccess< T >::OwningReadAccess ( OwningReadAccess< T > &&  other)
inlinenoexcept

◆ ~OwningReadAccess()

template<typename T >
uni20::cuda::OwningReadAccess< T >::~OwningReadAccess ( )
inline

Member Function Documentation

◆ data()

template<typename T >
T const * uni20::cuda::OwningReadAccess< T >::data ( ) const
inlinenoexcept

Return the typed device pointer owned by this access state.

◆ operator=() [1/2]

template<typename T >
OwningReadAccess & uni20::cuda::OwningReadAccess< T >::operator= ( OwningReadAccess< T > &&  )
delete

◆ operator=() [2/2]

template<typename T >
OwningReadAccess & uni20::cuda::OwningReadAccess< T >::operator= ( OwningReadAccess< T > const &  )
delete

◆ release()

template<typename T >
void uni20::cuda::OwningReadAccess< T >::release ( )
inlinenoexcept

End access and destroy the owned allocation.

Friends And Related Symbol Documentation

◆ CudaBuffer< T >

template<typename T >
friend class CudaBuffer< T >
friend

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