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

Scoped read-only CUDA pointer access after a host-side synchronization. More...

#include <buffer.hpp>

Public Types

using element_type = T
 

Public Member Functions

 BlockingReadAccess (BlockingReadAccess &&other) noexcept
 
 BlockingReadAccess (BlockingReadAccess const &)=delete
 
T const * data () const noexcept
 Return the typed device pointer for a blocking runtime operation.
 
BlockingReadAccess & operator= (BlockingReadAccess &&other) noexcept
 
BlockingReadAccess & operator= (BlockingReadAccess const &)=delete
 
void release () noexcept
 End the scoped host-synchronized read access.
 
std::size_t size () const noexcept
 Return the number of typed elements in the allocation.
 
CudaBuffer< T > const & storage () const
 Return the CUDA buffer retained by this access object.
 
 ~BlockingReadAccess ()
 

Friends

class CudaBuffer< T >
 

Detailed Description

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

Scoped read-only CUDA pointer access after a host-side synchronization.

Construction waits for the buffer's prior writer completion. No CUDA completion is published on release because the caller must finish every operation using the pointer before releasing it.

Member Typedef Documentation

◆ element_type

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

Constructor & Destructor Documentation

◆ BlockingReadAccess() [1/2]

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

◆ BlockingReadAccess() [2/2]

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

◆ ~BlockingReadAccess()

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

Member Function Documentation

◆ data()

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

Return the typed device pointer for a blocking runtime operation.

◆ operator=() [1/2]

template<typename T >
BlockingReadAccess & uni20::cuda::BlockingReadAccess< T >::operator= ( BlockingReadAccess< T > &&  other)
inlinenoexcept

◆ operator=() [2/2]

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

◆ release()

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

End the scoped host-synchronized read access.

◆ size()

template<typename T >
std::size_t uni20::cuda::BlockingReadAccess< T >::size ( ) const
inlinenoexcept

Return the number of typed elements in the allocation.

◆ storage()

template<typename T >
CudaBuffer< T > const & uni20::cuda::BlockingReadAccess< T >::storage ( ) const
inline

Return the CUDA buffer retained by this access object.

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: