Skip to content

Commit 5dfeb12

Browse files
committed
remove parallelization reference
1 parent c7c5546 commit 5dfeb12

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

docs/src/index.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,26 +96,6 @@ current_states
9696
ArbitrarySteppable
9797
```
9898

99-
## Parallelization
100-
101-
Since `DynamicalSystem`s are mutable, one needs to copy them before parallelizing, to avoid having to deal with complicated race conditions etc. The simplest way is with `deepcopy`. Here is an example block that shows how to parallelize calling some expensive function (e.g., calculating the Lyapunov exponent) over a parameter range using `Threads`:
102-
103-
```julia
104-
ds = DynamicalSystem(f, u, p) # some concrete implementation
105-
parameters = 0:0.01:1
106-
outputs = zeros(length(parameters))
107-
108-
# Since `DynamicalSystem`s are mutable, we need to copy to parallelize
109-
systems = [deepcopy(ds) for _ in 1:Threads.nthreads()-1]
110-
pushfirst!(systems, ds) # we can save 1 copy
111-
112-
Threads.@threads for i in eachindex(parameters)
113-
system = systems[Threads.threadid()]
114-
set_parameter!(system, 1, parameters[i])
115-
outputs[i] = expensive_function(system, args...)
116-
end
117-
```
118-
11999
## Advanced example
120100

121101
This is an advanced example of making an in-place implementation of coupled [standard maps](https://en.wikipedia.org/wiki/Standard_map). It will utilize a handcoded Jacobian, a sparse matrix for the Jacobinan, a default initial Jacobian matrix, as well as function-like-objects as the dynamic rule.

0 commit comments

Comments
 (0)