Skip to main content

Module precision

Module precision 

Source
Expand description

Reduced precision for transport (experimental), chosen by the user and checked against double precision.

The nested-dissection solvers can run their fronts in complex f32 (Precision::Single). The root of the elimination (the lead self-energies, the delayed variables and the final solve) and the trace stay in f64. checked runs a batch of points in the chosen precision, recomputes a sample in double precision and falls back to double precision for the whole batch when the sample differs by more than the tolerance: every run reports the error it measured.

Measured on Apple silicon (ARCHITECTURE.md, item 12), single precision is a preview tool:

  • 1.1–1.6× faster on one thread on the benchmark problems (less where the lead modes, always in f64, take most of the time: BHZ, graphene), 1.4–1.9× on all threads;
  • the median error stays near 10⁻⁵, but the largest grows with the width: on the spin blocks of the g2g1 ribbons, 3·10⁻² at W = 64, 6·10⁻² at W = 128, 0.4 at W = 256 (below 10⁻² on the conductance plateaus). Nested dissection eliminates closed subdomains at a real energy, and close to one of their eigenvalues a block keeps too few digits in f32.

Structs§

PrecisionOptions
How a batch of points runs in reduced precision (see checked).
PrecisionReport
What a checked batch did.

Enums§

Precision
Floating-point precision of the eliminations of a nested-dissection solve.

Functions§

checked
Runs run(point, precision) on every point, in parallel, in options.precision. In reduced precision, one point in options.every is recomputed in double precision and compared with distance; if one of them differs by more than options.tolerance, the whole batch is recomputed in double precision. Points that fail in reduced precision are computed in double precision. The checked points return their double-precision values.