STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::runtime::async_result< T, IsBasic > Class Template Reference

Storage for a result that can be asynchronously assigned and retrieved. More...

Public Member Functions

get (void)
 Returns the result. More...
 
bool valid (void) const noexcept
 Returns if a result is stored.
 
void set_value (storage_type *const p, void *const base, message_shared_ptr &m) noexcept
 Sets the result. More...
 
void set_value (T const &value)
 Sets the result.
 
void set_value (T &&value)
 Sets the result. More...
 

Public Types

typedef packed_type::storage_type storage_type
 

Detailed Description

template<typename T, bool IsBasic = is_basic<T>::value>
class stapl::runtime::async_result< T, IsBasic >

Storage for a result that can be asynchronously assigned and retrieved.

Template Parameters
TResult type.

Member Function Documentation

◆ get()

template<typename T, bool IsBasic = is_basic<T>::value>
T stapl::runtime::async_result< T, IsBasic >::get ( void  )

Returns the result.

Calling valid() const returns false after a call to this function.

◆ set_value() [1/2]

template<typename T, bool IsBasic = is_basic<T>::value>
void stapl::runtime::async_result< T, IsBasic >::set_value ( storage_type *const  p,
void *const  base,
message_shared_ptr m 
)
noexcept

Sets the result.

This function keeps a pointer to the buffer where the result remains packed until get() is called.

Parameters
pPointer to the arg_storage in the buffer.
baseAddress in the buffer the arg_storage was created in.
mBuffer that contains the arg_storage.
See also
arg_storage, message

◆ set_value() [2/2]

template<typename T, bool IsBasic = is_basic<T>::value>
void stapl::runtime::async_result< T, IsBasic >::set_value ( T &&  value)

Sets the result.


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