21 #ifndef __TBB__aggregator_impl_H 22 #define __TBB__aggregator_impl_H 24 #include "../atomic.h" 25 #if !__TBBMALLOC_BUILD 26 #include "../tbb_profiling.h" 30 namespace interface6 {
36 template <
typename Derived>
52 template <
typename operation_type >
67 template <
typename handler_type >
68 void execute(operation_type *op, handler_type &handle_operations,
bool long_life_time =
true) {
73 const uintptr_t status = op->status;
85 op->next = res = pending_operations;
86 }
while (pending_operations.compare_and_swap(op, res) != res);
92 start_handle_operations(handle_operations);
99 __TBB_ASSERT(long_life_time,
"Waiting for an operation object that might be destroyed during processing.");
113 template <
typename handler_type >
115 operation_type *op_list;
140 handle_operations(op_list);
147 template <
typename handler_type,
typename operation_type >
163 template<
typename aggregating_
class,
typename operation_list>
165 aggregating_class *
fi;
169 void operator()(operation_list* op_list) { fi->handle_operations(op_list); }
176 using interface6::internal::aggregated_operation;
177 using interface6::internal::aggregator_generic;
178 using interface6::internal::aggregator;
179 using interface6::internal::aggregating_functor;
184 #endif // __TBB__aggregator_impl_H
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 ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function h
void execute(operation_type *op)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
void itt_store_word_with_release(tbb::atomic< T > &dst, U src)
T itt_load_word_with_acquire(const tbb::atomic< T > &src)
void initialize_handler(handler_type h)
uintptr_t handler_busy
Controls thread access to handle_operations.
void operator()(operation_list *op_list)
aggregating_functor(aggregating_class *fi_)
void start_handle_operations(handler_type &handle_operations)
Trigger the handling of operations when the handler is free.
void spin_wait_while_eq(const volatile T &location, U value)
Spin WHILE the value of the variable is equal to a given value.
void call_itt_notify(notify_type, void *)
void spin_wait_until_eq(const volatile T &location, const U value)
Spin UNTIL the value of the variable is equal to a given value.
aggregated_operation base class
uintptr_t status
Zero value means "wait" status, all other values are "user" specified values and are defined into the...
handler_type handle_operations
atomic< operation_type * > pending_operations
An atomically updated list (aka mailbox) of pending operations.
void execute(operation_type *op, handler_type &handle_operations, bool long_life_time=true)
Execute an operation.
aggregator(handler_type h)
Identifiers declared inside namespace internal should never be used directly by client code.
void __TBB_store_with_release(volatile T &location, V value)
value_type fetch_and_store(value_type value)