Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Nov 2021 17:56:01 GMT
From:      Thierry Thomas <thierry@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 55a132b6f601 - main - math/libdivide: adding a library for optimized integer division
Message-ID:  <202111281756.1ASHu1Qt021023@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=55a132b6f601f15bf932a9516aeddc3385689991

commit 55a132b6f601f15bf932a9516aeddc3385689991
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2021-11-28 16:26:03 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2021-11-28 17:55:56 +0000

    math/libdivide: adding a library for optimized integer division
    
    To be used by math/primecount.
---
 math/Makefile            |  1 +
 math/libdivide/Makefile  | 26 ++++++++++++++++++++++++++
 math/libdivide/distinfo  |  3 +++
 math/libdivide/pkg-descr | 11 +++++++++++
 4 files changed, 41 insertions(+)

diff --git a/math/Makefile b/math/Makefile
index 6a9063d94961..5341be1e6987 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -398,6 +398,7 @@
     SUBDIR += libRmath
     SUBDIR += libbraiding
     SUBDIR += libccd
+    SUBDIR += libdivide
     SUBDIR += libflame
     SUBDIR += libhomfly
     SUBDIR += libmesh
diff --git a/math/libdivide/Makefile b/math/libdivide/Makefile
new file mode 100644
index 000000000000..689e0e917306
--- /dev/null
+++ b/math/libdivide/Makefile
@@ -0,0 +1,26 @@
+# Created by: thierry@pompo.net
+
+PORTNAME=	libdivide
+DISTVERSION=	5.0
+CATEGORIES=	math
+
+MAINTAINER=	thierry@FreeBSD.org
+COMMENT=	Fast prime counting function implementations
+
+LICENSE=	ZLIB BSL
+LICENSE_COMB=	multi
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	ridiculousfish
+
+USES=		cmake compiler:c++11-lang
+NO_ARCH=	yes
+
+PLIST_FILES=	include/libdivide.h	\
+		lib/cmake/libdivide/libdivideConfig.cmake	\
+		lib/cmake/libdivide/libdivideConfigVersion.cmake
+
+do-test:
+	${CONFIGURE_WRKSRC}/tester
+
+.include <bsd.port.mk>
diff --git a/math/libdivide/distinfo b/math/libdivide/distinfo
new file mode 100644
index 000000000000..ac6777060bdd
--- /dev/null
+++ b/math/libdivide/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1638115355
+SHA256 (ridiculousfish-libdivide-5.0_GH0.tar.gz) = 01ffdf90bc475e42170741d381eb9cfb631d9d7ddac7337368bcd80df8c98356
+SIZE (ridiculousfish-libdivide-5.0_GH0.tar.gz) = 680611
diff --git a/math/libdivide/pkg-descr b/math/libdivide/pkg-descr
new file mode 100644
index 000000000000..a65331c7f6bf
--- /dev/null
+++ b/math/libdivide/pkg-descr
@@ -0,0 +1,11 @@
+libdivide allows you to replace expensive integer divides with comparatively
+cheap multiplication and bitshifts. Compilers usually do this, but only when the
+divisor is known at compile time. libdivide allows you to take advantage of it
+at runtime. The result is that integer division can become faster - a lot
+faster.
+
+Furthermore, libdivide allows you to divide SIMD vectors by runtime constants,
+which is especially nice because SIMD typically lacks integer division.
+
+WWW: https://libdivide.com/
+WWW: https://github.com/ridiculousfish/libdivide/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111281756.1ASHu1Qt021023>