BSD Ports

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

SystemPortVersion
MidnightBSDdevel/fxdivg20181121
FreeBSDdevel/fxdivg20181121
DragonFlydevel/fxdivg20181121
HardenedBSDdevel/fxdivg20181121
GhostBSDdevel/fxdivg20181121

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

Configuration

No options to configure.

USES
cmake
Service scripts
none

Files

distinfo 1
FileSizeSHA256
Maratyszcza-FXdiv-g20181121-f8c5354_GH0.tar.gz879294258c95f737916127ab70df1aa79d39575ed48dc6d23155a89747122d5d7797