CPUSampledBoxMap

Naturally, if an increase in accuracy is desired in a SampledBoxMap, a larger set of test points may be chosen. This leads to a dilemma: the more accurate we wish our approximation to be, the more we need to map very similar test points forward, causing a considerable slow down for complicated dynamical systems. However, the process of mapping each test point forward is completely independent on other test points. This means we do not need to perform each calculation sequentially; we can parallelize.

If the point map only uses "basic" instructions, then it is possible to simultaneously apply Single Instructions to Multiple Data (SIMD). This way multiple function calls can be made at the same time, increasing performance by roughly 2x.

performance metrics

For more details, see the maximizing performance section.

GAIO.GridBoxMapMethod
BoxMap(:grid, :simd, map, domain::Box{N}; n_points::NTuple{N} = ntuple(_->16, N)) -> CPUSampledBoxMap

Construct a CPUSampledBoxMap that uses a grid of test points. The size of the grid is defined by n_points, which is a tuple of length equal to the dimension of the domain. The number of points is rounded up to the nearest mutiple of the cpu's SIMD capacity.

source
GAIO.MonteCarloBoxMapMethod
BoxMap(:montecarlo, :simd, map, domain::Box{N}; n_points=16*N) -> SampledBoxMap

Construct a CPUSampledBoxMap that uses n_points Monte-Carlo test points. The number of points is rounded up to the nearest multiple of the cpu's SIMD capacity.

source

Example

julia> using SIMD
julia> n_points = 256256
julia> F = BoxMap(:montecarlo, :simd, f, domain, n_points = n_points)CPUSampledBoxMap with 256 sample points
julia> p = plot!( p, F(B), color=RGBA(1.,0.,0.,0.5), lab="$n_points MonteCarlo test points" )Plot{Plots.GRBackend() n=4}

MonteCarlo BoxMap