Commit ed2a4a28 authored by yuri's avatar yuri
Browse files

New port: devel/fxdiv: C/C++ header-only library for division via FP inverse multiplication

parent 4681c39c
......@@ -711,6 +711,7 @@
SUBDIR += fujaba
SUBDIR += funnelweb
SUBDIR += fuzzylite
SUBDIR += fxdiv
SUBDIR += ga
SUBDIR += gaa
SUBDIR += gamin
......
# $FreeBSD$
PORTNAME= fxdiv
PORTVERSION= g20181121
CATEGORIES= devel
MAINTAINER= yuri@FreeBSD.org
COMMENT= C/C++ header-only library for division via FP inverse multiplication
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cmake
USE_GITHUB= yes
GH_ACCOUNT= Maratyszcza
GH_PROJECT= FXdiv
GH_TAGNAME= f8c5354
USE_LDCONFIG= yes
CMAKE_OFF= FXDIV_BUILD_TESTS FXDIV_BUILD_BENCHMARKS
NO_BUILD= yes
NO_ARCH= yes
PLIST_FILES= include/fxdiv.h
do-test:
@cd ${BUILD_WRKSRC} && \
${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DFXDIV_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
.include <bsd.port.mk>
TIMESTAMP = 1566067960
SHA256 (Maratyszcza-FXdiv-g20181121-f8c5354_GH0.tar.gz) = 94258c95f737916127ab70df1aa79d39575ed48dc6d23155a89747122d5d7797
SIZE (Maratyszcza-FXdiv-g20181121-f8c5354_GH0.tar.gz) = 8792
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment