carb::tasking::Tracker¶
Defined in carb/tasking/TaskingHelpers.h
Inheritance Relationships¶
Base Type¶
public carb::tasking::Object
(carb::tasking::Object)
-
struct
carb::tasking
::
Tracker
: public carb::tasking::Object¶ Helper class to provide correct types to the Trackers class.
The following types are valid trackers:
Anything convertible to Counter*, such as CounterWrapper. Counters are deprecated however. The Counter is incremented before the task can possibly begin executing and decremented when the task finishes.
Future<void>&: This can be used to atomically populate a Future<void> before the task could possibly start executing.
Future<void>*: Can be
nullptr
, but if not, can be used to atomically populate a Future<void> before the task could possibly start executing.TaskContext&: By providing a reference to a TaskContext it will be atomically filled before the task could possibly begin executing.
TaskContext*: By providing a pointer to a TaskContext (that can be
nullptr
), it will be atomically filled before the task could possibly begin executing, if valid.
Public Functions
-
inline constexpr
Tracker
(std::nullptr_t)¶ Construtor that accepts a
std::nullptr_t
.
-
template<class
T
, std::enable_if_t<std::is_convertible<T, Counter*>::value, bool> = false>
inline constexprTracker
(T &&c)¶ Constructor that accepts a Counter* or an object convertible to Counter*, such as CounterWrapper.
- Parameters
c – The object convertible to Counter*.
-
inline
Tracker
(Future<> &fut)¶ Constructor that accepts a Future<void>&.
The Future will be initialized before the task can begin.
-
inline
Tracker
(Future<> *fut)¶ Constructor that accepts a Future<void>*.
The Future<void> will be initialized before the task can begin. The Future<void> pointer can be
nullptr
.
Constructor that accepts a SharedFuture<void>&.
The SharedFuture will be initialized before the task can begin.
Constructor that accepts a SharedFuture<void>*.
The SharedFuture<void> will be initialized before the task can begin. The SharedFuture<void> pointer can be
nullptr
.
-
inline constexpr
Tracker
(TaskContext &ctx)¶ Constructor that accepts a TaskContext&.
The value will be atomically written before the task can begin.
-
inline constexpr
Tracker
(TaskContext *ctx)¶ Constructor that accepts a TaskContext*.
The value will be atomically written before the task can begin. The TaskContext* can be
nullptr
.
Public Members
-
ObjectType
type
¶ The ObjectType of the represented type.
-
void *
data
¶ Interpreted based on the ObjectType provided.