Storage for an array of results that can be asynchronously assigned and retrieved. More...
Public Member Functions | |
| async_results (const size_type n) | |
| size_type | size (void) const noexcept |
| T | get (const size_type n) |
| Returns the n-th result. More... | |
| std::vector< T > | get (void) |
| Returns all the results. More... | |
| bool | valid (const size_type n) const noexcept |
| Returns if the n-th result is stored. | |
| bool | valid (void) const noexcept |
| Returns if all the results are stored. | |
| bool | set_value (const size_type n, storage_type *const p, void *const base, message_shared_ptr &m) noexcept |
Sets the n-th result and returns true if it was the last result expected. More... | |
| bool | set_value (const size_type n, T const &value) |
Sets the n-th result and returns true if it was the last result expected. | |
| bool | set_value (const size_type n, T &&value) |
Sets the n-th result and returns true if it was the last result expected. More... | |
Public Types | |
| typedef container_type::size_type | size_type |
| typedef async_result< T >::storage_type | storage_type |
Storage for an array of results that can be asynchronously assigned and retrieved.
| T | Result type. |
| T stapl::runtime::async_results< T >::get | ( | const size_type | n | ) |
Returns the n-th result.
Calling valid(size_type) const or valid() const returns false after a call to this function.
| std::vector<T> stapl::runtime::async_results< T >::get | ( | void | ) |
Returns all the results.
Calling valid(size_type) const or valid() const returns false after a call to this function.
|
noexcept |
Sets the n-th result and returns true if it was the last result expected.
This function keeps a pointer to the buffer where the result remains packed until get() or get(const size_type) is called.
| n | Result index. |
| p | Pointer to the arg_storage in the buffer. |
| base | Address in the buffer the arg_storage was created in. |
| m | Buffer that contains the arg_storage. |
| bool stapl::runtime::async_results< T >::set_value | ( | const size_type | n, |
| T && | value | ||
| ) |
Sets the n-th result and returns true if it was the last result expected.
1.8.13