Skip to content

Commit

Permalink
Fixed doc & made readme more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Clonkk committed Jul 24, 2020
1 parent cedba26 commit 5bc9d4d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion doc/fftw3.html
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-06-10 12:19:53 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2020-07-24 10:10:07 UTC</small>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions tests/test1.nim
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ 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

test "fftw_plan_dft ifft(fft(x)) compared to original data":
check compare(randData, orig.map(x => x.re))

fftw_destroy_plan(fft)
fftw_destroy_plan(ifft)

main()

0 comments on commit 5bc9d4d

Please sign in to comment.