From 5bc9d4d4485936493cfb3dc91d49d685d45aa932 Mon Sep 17 00:00:00 2001 From: Regis Caillaud Date: Fri, 24 Jul 2020 12:10:41 +0200 Subject: [PATCH] Fixed doc & made readme more clear --- README.md | 16 +++++++++++++--- doc/fftw3.html | 2 +- tests/test1.nim | 3 +++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f30561f..001b720 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,19 @@ -Nim bindings to the FFTW3 library. +Nim bindings to the FFTW3 library, to compute Fourier transforms of various kinds with high performance. -Read the doc : https://clonkk.github.io/nimfftw3/doc/fftw3.html +# Installation -Set of Nim bindings to the excellent FFTW library, to compute Fourier transforms of various kinds with high performance. +Use nimble `nimble install fftw3` to install the latest released version + +# Usage + +I advise to read the fftw documentation : + +You can find the generated documentation here with the complete API and examples : https://clonkk.github.io/nimfftw3/doc/fftw3.html + +# History These bindings were originally generated here : https://github.com/ziotom78/nimfftw3/blob/master/fftw3.nim +# License + These bindings are released under a LGPL license. FFTW3 is released under a GPLv2 or above license. diff --git a/doc/fftw3.html b/doc/fftw3.html index 9f53edf..37167d6 100644 --- a/doc/fftw3.html +++ b/doc/fftw3.html @@ -1440,7 +1440,7 @@

Procs

diff --git a/tests/test1.nim b/tests/test1.nim index 40ccdc5..432f7d8 100644 --- a/tests/test1.nim +++ b/tests/test1.nim @@ -30,6 +30,8 @@ proc main()= var orig = newTensor[Complex64](dims) let ifft = fftw_plan_dft(output, orig, FFTW_BACKWARD, FFTW_ESTIMATE) fftw_execute_dft(ifft, output, orig) + + # FFTW does not normalize inverse fft let size = complex(orig.size.float64) orig = orig /. size @@ -37,5 +39,6 @@ proc main()= check compare(randData, orig.map(x => x.re)) fftw_destroy_plan(fft) + fftw_destroy_plan(ifft) main()