dispenso
A library for task parallelism
 
Loading...
Searching...
No Matches
dispenso::ForEachOptions Struct Reference

#include <for_each.h>

Public Attributes

uint32_t maxThreads = std::numeric_limits<int32_t>::max()
 
bool wait = true
 

Detailed Description

A set of options to control for_each

Definition at line 27 of file for_each.h.

Member Data Documentation

◆ maxThreads

uint32_t dispenso::ForEachOptions::maxThreads = std::numeric_limits<int32_t>::max()

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 33 of file for_each.h.

◆ wait

bool dispenso::ForEachOptions::wait = true

Specify whether the return of the for_each signifies the work is complete. If the for_each is initiated without providing a TaskSet, the for_each will always wait.

Note
If wait is true, the calling thread will always participate in computation. If this is not desired, pass wait as false, and wait manually outside of the for_each on the passed TaskSet.

Definition at line 42 of file for_each.h.


The documentation for this struct was generated from the following file: