From e10d0668663fd8be0276f32c167a3f6512b6985c Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace <51025924+simsurace@users.noreply.github.com> Date: Wed, 31 Jan 2024 22:47:47 +0100 Subject: [PATCH] Correct doc string for `treduce` --- src/OhMyThreads.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/OhMyThreads.jl b/src/OhMyThreads.jl index 473d65b1..9d0ebe46 100644 --- a/src/OhMyThreads.jl +++ b/src/OhMyThreads.jl @@ -94,8 +94,7 @@ function treducemap end schedule::Symbol =:dynamic, outputtype::Type = Any) -Like `tmapreduce` except the order of the `f` and `op` arguments are switched. Perform a reduction over `A`, -applying a single-argument function `f` to each element, and then combining them with the two-argument +A multithreaded function like `Base.reduce`. Perform a reduction over `A` using the two-argument function `op`. `op` **must** be an [associative](https://en.wikipedia.org/wiki/Associative_property) function, in the sense that `op(a, op(b, c)) ≈ op(op(a, b), c)`. If `op` is not (approximately) associative, you will get undefined results.