Bug 268292 - [New port] math/vdt: Fast and inline implementations of mathematical functions
Summary: [New port] math/vdt: Fast and inline implementations of mathematical functions
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Nuno Teixeira
URL: https://github.com/dpiparo/vdt
Keywords:
Depends on:
Blocks: 267717
  Show dependency treegraph
 
Reported: 2022-12-10 10:48 UTC by Erik Jensen
Modified: 2022-12-26 08:19 UTC (History)
2 users (show)

See Also:


Attachments
shar archive containing the port files (3.44 KB, text/plain)
2022-12-10 10:48 UTC, Erik Jensen
no flags Details
vdt reformated v0 (3.04 KB, patch)
2022-12-25 09:45 UTC, Nuno Teixeira
erik: maintainer-approval+
Details | Diff
vdt reformated again (2.03 KB, patch)
2022-12-25 12:20 UTC, Erik Jensen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Jensen 2022-12-10 10:48:25 UTC
Created attachment 238683 [details]
shar archive containing the port files

Port of a small library, vdt, which implements fast, inline definitions of common mathematical functions.
The source is located at https://github.com/dpiparo/vdt.

I have prepared this port, as it is a prerequisite for the resurrection of devel/root, which I have submitted at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267717
Comment 1 Erik Jensen 2022-12-10 10:58:30 UTC
(In reply to Erik Jensen from comment #0)

A small extra note: The port passed a `poudriere testport` on the 2022Q4 branch on my end.
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-25 09:45:59 UTC
Created attachment 239014 [details]
vdt reformated v0

- fixed WWW
- pet portlint, portclippy and portfmt
- removed python from USES
- removed DIST_SUBDIR since distribution file is versioned
- removed GH_TAGNAME since DISTVERSIONPREFIX+DISTVERSION fetches needed distfile
- removed AMD64 build only restriction because it builds on i386 and maybe other 32 bit archs as well
- removed USE_LDCONFIG, poudriere testport is not complaining about it

Test it and if it is good to commit put a approval flag on diff.

Cheers
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-25 09:48:12 UTC
(In reply to Nuno Teixeira from comment #2)
(...)

pkg-descr is related to devel/root port and a new description needs to be created to this port:

---
vectorised math

    A collection of fast and inline implementations of mathematical functions.
    The functions can be used in autovectorised loops.
    Double and single precision implementations are available.
    No overhead present, no intrinsics used.
    A scalar (T(T)) and array signature (void(const unsigned int,T*,T*)) are provided.

Born and developed at CERN, it is used, among the others, by LHC experiments and the Geant4 simulation toolkit.

Much of the VDT code is inspired by the well known Cephes mathematical library.
---
for example.
Comment 4 Erik Jensen 2022-12-25 12:15:01 UTC
Comment on attachment 239014 [details]
vdt reformated v0

>diff --git a/math/vdt/Makefile b/math/vdt/Makefile
>new file mode 100644
>index 000000000000..91a154e5d92b
>--- /dev/null
>+++ b/math/vdt/Makefile
>@@ -0,0 +1,19 @@
>+PORTNAME=	vdt
>+DISTVERSIONPREFIX=	v
>+DISTVERSION=	0.4.4
>+CATEGORIES=	math devel science
>+
>+MAINTAINER=	erik@tenku.dk
>+COMMENT=	Fast and inline implementations of mathematical functions
>+WWW=		https://github.com/dpiparo/vdt
>+
>+LICENSE=	LGPL3+
>+LICENSE_FILE=	${WRKSRC}/Licence.txt
>+
>+USES=		cmake
>+USE_GITHUB=	yes
>+GH_ACCOUNT=	dpiparo
>+
>+CMAKE_OFF=	SSE
>+
>+.include <bsd.port.mk>
>diff --git a/math/vdt/distinfo b/math/vdt/distinfo
>new file mode 100644
>index 000000000000..67c3424ab6ac
>--- /dev/null
>+++ b/math/vdt/distinfo
>@@ -0,0 +1,3 @@
>+TIMESTAMP = 1671959994
>+SHA256 (dpiparo-vdt-v0.4.4_GH0.tar.gz) = 8b1664b45ec82042152f89d171dd962aea9bb35ac53c8eebb35df1cb9c34e498
>+SIZE (dpiparo-vdt-v0.4.4_GH0.tar.gz) = 59957
>diff --git a/math/vdt/pkg-descr b/math/vdt/pkg-descr
>new file mode 100644
>index 000000000000..4a3de4d23c5a
>--- /dev/null
>+++ b/math/vdt/pkg-descr
>@@ -0,0 +1,10 @@
>+vectorised math:
>+  - A collection of fast and inline implementations of mathematical functions.
>+  - The functions can be used in autovectorised loops.
>+  - Double and single precision implementations are available.
>+  - No overhead present, no intrinsics used.
>+  - A scalar (T(T)) and array signature (void(const unsigned int,T*,T*)) are provided.
>+
>+Born and developed at CERN, it is used, among the others, by LHC experiments and the Geant4 simulation toolkit.
>+
>+Much of the VDT code is inspired by the well known Cephes mathematical library.
>diff --git a/math/vdt/pkg-plist b/math/vdt/pkg-plist
>new file mode 100644
>index 000000000000..dec5a69b02ec
>--- /dev/null
>+++ b/math/vdt/pkg-plist
>@@ -0,0 +1,16 @@
>+include/vdt/asin.h
>+include/vdt/atan.h
>+include/vdt/tanh.h
>+include/vdt/atan2.h
>+include/vdt/cos.h
>+include/vdt/exp.h
>+include/vdt/identity.h
>+include/vdt/inv.h
>+include/vdt/log.h
>+include/vdt/sincos.h
>+include/vdt/sin.h
>+include/vdt/sqrt.h
>+include/vdt/tan.h
>+include/vdt/vdtcore_common.h
>+include/vdt/vdtMath.h
>+lib/libvdt.so
Comment 5 Erik Jensen 2022-12-25 12:20:36 UTC
Created attachment 239018 [details]
vdt reformated again
Comment 6 Erik Jensen 2022-12-25 12:24:45 UTC
Attempted putting approval flag on Nuno's diff and making a more appropriate pkg-descr at the same time.
Attached a new diff with the same content, just in case.

Thanks Nuno for the keen eye and apologies for the oversight of the pkg-descr file.
I have tested the patch with the updated Makefile and everything works.
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-12-26 08:18:36 UTC
A commit in branch main references this bug:

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

commit acfc52ae2cea4108d8b45034ae0146e8d4a03f0f
Author:     Erik Jensen <erik@tenku.dk>
AuthorDate: 2022-12-26 08:13:22 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-26 08:16:37 +0000

    math/vdt: New port: Fast and inline implementations of mathematical functions

    vectorised math:
     - A collection of fast and inline implementations of mathematical functions.
     - The functions can be used in autovectorised loops.
     - Double and single precision implementations are available.
     - No overhead present, no intrinsics used.
     - A scalar (T(T)) and array signature (void(const unsigned int,T*,T*))
       are provided.

    Born and developed at CERN, it is used, among the others, by LHC
    experiments and the Geant4 simulation toolkit.

    Much of the VDT code is inspired by the well known Cephes mathematical
    library.

    WWW:            https://github.com/dpiparo/vdt
    PR:             267717, 268292

 math/Makefile            |  1 +
 math/vdt/Makefile (new)  | 19 +++++++++++++++++++
 math/vdt/distinfo (new)  |  3 +++
 math/vdt/pkg-descr (new) | 13 +++++++++++++
 math/vdt/pkg-plist (new) | 16 ++++++++++++++++
 5 files changed, 52 insertions(+)
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-26 08:19:11 UTC
Committed, thanks!