mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
new file: projects/fftw.org/package.yml
new file: projects/fftw.org/fftw.c
This commit is contained in:
parent
d36d643923
commit
4196133e22
2 changed files with 59 additions and 0 deletions
14
projects/fftw.org/fftw.c
Normal file
14
projects/fftw.org/fftw.c
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#include <fftw3.h>
|
||||||
|
int main(int argc, char* *argv)
|
||||||
|
{
|
||||||
|
fftw_complex *in, *out;
|
||||||
|
fftw_plan p;
|
||||||
|
long N = 1;
|
||||||
|
in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
|
||||||
|
out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N);
|
||||||
|
p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE);
|
||||||
|
fftw_execute(p); /* repeat as needed */
|
||||||
|
fftw_destroy_plan(p);
|
||||||
|
fftw_free(in); fftw_free(out);
|
||||||
|
return 0;
|
||||||
|
}
|
45
projects/fftw.org/package.yml
Normal file
45
projects/fftw.org/package.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
distributable:
|
||||||
|
url: https://fftw.org/fftw-{{version}}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
versions:
|
||||||
|
url: https://fftw.org/download.html
|
||||||
|
match: /fftw-\d+\.\d+\.\d+\.tar\.gz/
|
||||||
|
strip:
|
||||||
|
- /^fftw-/
|
||||||
|
- /\.tar\.gz/
|
||||||
|
dependencies:
|
||||||
|
open-mpi.org: '*'
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
freedesktop.org/pkg-config: '*'
|
||||||
|
script:
|
||||||
|
- ./configure --enable-single $ARGS
|
||||||
|
- make --jobs {{hw.concurrency}} install
|
||||||
|
- make clean
|
||||||
|
- ./configure $ARGS
|
||||||
|
- make --jobs {{hw.concurrency}} install
|
||||||
|
- make clean
|
||||||
|
- ./configure --enable-long-double $ARGS
|
||||||
|
- make --jobs {{hw.concurrency}} install
|
||||||
|
env:
|
||||||
|
CC: "{{deps.tea.xyz/gx/cc.prefix}}/bin/clang"
|
||||||
|
ARGS:
|
||||||
|
- --enable-shared
|
||||||
|
- --disable-debug
|
||||||
|
- --prefix={{prefix}}
|
||||||
|
- --enable-threads
|
||||||
|
- --disable-dependency-tracking
|
||||||
|
provides:
|
||||||
|
- bin/fftw-wisdom
|
||||||
|
- bin/fftw-wisdom-to-conf
|
||||||
|
- bin/fftwf-wisdom
|
||||||
|
- bin/fftwl-wisdom
|
||||||
|
test:
|
||||||
|
dependencies:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
script:
|
||||||
|
- fftw-wisdom --version | grep {{version}}
|
||||||
|
- cc -o fftw fftw.c -lfftw3
|
||||||
|
- ./fftw
|
Loading…
Reference in a new issue