Memory pools allocate and free memory from a specified region or underlying allocator providing thread-safe, scalable operations. The following table summarizes the memory pool concept. Here, P represents an instance of the memory pool class.
Intel® Threading Building Blocks (Intel® TBB) is a runtime-based parallel programming model for C++ code that uses threads. It consists of a template-based runtime library to help you harness the latent performance of multicore processors. Use Intel® Threading Building Blocks to write scalable applications that:
Intel® TBB 4.2 - Windows* OS
For a sufficiently simple function Foo, the examples might not show good speedup when written as parallel loops. The cause could be insufficient system bandwidth between the processors and memory. In that case, you may have to rethink your algorithm to take better advantage of cache. Restructuring to better utilize the cache usually benefits the parallel program as well as the serial program.
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;