ae.utils.parallelism

ae.utils.parallelism

Members

Functions

parallelChunks
T[] parallelChunks(N total, T delegate(N start, N end) fun)
auto parallelChunks(R range)

Split a range into chunks, processing each chunk in parallel. Returns a dynamic array containing the result of calling fun on each chunk. fun is called at most once per CPU core.

parallelChunks
T[] parallelChunks(R range, T delegate(R) fun)
auto parallelChunks(N total)

Split a range into chunks, processing each chunk in parallel. Returns a dynamic array containing the result of calling fun on each chunk. fun is called at most once per CPU core.

parallelEagerMap
auto parallelEagerMap(R input, Pred pred, size_t workUnitSize)

Parallel map. Like TaskPool.amap, but uses functors for predicates instead of alias arguments, and as such does not have the multiple-context problem. https://forum.dlang.org/post/qnigarkuxxnqwdernhzv@forum.dlang.org

parallelEqual
bool parallelEqual(T[] a, T[] b)

Compare two arrays for equality, in parallel.

parallelSort
auto parallelSort(R r)

Sort r using all CPU cores.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>