GPUSampledBoxmap

If an Nvidia gpu is available, the parallelization technique can be improved dramatically. The gpu uses a "massively parallel programming" paradigm, which fits perfectly to the problem of mapping many sample points independently. Using the gpu, a speed increase of up to 200x can be achieved. For more information, see the maximizing performance section.

performance metrics

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

Construct a GPUSampledBoxMap 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.

Requires a CUDA-capable gpu.

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

Construct a GPUSampledBoxMap that uses n_points Monte-Carlo test points.

Requires a CUDA-capable gpu.

source

Example

using CUDA

n_points = 2048
F = BoxMap(:montecarlo, :gpu, f, domain, n_points = n_points)
p = plot!(
    p, F(B), 
    color=RGBA(1.,0.,0.,0.5), 
    lab="$n_points MonteCarlo test points"
)

MonteCarlo BoxMap