devel/fxdiv g20181121 MidnightBSD
C/C++ header-only library for division via FP inverse multiplication
- System
- MidnightBSD
- Repository
- mports
- Maintainer
- [email protected]
- License
- mit
- Categories
- devel
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 |
|---|---|---|
| MidnightBSD | devel/fxdiv | g20181121 |
| FreeBSD | devel/fxdiv | g20181121 |
| DragonFly | devel/fxdiv | g20181121 |
| HardenedBSD | devel/fxdiv | g20181121 |
| GhostBSD | devel/fxdiv | g20181121 |
Install
Binary package:
mport install fxdiv
From mports:
cd /usr/mports/devel/fxdiv && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= fxdiv>0:devel/fxdiv
Dependencies
Required by 3
Configuration
No options to configure.
- USES
- cmake
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| Maratyszcza-FXdiv-g20181121-f8c5354_GH0.tar.gz | 8792 | 94258c95f737916127ab70df1aa79d39575ed48dc6d23155a89747122d5d7797 |