A concurrent_hash_map<Key, T, HashCompare > is a hash table that permits concurrent accesses. The table is a map from a key to a type T. The traits type HashCompare defines how to hash a key and how to compare two keys.
When measuring the performance of parallel programs, it is usually wall clock time, not CPU time, that matters. The reason is that better parallelization typically increases aggregate CPU time by employing more CPUs. The goal of parallelizing a program is usually to make it run faster in real time.
You might need a task that does not do anything but wait for its children to complete. The header task.h defines class empty_task for this purpose. Its definition is as follows:
Atomically update a scalar value so that a predicate is satisfied.
Often a shared variable must be updated atomically, by a transform that maps its old value to a new value. The transform might be a transition of a finite state machine, or recording global knowledge. For instance, the shared variable might be recording the maximum value that any thread has seen so far.
Requirements for a type whose instances can be split into two pieces.
The following table lists the requirements for a splittable type X with instance x.
SummaryTypes that distinguish the phases of parallel_scan.
struct pre_scan_tag; struct final_scan_tag;
The bucket interface is similar to the bucket interface for the C++11 class unordered_set and unordered_multiset, except that the prefix unsafe_ has been added as a reminder that the methods are unsafe to use during concurrent insertion.
The bucket interface is intended for debugging. It is not concurrency safe.
Concurrent invocation of these operations on the same instance is not safe.
An empty class that represent a continue message. An object of this class is used to indicate that the sender has completed.