Subject: [bug#58261] [PATCH 02/11] gnu: Add pocketfft.

From: Liliana Marie Prikler <[email-masked]>
Date: Tue, 04 Oct 2022 09:09:25 +0200

Am Montag, dem 03.10.2022 um 00:19 +0000 schrieb David Elsing:
> * gnu/packages/cpp.scm (pocketfft): New variable.
> ---
>  gnu/packages/cpp.scm | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index e597dba40c..65df317100 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -1931,3 +1931,29 @@ (define-public fast-float
>      (description "@code{fast_float} is a header-only C++ library
> which provides fast
>  implementations of the from_chars functions for float and double
> types.")
>      (license (list license:asl2.0 license:expat)))) ; dual licensed
> +
> +(define-public pocketfft
> +  (let ((commit "daa8bb18327bc5c7d22c69428c25cf5dc64167d3")
> (revision "0"))
Split into two lines
> +    (package
> +      (name "pocketfft")
> +      (version (git-version "0.0.0" revision commit))
I'd simply use "0", but YMMV.
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/mreineck/pocketfft")
Note that there's also https://gitlab.mpcdf.mpg.de/mtr/pocketfft which
is C99-compliant.  
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                 
> "1dbkkqkmkxgmz1qjpsqzic5ig3qw1pqndbb3dvjc7xq5f2rdzyq1"))))
> +      (build-system copy-build-system)
> +      (arguments
> +       (list
> +        #:install-plan
> +        #~'(("pocketfft_hdronly.h" "include/"))))
> +      (home-page "https://github.com/mreineck/pocketfft")
> +      (synopsis "Heavily modified implementation of FFTPack in C++")
I'd write out "Fast Fourier Transformation" and perhaps one or two
other properties, e.g. "Header-only Fast Fourier Transformation
library".
> +      (description "This package contains the single-header
> PocketFFT library,
> +which is an reimplementation of FFTPack with several advantages,
> such as
> +multidimensional algorithms, different datatypes and vector
> instructions.")
"This package provides a single-header C++11 library for computing Fast
Fourier transformations.  It supports multidimensional arrays,
different floating point sizes and complex transformations."  As for
the vector instructions, we should convert the #ifndef
POCKETFFT_NO_VECTORS checks to #if POCKETFFT_NO_VECTORS and insert a
check that defines it to 1 if unset (for reproducibility of other
packages).
> +      (license license:bsd-3))))

Cheers