17 #ifndef __TBB__aggregator_H 18 #define __TBB__aggregator_H 20 #if !TBB_PREVIEW_AGGREGATOR 21 #error Set TBB_PREVIEW_AGGREGATOR before including aggregator.h 28 namespace interface6 {
52 virtual void apply_body() = 0;
58 template<
typename Body>
79 op_list = op_list->
next();
92 template <
typename handler_type>
95 aggregator_ext(
const handler_type&
h) : handler_busy(0), handle_operations(h) { mailbox = NULL; }
118 }
while (mailbox.compare_and_swap(&op, res) != res);
123 start_handle_operations();
169 handle_operations(pending_operations);
183 template<
typename Body>
185 internal::basic_operation<Body> op(b);
186 this->execute_impl(op);
198 #endif // __TBB__aggregator_H
aggregator_operation * next()
aggregator_ext(const handler_type &h)
void set_next(aggregator_operation *n)
void itt_hide_store_word(T &dst, T src)
void process(aggregator_operation *op)
EXPERT INTERFACE: Enter a user-made operation into the aggregator's mailbox.
aggregator_operation_status
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 spin_wait_while_eq(const volatile T &location, U value)
Spin WHILE the value of the variable is equal to a given value.
basic_operation(const Body &b)
atomic< aggregator_operation * > mailbox
An atomically updated list (aka mailbox) of aggregator_operations.
aggregator_operation * my_next
void start_handle_operations()
Trigger the handling of operations when the handler is free.
virtual ~basic_operation_base()
Basic aggregator interface.
virtual void apply_body()=0
void itt_store_word_with_release(tbb::atomic< T > &dst, U src)
T itt_hide_load_word(const T &src)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
void execute_impl(aggregator_operation &op)
Primary template for atomic.
void finish()
Call finish when done handling this operation.
void __TBB_store_with_release(volatile T &location, V value)
Aggregator base class and expert interface.
Base class for types that should not be copied or assigned.
void start()
Call start before handling this operation.
void call_itt_notify(notify_type, void *)
T itt_load_word_with_acquire(const tbb::atomic< T > &src)
Identifiers declared inside namespace internal should never be used directly by client code...
Base class for types that should not be assigned.
uintptr_t handler_busy
Controls thread access to handle_operations.
value_type fetch_and_store(value_type value)
handler_type handle_operations
void operator()(aggregator_operation *op_list) const
void apply_body() __TBB_override
void execute(const Body &b)
BASIC INTERFACE: Enter a function for exclusive execution by the aggregator.
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