annotate src/fftw-3.3.5/mpi/f03-wrap.sh @ 71:388bd4da45bf
Opus build for Windows (MinGW)
author |
Chris Cannam |
date |
Fri, 25 Jan 2019 13:49:03 +0000 |
parents |
2cd0e3b3e1fd |
children |
|
rev |
line source |
Chris@42
|
1 #! /bin/sh
|
Chris@42
|
2
|
Chris@42
|
3 # Script to generate Fortran 2003 wrappers for FFTW's MPI functions. This
|
Chris@42
|
4 # is necessary because MPI provides no way to deal with C MPI_Comm handles
|
Chris@42
|
5 # from Fortran (where MPI_Comm == integer), but does provide a way to
|
Chris@42
|
6 # deal with Fortran MPI_Comm handles from C (via MPI_Comm_f2c). So,
|
Chris@42
|
7 # every FFTW function that takes an MPI_Comm argument needs a wrapper
|
Chris@42
|
8 # function that takes a Fortran integer and converts it to MPI_Comm.
|
Chris@42
|
9
|
Chris@42
|
10 echo "/* Generated automatically. DO NOT EDIT! */"
|
Chris@42
|
11 echo
|
Chris@42
|
12
|
Chris@42
|
13 echo "#include \"fftw3-mpi.h\""
|
Chris@42
|
14 echo "#include \"ifftw-mpi.h\""
|
Chris@42
|
15 echo
|
Chris@42
|
16
|
Chris@42
|
17 # Declare prototypes using FFTW_EXTERN, important for Windows DLLs
|
Chris@42
|
18 grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl | grep "MPI_Fint" | sed 's/^/FFTW_EXTERN /;s/$/;/'
|
Chris@42
|
19
|
Chris@42
|
20 grep -v 'mpi.h' fftw3-mpi.h | gcc -E - |grep "fftw_mpi_init" |tr ';' '\n' | grep "MPI_Comm" | perl genf03-wrap.pl
|
Chris@42
|
21
|
Chris@42
|
22
|