From 32961df4e2e05f58251ae6591d7d99019023fddc Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sat, 14 Dec 2019 17:24:57 -0800 Subject: [PATCH] Link parallel processing tutorial from docstrings --- examples/tutorial_parallel.jl | 2 +- src/dreduce.jl | 9 +++++++++ src/reduce.jl | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/tutorial_parallel.jl b/examples/tutorial_parallel.jl index a48af944bb..c4a7886271 100644 --- a/examples/tutorial_parallel.jl +++ b/examples/tutorial_parallel.jl @@ -134,7 +134,7 @@ catch err; err; end # hide # (see: [Splitting a string into words and counting them in # parallel](@ref parallel-word-count)). -# ## Example: parallel `collect` +# ## [Example: parallel `collect`](@id tutorial-parallel-collect) # # !!! note # This section explains the _implementation ideas_ of parallel diff --git a/src/dreduce.jl b/src/dreduce.jl index 1a85f8cee1..4e0ba8a59b 100644 --- a/src/dreduce.jl +++ b/src/dreduce.jl @@ -10,6 +10,9 @@ supported yet. Use [`dcollect`](@ref) or [`dcopy`](@ref) to collect results into a container. +See also: [Parallel processing tutorial](@ref tutorial-parallel), +[`foldl`](@ref), [`reduce`](@ref). + !!! compat "Transducers.jl 0.4.3" New in version 0.4.3. @@ -86,6 +89,9 @@ Distributed.jl-based parallel version of [`copy`](@ref). Keyword arguments are passed to [`dreduce`](@ref). For examples, see [`tcopy`](@ref). +See also: [Parallel processing tutorial](@ref tutorial-parallel) +(especially [Example: parallel `collect`](@ref tutorial-parallel-collect)). + !!! compat "Transducers.jl 0.4.5" New in version 0.4.5. @@ -101,6 +107,9 @@ Distributed.jl-based parallel version of [`collect`](@ref). This is just a short-hand notation of `dcopy(xf, Vector, reducible)`. Use [`dcopy`](@ref) to get a container other than a `Vector`. +See also: [Parallel processing tutorial](@ref tutorial-parallel) +(especially [Example: parallel `collect`](@ref tutorial-parallel-collect)). + !!! compat "Transducers.jl 0.4.5" New in version 0.4.5. diff --git a/src/reduce.jl b/src/reduce.jl index 1ad83178c9..85eccab11a 100644 --- a/src/reduce.jl +++ b/src/reduce.jl @@ -13,7 +13,8 @@ theory). Early termination requires Julia ≥ 1.3. Use [`tcollect`](@ref) or [`tcopy`](@ref) to collect results into a container. -See [`foldl`](@ref), [`dreduce`](@ref). +See also: [Parallel processing tutorial](@ref tutorial-parallel), +[`foldl`](@ref), [`dreduce`](@ref). # Keyword Arguments - `basesize::Integer = length(reducible) ÷ nthreads()`: A size of @@ -197,6 +198,9 @@ Base.reduce(step, xform::Transducer, itr; kwargs...) = Thread-based parallel version of [`copy`](@ref). Keyword arguments are passed to [`reduce`](@ref). +See also: [Parallel processing tutorial](@ref tutorial-parallel) +(especially [Example: parallel `collect`](@ref tutorial-parallel-collect)). + !!! compat "Transducers.jl 0.4.5" New in version 0.4.5. @@ -273,6 +277,9 @@ Thread-based parallel version of [`collect`](@ref). This is just a short-hand notation of `tcopy(xf, Vector, reducible)`. Use [`tcopy`](@ref) to get a container other than a `Vector`. +See also: [Parallel processing tutorial](@ref tutorial-parallel) +(especially [Example: parallel `collect`](@ref tutorial-parallel-collect)). + !!! compat "Transducers.jl 0.4.5" New in version 0.4.5.