A buffer of input items for a filter.
Each item is a task_info, inserted into a position in the buffer corresponding to a Token.
Definition at line 48 of file pipeline.cpp.
template<typename StageTask >
void tbb::internal::input_buffer::note_done |
( |
Token |
token, |
|
|
StageTask & |
spawner |
|
) |
| |
|
inline |
Note that processing of a token is finished.
Fires up processing of the next token, if processing was deferred.
Definition at line 174 of file pipeline.cpp.
References tbb::pipeline::clear(), tbb::filter::finalize(), tbb::internal::task_info::is_valid, ITT_NOTIFY, lock, tbb::internal::task_info::my_object, and tbb::internal::task_info::reset().
184 item.is_valid =
false;
188 spawner.spawn_stage_task(wakee);
bool is_ordered
True for ordered filter, false otherwise.
task_info * array
Array of deferred tasks that cannot yet start executing.
size_type array_size
Size of array.
spin_mutex array_mutex
Serializes updates.
#define ITT_NOTIFY(name, obj)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
Token low_token
Lowest token that can start executing.
bool tbb::internal::input_buffer::put_token |
( |
task_info & |
info_, |
|
|
bool |
force_put = false |
|
) |
| |
|
inline |
Put a token into the buffer.
If task information was placed into buffer, returns true; otherwise returns false, informing the caller to create and spawn a task. If input buffer owned by thread-bound filter and the item at low_token was not valid, issue a V() If the input_buffer is owned by a successor to a thread-bound filter, the force_put parameter should be true to ensure the token is inserted in the buffer.
Definition at line 135 of file pipeline.cpp.
References __TBB_ASSERT, tbb::internal::task_info::is_valid, ITT_NOTIFY, lock, tbb::internal::task_info::my_token, tbb::internal::task_info::my_token_ready, and sync_releasing.
137 info_.is_valid =
true;
142 if( !info_.my_token_ready ) {
144 info_.my_token_ready =
true;
146 token = info_.my_token;
bool is_ordered
True for ordered filter, false otherwise.
void grow(size_type minimum_size)
Resize "array".
task_info * array
Array of deferred tasks that cannot yet start executing.
size_type array_size
Size of array.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p sync_releasing
spin_mutex array_mutex
Serializes updates.
#define ITT_NOTIFY(name, obj)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
bool is_bound
True for thread-bound filter, false otherwise.
Token my_token
Invalid unless a task went through an ordered stage.
Token high_token
Used for out of order buffer, and for assigning my_token if is_ordered and my_token not already assig...
Token low_token
Lowest token that can start executing.