deblais
Exact optimal transport between point clouds
Loading...
Searching...
No Matches
deblais::AutoThresholds Struct Reference

Sizes at which the automatic mode changes method. More...

#include <deblais/solve.hpp>

Static Public Member Functions

static constexpr std::size_t decompositionFrom (int dim)
 Threshold of Method::decomposition in a given dimension.
static constexpr int minSize (std::size_t n)
 Automatic size of the coarsest level of the multiscale start.

Static Public Attributes

static constexpr std::size_t decomposition = 2000
 Number of points of the larger cloud from which Method::decomposition replaces Method::simplex, in dimension 3 and above.
static constexpr std::size_t decomposition_plane = 500
 The same threshold in dimension 2, where the start pays off sooner.
static constexpr std::size_t coarsening = 6
 Points of the larger cloud per point of the coarsest level.
static constexpr std::size_t medium = 300000
 Points of the larger cloud below which the domain decomposition uses cells of 384 sources instead of 512, and the pricing helper threads start at 20 000 sources instead of 100 000.

Detailed Description

Sizes at which the automatic mode changes method.

Measured in dimension 2 and 3, on 1 to 192 threads: see the "Automatic mode" page of the documentation.

Member Function Documentation

◆ decompositionFrom()

constexpr std::size_t deblais::AutoThresholds::decompositionFrom ( int dim)
inlinestaticconstexpr

Threshold of Method::decomposition in a given dimension.

Parameters
dimDimension of the points.
Returns
AutoThresholds::decomposition_plane in dimension 2, AutoThresholds::decomposition otherwise.

◆ minSize()

constexpr int deblais::AutoThresholds::minSize ( std::size_t n)
inlinestaticconstexpr

Automatic size of the coarsest level of the multiscale start.

Parameters
nNumber of points of the larger cloud.
Returns
100, 300, 1000 or 3000: the largest that leaves AutoThresholds::coarsening points per point of the level.

Member Data Documentation

◆ decomposition

std::size_t deblais::AutoThresholds::decomposition = 2000
staticconstexpr

Number of points of the larger cloud from which Method::decomposition replaces Method::simplex, in dimension 3 and above.

Below, the multiscale start does not pay for itself.

◆ coarsening

std::size_t deblais::AutoThresholds::coarsening = 6
staticconstexpr

Points of the larger cloud per point of the coarsest level.

The automatic Options::min_size is the largest of 100, 300, 1000 and 3000 that leaves at least this ratio, 100 at least.

◆ medium

std::size_t deblais::AutoThresholds::medium = 300000
staticconstexpr

Points of the larger cloud below which the domain decomposition uses cells of 384 sources instead of 512, and the pricing helper threads start at 20 000 sources instead of 100 000.

Both save 7 to 25 % from 10 000 to 100 000 points on 16 threads, and cost 1 to 2 % from a million points on.