![]() |
Qt 6.x
The Qt SDK
|
\title Concurrent Map and Map-Reduce
Transforming values from a sequence and combining them, all in parallel.
The QtConcurrent::map(), QtConcurrent::mapped() and QtConcurrent::mappedReduced() functions run computations in parallel on the items in a sequence such as a QList. QtConcurrent::map() modifies a sequence in-place, QtConcurrent::mapped() returns a new sequence containing the modified content, and QtConcurrent::mappedReduced() returns a single result.
These functions are part of the \l {Qt Concurrent} framework.
Each of the above functions has a blocking variant that returns the final result instead of a QFuture. You use them in the same way as the asynchronous variants.
Note that the result types above are not QFuture objects, but real result types (in this case, QList<QImage> and QImage).