#include <parallel_for.h>
Public Attributes | |
uint32_t | maxThreads = std::numeric_limits<int32_t>::max() |
bool | wait = true |
ParForChunking | defaultChunking = ParForChunking::kStatic |
uint32_t | minItemsPerChunk = 1 |
bool | reuseExistingState = false |
A set of options to control parallel_for
Definition at line 38 of file parallel_for.h.
ParForChunking dispenso::ParForOptions::defaultChunking = ParForChunking::kStatic |
Specify whether default chunking should be static or auto (dynamic load balancing). This is used when invoking the version of parallel_for that takes index parameters (vs a ChunkedRange).
Definition at line 59 of file parallel_for.h.
The maximum number of threads to use. This can be used to limit the number of threads below the number associated with the TaskSet's thread pool to control the degree of concurrency. Setting maxThreads to zero or one will result in serial operation.
Definition at line 44 of file parallel_for.h.
uint32_t dispenso::ParForOptions::minItemsPerChunk = 1 |
Specify a minimum number of items per chunk for static or auto dynamic load balancing. Cheaper workloads should have a higher number of minWorkItems. Will be ignored if an explicit chunk size is provided to ChunkedRange.
Definition at line 66 of file parallel_for.h.
When set to false, and StateContainers are supplied to parallel_for, re-create container from scratch each call to parallel_for. When true, reuse existing state as much as possible (only create new state if we require more than is already available in the container).
Definition at line 73 of file parallel_for.h.
Specify whether the return of the parallel_for signifies the work is complete. If the parallel_for is initiated without providing a TaskSet, the parallel_for will always wait.
Definition at line 53 of file parallel_for.h.