vecmem 1.23.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
vecmem::async_size< SIZE_TYPE > Class Template Reference

Return type for asynchronous size retrievals. More...

#include <vecmem/utils/async_size.hpp>

Inheritance diagram for vecmem::async_size< SIZE_TYPE >:
vecmem::abstract_event

Public Types

using size_type = SIZE_TYPE
 Size type used.
 
using storage_type = unique_alloc_ptr< size_type >
 Underlying type that stores the size variable on the heap.
 
using const_reference = std::add_lvalue_reference_t< std::add_const_t< size_type > >
 Constant (lvalue) reference to the stored size.
 
using event_type = std::unique_ptr< abstract_event >
 Type of the held event.
 

Public Member Functions

 async_size (storage_type size, event_type event)
 Constructor taking ownership of a size and event.
 
const_reference get () const
 Access the async/future value.
 
Function(s) implemented from @c vecmem::abstract_event
void wait () override
 Function that would block the current thread until the event is complete.
 
void ignore () override
 Function telling the object not to wait for the underlying event.
 

Detailed Description

template<typename SIZE_TYPE>
class vecmem::async_size< SIZE_TYPE >

Return type for asynchronous size retrievals.

Template Parameters
SIZE_TYPEType of the size being retrieved asynchronously

Constructor & Destructor Documentation

◆ async_size()

template<typename SIZE_TYPE >
vecmem::async_size< SIZE_TYPE >::async_size ( storage_type  size,
event_type  event 
)

Constructor taking ownership of a size and event.

Parameters
sizePointer to the size variable
eventEvent to wait on before accessing the size

Member Function Documentation

◆ get()

template<typename SIZE_TYPE >
auto vecmem::async_size< SIZE_TYPE >::get ( ) const

Access the async/future value.

Returns
Reference to the value

◆ ignore()

template<typename SIZE_TYPE >
void vecmem::async_size< SIZE_TYPE >::ignore ( )
overridevirtual

Function telling the object not to wait for the underlying event.

Implements vecmem::abstract_event.

◆ wait()

template<typename SIZE_TYPE >
void vecmem::async_size< SIZE_TYPE >::wait ( )
overridevirtual

Function that would block the current thread until the event is complete.

Implements vecmem::abstract_event.


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