ae.utils.parallelism

ae.utils.parallelism

Members

Functions

parallelCachedFilter
auto parallelCachedFilter(R input)

Filters input in parallel. This version calls fun only once per input element (at the expense of additional used memory).

parallelChunks
T[] parallelChunks(R range, T delegate(R) fun)
T[] parallelChunks(N total, T delegate(N start, N end) fun)
auto parallelChunks(R range)
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.

parallelSum
auto parallelSum(R range)
Undocumented in source. Be warned that the author may not have intended to support it.

Templates

parallelReduce
template parallelReduce(alias fun)
Undocumented in source.

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>