From nobody Wed Jul 19 09:24:18 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R5Vkq0Qyfz4dTnw; Wed, 19 Jul 2023 09:24:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R5Vkp6r87z46jn; Wed, 19 Jul 2023 09:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689758659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0bdipXBzm2aG54Gp+mETJ9Y5J1HnuWPAKigP5z1nBw=; b=TQNjTOnwrLpN5sUNT2IqTV33v1Sl/noDRkFeNdm8D6c4ZAq8C2qLVGYJkK05mPKFcxBcyW 6LZRRzzWUv32B/YD+V1TKo7tKdswmSVaA3gXLsFS5OrRVnn5PuDsCHt7XJ9QNKgdH923PQ d/R8sr7WOnwn0zZ8eyxg7PEHvMVZACTpQIVl6AAiFJOcfLlXcYcRYi4a/danK2YJsOQr2t LFkgiecRatEwFznheUNfqbzvoaHJhx06Rd9FCLir/xT93dpZwz0bPaqnq77WRSNwr4N20s G3C2iSKFffx+DzegQOMIgnRMz6Zj1nVqI7nczPfBlhhLsjeFjY7AvOv5hjkMAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689758659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f0bdipXBzm2aG54Gp+mETJ9Y5J1HnuWPAKigP5z1nBw=; b=mzgdB1Y925/RnjPYbE4PbisCoU/jpMtuZAwMkRQ6FLNcSmtW+rVX4Av+OQjksU6Va9xnH/ rnBhPhbpXj+/J+VcBdIzXenQfdLFn6NDgJJpQAXVg1wHH7aLO/LUaDW9zOoh57xZJeUi8G iMxJ+bEc2wMPHjB2mQhDgx/xDL2qC88vgo39MCerM8j2pr7u3zvdYqdlBG08BZElhxFuBp MYU2OTbYGFbaTX8gYTh1s6MrS+TFxLEhChzL1TkhBDBVfvjvS5PffjYD+1W4YDrmg769tZ Uu6ZOwbEZ0eztXaPbIhjmjZNr1KFUTgipHuc1zKynPCNbRO1GDHqzEH5HTufMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689758659; a=rsa-sha256; cv=none; b=RM8mCZdIblBM+GuHwPxBPHy786DWF+efpcx3K7QK7Tbssu2qk0KRKSHw5jp/AZyi/K1gTR dQKxEUU8B+yOuL6VEMfMnlZoVW0Qd3Ntx5C5P4Nb9tD4N6iBIG/8fJtF8+yM390ViCp5p0 s1GkcAH+bRpatG/1AcPxU0W3qJz3idpUDt+RQ6tGALCUDPSWja+sLYImU7sNtGXyilaeN7 58bNSDO1Fml6EYp8tlS5ztObyQrfDJPTvzQU6JBA+PSTfwnMkiZXnJaybdrfM9e1t5tOwL v+Xpu3eCL/dk9tdZo3Hibhms9c0C3E+nWAXvBvve1qW8eWNJ9LuGjWtI/hWvdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R5Vkp5f5Rzj8H; Wed, 19 Jul 2023 09:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36J9OIWQ021010; Wed, 19 Jul 2023 09:24:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36J9OIWk021009; Wed, 19 Jul 2023 09:24:18 GMT (envelope-from git) Date: Wed, 19 Jul 2023 09:24:18 GMT Message-Id: <202307190924.36J9OIWk021009@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 8d4414cedb42 - main - math/clad: New port: Automatic differentiation for C/C++ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d4414cedb428a93d67444dffb01abaef739d28a Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=8d4414cedb428a93d67444dffb01abaef739d28a commit 8d4414cedb428a93d67444dffb01abaef739d28a Author: Yuri Victorovich AuthorDate: 2023-07-18 13:55:24 +0000 Commit: Yuri Victorovich CommitDate: 2023-07-19 09:24:16 +0000 math/clad: New port: Automatic differentiation for C/C++ --- math/Makefile | 1 + math/clad/Makefile | 23 ++++++++++++++++++++++ math/clad/distinfo | 3 +++ math/clad/files/patch-CMakeLists.txt | 19 ++++++++++++++++++ math/clad/pkg-descr | 6 ++++++ math/clad/pkg-plist | 37 ++++++++++++++++++++++++++++++++++++ 6 files changed, 89 insertions(+) diff --git a/math/Makefile b/math/Makefile index 4ef0d27252f9..208191e8ea97 100644 --- a/math/Makefile +++ b/math/Makefile @@ -223,6 +223,7 @@ SUBDIR += chryzodus SUBDIR += chuffed SUBDIR += cimod + SUBDIR += clad SUBDIR += clasp SUBDIR += clblas SUBDIR += clblast diff --git a/math/clad/Makefile b/math/clad/Makefile new file mode 100644 index 000000000000..3d91651338d7 --- /dev/null +++ b/math/clad/Makefile @@ -0,0 +1,23 @@ +PORTNAME= clad +DISTVERSIONPREFIX= v +DISTVERSION= 1.2 +CATEGORIES= math + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Automatic differentiation for C/C++ +WWW= https://github.com/vgvassilev/clad + +LICENSE= LGPL3 +LICENSE_FILE= ${WRKSRC}/License.txt + +USES= cmake compiler:c++14-lang llvm:15,build,run +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= vgvassilev + +CMAKE_ARGS= -DClang_DIR=${LLVM_PREFIX}/lib/cmake/clang \ + -DLLVM_DIR=${LLVM_PREFIX}/lib/cmake/llvm +CMAKE_ON= BUILD_SHARED_LIBS + +.include diff --git a/math/clad/distinfo b/math/clad/distinfo new file mode 100644 index 000000000000..b2b8e00aab64 --- /dev/null +++ b/math/clad/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1689756219 +SHA256 (vgvassilev-clad-v1.2_GH0.tar.gz) = 35dd72349553acfe7cd66938bdd097cf86c6dc3ac71b1379ec6d0908a4fae08f +SIZE (vgvassilev-clad-v1.2_GH0.tar.gz) = 918593 diff --git a/math/clad/files/patch-CMakeLists.txt b/math/clad/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..5bd87e30404d --- /dev/null +++ b/math/clad/files/patch-CMakeLists.txt @@ -0,0 +1,19 @@ +--- CMakeLists.txt.orig 2023-07-19 08:50:39 UTC ++++ CMakeLists.txt +@@ -299,9 +299,13 @@ if (CLAD_INCLUDE_DOCS) + endif() + + if (NOT CLAD_BUILD_STATIC_ONLY) +- add_subdirectory(test) +- add_subdirectory(demos/ErrorEstimation/CustomModel) +- add_subdirectory(demos/ErrorEstimation/PrintModel) ++ if (FREEBSD_BUILD_TESTS) ++ add_subdirectory(test) ++ endif() ++ if (FREEBSD_BUILD_DEMOS) ++ add_subdirectory(demos/ErrorEstimation/CustomModel) ++ add_subdirectory(demos/ErrorEstimation/PrintModel) ++ endif() + + # Add benchmarking infrastructure. + if (CLAD_ENABLE_BENCHMARKS) diff --git a/math/clad/pkg-descr b/math/clad/pkg-descr new file mode 100644 index 000000000000..97f6e87a82c4 --- /dev/null +++ b/math/clad/pkg-descr @@ -0,0 +1,6 @@ +Clad enables automatic differentiation (AD) for C++. It is based on LLVM +compiler infrastructure and is a plugin for Clang compiler. Clad is based on +source code transformation. Given C++ source code of a mathematical function, it +can automatically generate C++ code for computing derivatives of the function. +It supports both forward-mode and reverse-mode AD.Clad has extensive coverage of +modern C++ features and a robust fallback and recovery system in place. diff --git a/math/clad/pkg-plist b/math/clad/pkg-plist new file mode 100644 index 000000000000..1363f7b4609a --- /dev/null +++ b/math/clad/pkg-plist @@ -0,0 +1,37 @@ +include/clad/Differentiator/Array.h +include/clad/Differentiator/ArrayRef.h +include/clad/Differentiator/BaseForwardModeVisitor.h +include/clad/Differentiator/BuiltinDerivatives.h +include/clad/Differentiator/CladConfig.h +include/clad/Differentiator/CladUtils.h +include/clad/Differentiator/Compatibility.h +include/clad/Differentiator/DerivativeBuilder.h +include/clad/Differentiator/DiffMode.h +include/clad/Differentiator/DiffPlanner.h +include/clad/Differentiator/Differentiator.h +include/clad/Differentiator/ErrorEstimator.h +include/clad/Differentiator/EstimationModel.h +include/clad/Differentiator/ExternalRMVSource.h +include/clad/Differentiator/ForwardModeVisitor.h +include/clad/Differentiator/FunctionTraits.h +include/clad/Differentiator/HessianModeVisitor.h +include/clad/Differentiator/JacobianModeVisitor.h +include/clad/Differentiator/MultiplexExternalRMVSource.h +include/clad/Differentiator/NumericalDiff.h +include/clad/Differentiator/ParseDiffArgsTypes.h +include/clad/Differentiator/ReverseModeVisitor.h +include/clad/Differentiator/ReverseModeVisitorDirectionKinds.h +include/clad/Differentiator/STLBuiltins.h +include/clad/Differentiator/StmtClone.h +include/clad/Differentiator/Tape.h +include/clad/Differentiator/VectorForwardModeVisitor.h +include/clad/Differentiator/Version.h +include/clad/Differentiator/VisitorBase.h +include/clad/tools/ClangBackendPlugin.h +include/clad/tools/ClangPlugin.h +include/clad/tools/DerivedFnInfo.h +lib/clad.so +lib/libcladDifferentiator.so +lib/libcladDifferentiator.so.15 +lib/libcladPlugin.so +lib/libcladPlugin.so.15