17 #ifndef __TBB__aggregator_impl_H 18 #define __TBB__aggregator_impl_H 20 #include "../atomic.h" 21 #if !__TBBMALLOC_BUILD 22 #include "../tbb_profiling.h" 26 namespace interface6 {
32 template <
typename Derived>
48 template <
typename operation_type >
63 template <
typename handler_type >
64 void execute(operation_type *op, handler_type &handle_operations,
bool long_life_time =
true) {
69 const uintptr_t status = op->status;
81 op->next = res = pending_operations;
82 }
while (pending_operations.compare_and_swap(op, res) != res);
88 start_handle_operations(handle_operations);
95 __TBB_ASSERT(long_life_time,
"Waiting for an operation object that might be destroyed during processing.");
109 template <
typename handler_type >
111 operation_type *op_list;
133 op_list = pending_operations.fetch_and_store(NULL);
136 handle_operations(op_list);
143 template <
typename handler_type,
typename operation_type >
159 template<
typename aggregating_
class,
typename operation_list>
161 aggregating_class *
fi;
165 void operator()(operation_list* op_list) { fi->handle_operations(op_list); }
172 using interface6::internal::aggregated_operation;
173 using interface6::internal::aggregator_generic;
174 using interface6::internal::aggregator;
175 using interface6::internal::aggregating_functor;
180 #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
handler_type handle_operations
void call_itt_notify(notify_type, void *)
void spin_wait_while_eq(const volatile T &location, U value)
Spin WHILE the value of the variable is equal to a given value.
uintptr_t handler_busy
Controls thread access to handle_operations.
void itt_store_word_with_release(tbb::atomic< T > &dst, U src)
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.
void __TBB_store_with_release(volatile T &location, V value)
void start_handle_operations(handler_type &handle_operations)
Trigger the handling of operations when the handler is free.
void execute(operation_type *op, handler_type &handle_operations, bool long_life_time=true)
Execute an operation.
void operator()(operation_list *op_list)
aggregator(handler_type h)
void initialize_handler(handler_type h)
aggregated_operation base class
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
T itt_load_word_with_acquire(const tbb::atomic< T > &src)
atomic< operation_type * > pending_operations
An atomically updated list (aka mailbox) of pending operations.
void execute(operation_type *op)
uintptr_t status
Zero value means "wait" status, all other values are "user" specified values and are defined into the...
Identifiers declared inside namespace internal should never be used directly by client code...
aggregating_functor(aggregating_class *fi_)