@@ -284,8 +284,9 @@ julia> xrange_long,yrange_long,zrange_long = 1:3000,1:3000,1:3000
284284
285285julia> params_long = (xrange_long,yrange_long,zrange_long);
286286
287- julia> ps_long = ProductSplit (params_long, 10 , 4 )
288- ProductSplit {Tuple{Int64,Int64,Int64},3,UnitRange{Int64}} ((1 : 3000 , 1 : 3000 , 1 : 3000 ), (0 , 3000 , 9000000 ), 10 , 4 , 8100000001 , 10800000000 )
287+ julia> ps = ProductSplit (params_long, 10 , 3 )
288+ 2700000000 - element ProductSplit ((1 : 3000 , 1 : 3000 , 1 : 3000 ), 10 , 3 )
289+ [(1 , 1 , 601 ), ... , (3000 , 3000 , 900 )]
289290
290291# Evaluate length using random ranges to avoid compiler optimizations
291292julia> @btime length (p) setup = (n = rand (3000 : 4000 ); p = ProductSplit ((1 : n,1 : n,1 : n), 200 , 2 ));
@@ -333,25 +334,24 @@ Another useful function is `whichproc` that returns the rank of the processor a
333334julia> whichproc (params_long, val, 10 )
3343354
335336
336- julia> @btime whichproc ($ params_long, $ val, 10 )
337- 1.264 μs (14 allocations: 448 bytes)
338- 4
337+ julia> @btime whichproc ($ params_long, $ val, 10 );
338+ 353.706 ns (0 allocations: 0 bytes)
339339```
340340
341341### Extrema
342342
343- We can compute the ranges of each variable on any processor in ` O(1) ` time.
343+ We may compute the ranges of each variable on any processor in ` O(1) ` time.
344344
345345``` julia
346- julia> extrema (ps, dim= 2 ) # extrema of the second parameter on this processor
346+ julia> extrema (ps, dim = 2 ) # extrema of the second parameter on this processor
347347(3 , 4 )
348348
349- julia> Tuple (extrema (ps, dim= i) for i in 1 : 3 )
349+ julia> Tuple (extrema (ps, dim = i) for i in 1 : 3 )
350350((1 , 3 ), (3 , 4 ), (4 , 4 ))
351351
352352# Minimum and maximum work similarly
353353
354- julia> (minimum (ps, dim= 2 ), maximum (ps, dim= 2 ))
354+ julia> (minimum (ps, dim = 2 ), maximum (ps, dim = 2 ))
355355(3 , 4 )
356356
357357julia> @btime extrema ($ ps_long, dim= 2 )
0 commit comments