new file: projects/fftw.org/package.yml

new file:   projects/fftw.org/fftw.c
This commit is contained in:
andrejrabcenko 2023-09-25 01:07:46 +03:00 committed by Jacob Heider
parent d36d643923
commit 4196133e22
2 changed files with 59 additions and 0 deletions

14
projects/fftw.org/fftw.c Normal file
View 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;
}

View 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