devel/fxdiv g20181121 DragonFly
C/C++ header-only library for division via FP inverse multiplication
- System
- DragonFly
- Repository
- DPorts
- Maintainer
- [email protected] (as in FreeBSD)
- License
- MIT
- Categories
- devel
- Package size
- 4.0 KiB, 13.2 KiB installed
Description
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
In the other systems
| System | Port | Version |
|---|---|---|
| DragonFly | devel/fxdiv | g20181121 |
| FreeBSD | devel/fxdiv | g20181121 |
| MidnightBSD | devel/fxdiv | g20181121 |
| HardenedBSD | devel/fxdiv | g20181121 |
| GhostBSD | devel/fxdiv | g20181121 |
Install
Binary package:
pkg install fxdiv
From DPorts:
cd /usr/dports/devel/fxdiv && make install clean
Dependencies
No port depends on this one.