_|_|_| _|_|_| _|_|_| _|_|_| _| _|
_| _| _| _| _| _| _|_| _|_|
_|_|_| _|_|_| _| _|_| _| _| _|
_| _| _| _| _| _| _|
_| _| _| _|_|_| _|_|_| _| _|
This library provides a vectorized implementation of two probabilistic rounding modes:
- Up-Down Rounding Mode: Add +/- 1 ulp with equal probabilities (1/2). Do not preserve exact operations.
- Stochastic Rounding: As described in Fasi and Mikaitis: Algorithms for Stochastically Rounded Elementary Arithmetic Operations, extended here to support the FMA operator.
The library leverages the Highway library, a high-performance C++ library for portable vector instructions across platforms. It uses dynamic dispatch to efficiently execute functions across different architectures.
The library is available in three interfaces:
- Array Interface: Supports probabilistic rounding (PR) on contiguous arrays, providing a simple and flexible interface.
- Dynamic Interface: Provides an interface for single vector instructions with dynamic dispatch to automatically select the best implementation for the target architecture.
- Static Interface: Provides an interface for single vector instructions with static dispatch, delivering optimal performance by bypassing architecture selection. This mode is not portable across architectures.
This combination of features makes the library versatile for scientific computing, numerical analysis, and high-performance applications requiring probabilistic rounding.
- clang, clang++
- bazelisk (install)
./autogen.sh
./configure
make
make install
bazel test tests:all
The library has only been tested on X86-64 architectures for the moment.