aboutsummaryrefslogblamecommitdiff
path: root/devel/fxdiv/pkg-descr
blob: bb9d6123d9ea1669865f22e056908be37710e0af (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                              
Header-only library for division via fixed-point multiplication by inverse.

On modern CPUs and GPUs integer division is several times slower than
multiplication. FXdiv implements an algorithm to replace an integer division
with a multiplication and two shifts. This algorithm improves performance when
an application performs repeated divisions by the same divisor.

Features:
* Integer division for uint32_t, uint64_t, and size_t
* Header-only library, no installation or build required
* Compatible with C99, C++, OpenCL, and CUDA
* Uses platform-specific compiler intrinsics for optimal performance
* Covered with unit tests and microbenchmarks

WWW: https://github.com/Maratyszcza/FXdiv