diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2019-08-17 19:13:04 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2019-08-17 19:13:04 +0000 |
commit | baac500f89c1edfe3fa4792022294d1f4c47af9c (patch) | |
tree | 25e388ba2e9cec9ba966dccfcd032ca0b0d61743 | |
parent | d4219cbddaf03c1f9120828cc50352a3fa0da890 (diff) | |
download | freebsd-ports-baac500f89c1edfe3fa4792022294d1f4c47af9c.zip |
New port: devel/fxdiv: C/C++ header-only library for division via FP inverse multiplication
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/fxdiv/Makefile | 33 | ||||
-rw-r--r-- | devel/fxdiv/distinfo | 3 | ||||
-rw-r--r-- | devel/fxdiv/pkg-descr | 15 |
4 files changed, 52 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 5e11da63de66..8140a9d13f76 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -711,6 +711,7 @@ SUBDIR += fujaba SUBDIR += funnelweb SUBDIR += fuzzylite + SUBDIR += fxdiv SUBDIR += ga SUBDIR += gaa SUBDIR += gamin diff --git a/devel/fxdiv/Makefile b/devel/fxdiv/Makefile new file mode 100644 index 000000000000..6697ad737132 --- /dev/null +++ b/devel/fxdiv/Makefile @@ -0,0 +1,33 @@ +# $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> diff --git a/devel/fxdiv/distinfo b/devel/fxdiv/distinfo new file mode 100644 index 000000000000..31e102947194 --- /dev/null +++ b/devel/fxdiv/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1566067960 +SHA256 (Maratyszcza-FXdiv-g20181121-f8c5354_GH0.tar.gz) = 94258c95f737916127ab70df1aa79d39575ed48dc6d23155a89747122d5d7797 +SIZE (Maratyszcza-FXdiv-g20181121-f8c5354_GH0.tar.gz) = 8792 diff --git a/devel/fxdiv/pkg-descr b/devel/fxdiv/pkg-descr new file mode 100644 index 000000000000..bb9d6123d9ea --- /dev/null +++ b/devel/fxdiv/pkg-descr @@ -0,0 +1,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 |