|
rexlib 0.1.0
Device-agnostic array computing library for CryoEM and CryoET image processing, with a pluggable backend architecture
|
Identifies a command submitted to a command_queue. More...
#include <rexlib/core/hardware/command_token.hpp>
Public Member Functions | |
| command_token () noexcept | |
| Construct an empty token. | |
| command_token (std::shared_ptr< const command_timeline > timeline, std::size_t id) noexcept | |
| Construct a token from its components. | |
| command_token (const command_token &other) noexcept | |
| command_token (command_token &&other) noexcept | |
| command_token & | operator= (const command_token &other) noexcept |
| command_token & | operator= (command_token &&other) noexcept |
| const std::shared_ptr< const command_timeline > & | get_timeline () const noexcept |
| Get the timeline that gave the id. | |
| std::size_t | get_id () const noexcept |
| Get the id of the command in its timeline. | |
| bool | is_empty () const noexcept |
| Check whether this is empty. | |
| bool | is_complete () const |
| Check whether the command has finished. | |
| void | wait () const |
| Block the calling thread until the command has finished. | |
Identifies a command submitted to a command_queue.
A token pairs a command_timeline with the id that timeline gave to a command. It is a value: it can be copied freely, and every copy identifies the same command.
|
noexcept |
Construct a token from its components.
| timeline | The timeline that gave the id. A null timeline makes the token empty. |
| id | The id of the command in timeline. |
|
noexcept |
Get the id of the command in its timeline.
|
noexcept |
Get the timeline that gave the id.
| bool rexlib::command_token::is_complete | ( | ) | const |
Check whether the command has finished.
Does not block the calling thread.
|
noexcept |
Check whether this is empty.
| void rexlib::command_token::wait | ( | ) | const |
Block the calling thread until the command has finished.
Returns immediately if this is empty.