diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2021-07-29 16:41:35 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-07-29 21:54:55 +0200 |
commit | 1daa66272258231f9fcbd9929ba42c688861b842 (patch) | |
tree | b32b2a07bcdf2c6b18df0f27fd23245e4d542db1 /gnu/packages/maths.scm | |
parent | 065d45e8a1c3af31889df53d6feb49973814009c (diff) | |
download | guix-1daa66272258231f9fcbd9929ba42c688861b842.tar.gz |
gnu: Add FP16.
* gnu/packages/patches/fp16-system-libraries.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/maths.scm (fp16): New variable.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r-- | gnu/packages/maths.scm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index e170fd4db9..1afe72659a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -6688,3 +6688,33 @@ 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.") (license license:expat)))) + +(define-public fp16 + ;; There is currently no tag in this repo. + (let ((commit "0a92994d729ff76a58f692d3028ca1b64b145d91") + (version "0.0") + (revision "1")) + (package + (name "fp16") + (version (git-version version revision commit)) + (home-page "https://github.com/Maratyszcza/FP16") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "05mm4vrxsac35hjf5djif9r6rdxj9ippg97ia3p6q6b8lrp7srwv")) + (patches (search-patches "fp16-system-libraries.patch")))) + (build-system cmake-build-system) + (native-inputs + `(("python-wrapper" ,python-wrapper))) + (inputs + `(("psimd" ,psimd) + ("googletest" ,googletest) + ("googlebenchmark" ,googlebenchmark))) + (synopsis "C++ library for half-precision floating point formats") + (description + "This header-only C++ library implements conversion to and from +half-precision floating point formats.") + (license license:expat)))) |