Updates
26
fftw-3.3.10/doc/FAQ/Makefile.am
Normal file
@@ -0,0 +1,26 @@
|
||||
BFNNCONV_SRC = bfnnconv.pl m-ascii.pl m-html.pl m-info.pl m-lout.pl m-post.pl
|
||||
|
||||
FAQ = fftw-faq.ascii fftw-faq.html
|
||||
EXTRA_DIST = fftw-faq.bfnn $(FAQ) $(BFNNCONV_SRC) html.refs
|
||||
|
||||
html.refs2: html.refs
|
||||
cp -f ${srcdir}/html.refs html.refs2
|
||||
|
||||
fftw-faq.ascii: fftw-faq.html
|
||||
|
||||
# generates both fftw-faq.html and fftw-faq.ascii
|
||||
fftw-faq.html: $(BFNNCONV_SRC) fftw-faq.bfnn html.refs2
|
||||
@echo converting...
|
||||
perl -I${srcdir} ${srcdir}/bfnnconv.pl < ${srcdir}/fftw-faq.bfnn
|
||||
@echo converting again...
|
||||
perl -I${srcdir} ${srcdir}/bfnnconv.pl < ${srcdir}/fftw-faq.bfnn
|
||||
rm -f fftw-faq.ascii
|
||||
mv stdin.ascii fftw-faq.ascii
|
||||
rm -rf fftw-faq.html
|
||||
mv -f stdin.html fftw-faq.html
|
||||
|
||||
faq: $(FAQ)
|
||||
|
||||
clean-local:
|
||||
rm -f *~ core a.out *.lout *.ps *.info *.ascii *.xrefdb *.post
|
||||
rm -rf *.html html.refs2
|
||||
506
fftw-3.3.10/doc/FAQ/Makefile.in
Normal file
@@ -0,0 +1,506 @@
|
||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc/FAQ
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_mpi.m4 \
|
||||
$(top_srcdir)/m4/acx_pthread.m4 \
|
||||
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
|
||||
$(top_srcdir)/m4/ax_check_compiler_flags.m4 \
|
||||
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_aligns_stack.m4 \
|
||||
$(top_srcdir)/m4/ax_gcc_version.m4 \
|
||||
$(top_srcdir)/m4/ax_openmp.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALTIVEC_CFLAGS = @ALTIVEC_CFLAGS@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AVX2_CFLAGS = @AVX2_CFLAGS@
|
||||
AVX512_CFLAGS = @AVX512_CFLAGS@
|
||||
AVX_128_FMA_CFLAGS = @AVX_128_FMA_CFLAGS@
|
||||
AVX_CFLAGS = @AVX_CFLAGS@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CHECK_PL_OPTS = @CHECK_PL_OPTS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
C_FFTW_R2R_KIND = @C_FFTW_R2R_KIND@
|
||||
C_MPI_FINT = @C_MPI_FINT@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
FLIBS = @FLIBS@
|
||||
GREP = @GREP@
|
||||
INDENT = @INDENT@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
KCVI_CFLAGS = @KCVI_CFLAGS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBQUADMATH = @LIBQUADMATH@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPICC = @MPICC@
|
||||
MPILIBS = @MPILIBS@
|
||||
MPIRUN = @MPIRUN@
|
||||
NEON_CFLAGS = @NEON_CFLAGS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OCAMLBUILD = @OCAMLBUILD@
|
||||
OPENMP_CFLAGS = @OPENMP_CFLAGS@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POW_LIB = @POW_LIB@
|
||||
PRECISION = @PRECISION@
|
||||
PREC_SUFFIX = @PREC_SUFFIX@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHARED_VERSION_INFO = @SHARED_VERSION_INFO@
|
||||
SHELL = @SHELL@
|
||||
SSE2_CFLAGS = @SSE2_CFLAGS@
|
||||
STACK_ALIGN_CFLAGS = @STACK_ALIGN_CFLAGS@
|
||||
STRIP = @STRIP@
|
||||
THREADLIBS = @THREADLIBS@
|
||||
VERSION = @VERSION@
|
||||
VSX_CFLAGS = @VSX_CFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
acx_pthread_config = @acx_pthread_config@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
runstatedir = @runstatedir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
BFNNCONV_SRC = bfnnconv.pl m-ascii.pl m-html.pl m-info.pl m-lout.pl m-post.pl
|
||||
FAQ = fftw-faq.ascii fftw-faq.html
|
||||
EXTRA_DIST = fftw-faq.bfnn $(FAQ) $(BFNNCONV_SRC) html.refs
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/FAQ/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/FAQ/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
clean-local cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
html.refs2: html.refs
|
||||
cp -f ${srcdir}/html.refs html.refs2
|
||||
|
||||
fftw-faq.ascii: fftw-faq.html
|
||||
|
||||
# generates both fftw-faq.html and fftw-faq.ascii
|
||||
fftw-faq.html: $(BFNNCONV_SRC) fftw-faq.bfnn html.refs2
|
||||
@echo converting...
|
||||
perl -I${srcdir} ${srcdir}/bfnnconv.pl < ${srcdir}/fftw-faq.bfnn
|
||||
@echo converting again...
|
||||
perl -I${srcdir} ${srcdir}/bfnnconv.pl < ${srcdir}/fftw-faq.bfnn
|
||||
rm -f fftw-faq.ascii
|
||||
mv stdin.ascii fftw-faq.ascii
|
||||
rm -rf fftw-faq.html
|
||||
mv -f stdin.html fftw-faq.html
|
||||
|
||||
faq: $(FAQ)
|
||||
|
||||
clean-local:
|
||||
rm -f *~ core a.out *.lout *.ps *.info *.ascii *.xrefdb *.post
|
||||
rm -rf *.html html.refs2
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
298
fftw-3.3.10/doc/FAQ/bfnnconv.pl
Executable file
@@ -0,0 +1,298 @@
|
||||
#!/usr/bin/perl --
|
||||
# Copyright (C) 1993-1995 Ian Jackson.
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# It is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# (Note: I do not consider works produced using these BFNN processing
|
||||
# tools to be derivative works of the tools, so they are NOT covered
|
||||
# by the GPL. However, I would appreciate it if you credited me if
|
||||
# appropriate in any documents you format using BFNN.)
|
||||
|
||||
@outputs=('ascii','info','html');
|
||||
|
||||
while ($ARGV[0] =~ m/^\-/) {
|
||||
$_= shift(@ARGV);
|
||||
if (m/^-only/) {
|
||||
@outputs= (shift(@ARGV));
|
||||
} else {
|
||||
warn "unknown option `$_' ignored";
|
||||
}
|
||||
}
|
||||
|
||||
$prefix= $ARGV[0];
|
||||
$prefix= 'stdin' unless length($prefix);
|
||||
$prefix =~ s/\.bfnn$//;
|
||||
|
||||
if (open(O,"$prefix.xrefdb")) {
|
||||
@xrefdb= <O>;
|
||||
close(O);
|
||||
} else {
|
||||
warn "no $prefix.xrefdb ($!)";
|
||||
}
|
||||
|
||||
$section= -1;
|
||||
for $thisxr (@xrefdb) {
|
||||
$_= $thisxr;
|
||||
chop;
|
||||
if (m/^Q (\w+) ((\d+)\.(\d+)) (.*)$/) {
|
||||
$qrefn{$1}= $2;
|
||||
$qreft{$1}= $5;
|
||||
$qn2ref{$3,$4}= $1;
|
||||
$maxsection= $3;
|
||||
$maxquestion[$3]= $4;
|
||||
} elsif (m/^S (\d+) /) {
|
||||
$maxsection= $1;
|
||||
$sn2title{$1}=$';
|
||||
}
|
||||
}
|
||||
|
||||
open(U,">$prefix.xrefdb-new");
|
||||
|
||||
for $x (@outputs) { require("m-$x.pl"); }
|
||||
|
||||
&call('init');
|
||||
|
||||
while (<>) {
|
||||
chop;
|
||||
next if m/^\\comment\b/;
|
||||
if (!m/\S/) {
|
||||
&call('endpara');
|
||||
next;
|
||||
}
|
||||
if (s/^\\section +//) {
|
||||
$line= $_;
|
||||
$section++; $question=0;
|
||||
print U "S $section $line\n";
|
||||
$|=1; print "S$section",' 'x10,"\r"; $|=0;
|
||||
&call('endpara');
|
||||
&call('startmajorheading',"$section",
|
||||
"Section $section",
|
||||
$section<$maxsection ? "Section ".($section+1) : '',
|
||||
$section>1 ? 'Section '.($section-1) : 'Top');
|
||||
&text($line);
|
||||
&call('endmajorheading');
|
||||
if ($section) {
|
||||
&call('endpara');
|
||||
&call('startindex');
|
||||
for $thisxr (@xrefdb) {
|
||||
$_= $thisxr;
|
||||
chop;
|
||||
if (m/^Q (\w+) (\d+)\.(\d+) (.*)$/) {
|
||||
$ref= $1; $num1= $2; $num2= $3; $text= $4;
|
||||
next unless $num1 == $section;
|
||||
&call('startindexitem',$ref,"Q$num1.$num2","Question $num1.$num2");
|
||||
&text($text);
|
||||
&call('endindexitem');
|
||||
}
|
||||
}
|
||||
&call('endindex');
|
||||
}
|
||||
} elsif (s/^\\question \d{2}[a-z]{3}((:\w+)?) +//) {
|
||||
$line= $_;
|
||||
$question++;
|
||||
$qrefstring= $1;
|
||||
$qrefstring= "q_${section}_$question" unless $qrefstring =~ s/^://;
|
||||
print U "Q $qrefstring $section.$question $line\n";
|
||||
$|=1; print "Q$section.$question",' 'x10,"\r"; $|=0;
|
||||
&call('endpara');
|
||||
&call('startminorheading',$qrefstring,
|
||||
"Question $section.$question",
|
||||
$question < $maxquestion[$section] ? "Question $section.".($question+1) :
|
||||
$section < $maxsection ? "Question ".($section+1).".1" : '',
|
||||
$question > 1 ? "Question $section.".($question-1) :
|
||||
$section > 1 ? "Question ".($section-1).'.'.($maxquestion[$section-1]) :
|
||||
'Top',
|
||||
"Section $section");
|
||||
&text("Question $section.$question. $line");
|
||||
&call('endminorheading');
|
||||
} elsif (s/^\\only +//) {
|
||||
@saveoutputs= @outputs;
|
||||
@outputs=();
|
||||
for $x (split(/\s+/,$_)) {
|
||||
push(@outputs,$x) if grep($x eq $_, @saveoutputs);
|
||||
}
|
||||
} elsif (s/^\\endonly$//) {
|
||||
@outputs= @saveoutputs;
|
||||
} elsif (s/^\\copyto +//) {
|
||||
$fh= $';
|
||||
while(<>) {
|
||||
last if m/^\\endcopy$/;
|
||||
while (s/^([^\`]*)\`//) {
|
||||
print $fh $1;
|
||||
m/([^\\])\`/ || warn "`$_'";
|
||||
$_= $';
|
||||
$cmd= $`.$1;
|
||||
$it= `$cmd`; chop $it;
|
||||
print $fh $it;
|
||||
}
|
||||
print $fh $_;
|
||||
}
|
||||
} elsif (m/\\index$/) {
|
||||
&call('startindex');
|
||||
for $thisxr (@xrefdb) {
|
||||
$_= $thisxr;
|
||||
chop;
|
||||
if (m/^Q (\w+) (\d+\.\d+) (.*)$/) {
|
||||
$ref= $1; $num= $2; $text= $3;
|
||||
&call('startindexitem',$ref,"Q$num","Question $num");
|
||||
&text($text);
|
||||
&call('endindexitem');
|
||||
} elsif (m/^S (\d+) (.*)$/) {
|
||||
$num= $1; $text= $2;
|
||||
next unless $num;
|
||||
&call('startindexmainitem',"s_$num",
|
||||
"Section $num.","Section $num");
|
||||
&text($text);
|
||||
&call('endindexitem');
|
||||
} else {
|
||||
warn $_;
|
||||
}
|
||||
}
|
||||
&call('endindex');
|
||||
} elsif (m/^\\call-(\w+) +(\w+)\s*(.*)$/) {
|
||||
$fn= $1.'_'.$2;
|
||||
eval { &$fn($3); };
|
||||
warn $@ if length($@);
|
||||
} elsif (m/^\\call +(\w+)\s*(.*)$/) {
|
||||
eval { &call($1,$2); };
|
||||
warn $@ if length($@);
|
||||
} elsif (s/^\\set +(\w+)\s*//) {
|
||||
$svalue= $'; $svari= $1;
|
||||
eval("\$user_$svari=\$svalue"); $@ && warn "setting $svalue failed: $@\n";
|
||||
} elsif (m/^\\verbatim$/) {
|
||||
&call('startverbatim');
|
||||
while (<>) {
|
||||
chop;
|
||||
last if m/^\\endverbatim$/;
|
||||
&call('verbatim',$_);
|
||||
}
|
||||
&call('endverbatim');
|
||||
} else {
|
||||
s/\.$/\. /;
|
||||
&text($_." ");
|
||||
}
|
||||
}
|
||||
|
||||
print ' 'x25,"\r";
|
||||
&call('finish');
|
||||
rename("$prefix.xrefdb-new","$prefix.xrefdb") || warn "rename xrefdb: $!";
|
||||
exit 0;
|
||||
|
||||
|
||||
sub text {
|
||||
local($in,$rhs,$word,$refn,$reft,$fn,$style);
|
||||
$in= "$holdover$_[0]";
|
||||
$holdover= '';
|
||||
while ($in =~ m/\\/) {
|
||||
#print STDERR ">$`##$'\n";
|
||||
$rhs=$';
|
||||
&call('text',$`);
|
||||
$_= $rhs;
|
||||
if (m/^\w+ $/) {
|
||||
$holdover= "\\$&";
|
||||
$in= '';
|
||||
} elsif (s/^fn\s+([^\s\\]*\w)//) {
|
||||
$in= $_;
|
||||
$word= $1;
|
||||
&call('courier');
|
||||
&call('text',$word);
|
||||
&call('endcourier');
|
||||
} elsif (s/^tab\s+(\d+)\s+//) {
|
||||
$in= $_; &call('tab',$1);
|
||||
} elsif (s/^nl\s+//) {
|
||||
$in= $_; &call('newline');
|
||||
} elsif (s/^qref\s+(\w+)//) {
|
||||
$refn= $qrefn{$1};
|
||||
$reft= $qreft{$1};
|
||||
if (!length($refn)) {
|
||||
warn "unknown question `$1'";
|
||||
}
|
||||
$in= "$`\\pageref:$1:$refn:$reft\\endpageref.$_";
|
||||
} elsif (s/^pageref:(\w+):([^:\n]+)://) {
|
||||
$in= $_;
|
||||
&call('pageref',$1,$2);
|
||||
} elsif (s/^endpageref\.//) {
|
||||
$in= $_; &call('endpageref');
|
||||
} elsif (s/^(\w+)\{//) {
|
||||
$in= $_; $fn= $1;
|
||||
eval { &call("$fn"); };
|
||||
if (length($@)) { warn $@; $fn= 'x'; }
|
||||
push(@styles,$fn);
|
||||
} elsif (s/^\}//) {
|
||||
$in= $_;
|
||||
$fn= pop(@styles);
|
||||
if ($fn ne 'x') { &call("end$fn"); }
|
||||
} elsif (s/^\\//) {
|
||||
$in= $_;
|
||||
&call('text',"\\");
|
||||
} elsif (s,^(\w+)\s+([-A-Za-z0-9.\@:/]*\w),,) {
|
||||
#print STDERR "**$&**$_\n";
|
||||
$in= $_;
|
||||
$style=$1; $word= $2;
|
||||
&call($style);
|
||||
&call('text',$word);
|
||||
&call("end$style");
|
||||
} else {
|
||||
warn "unknown control `\\$_'";
|
||||
$in= $_;
|
||||
}
|
||||
}
|
||||
&call('text',$in);
|
||||
}
|
||||
|
||||
|
||||
sub call {
|
||||
local ($fnbase, @callargs) = @_;
|
||||
local ($coutput);
|
||||
for $coutput (@outputs) {
|
||||
if ($fnbase eq 'text' && eval("\@${coutput}_cmds")) {
|
||||
#print STDERR "special handling text (@callargs) for $coutput\n";
|
||||
$evstrg= "\$${coutput}_args[\$#${coutput}_args].=\"\@callargs\"";
|
||||
eval($evstrg);
|
||||
length($@) && warn "call adding for $coutput (($evstrg)): $@";
|
||||
} else {
|
||||
$fntc= $coutput.'_'.$fnbase;
|
||||
&$fntc(@callargs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub recurse {
|
||||
local (@outputs) = $coutput;
|
||||
local ($holdover);
|
||||
&text($_[0]);
|
||||
}
|
||||
|
||||
|
||||
sub arg {
|
||||
#print STDERR "arg($_[0]) from $coutput\n";
|
||||
$cmd= $_[0];
|
||||
eval("push(\@${coutput}_cmds,\$cmd); push(\@${coutput}_args,'')");
|
||||
length($@) && warn "arg setting up for $coutput: $@";
|
||||
}
|
||||
|
||||
sub endarg {
|
||||
#print STDERR "endarg($_[0]) from $coutput\n";
|
||||
$evstrg= "\$${coutput}_cmd= \$cmd= pop(\@${coutput}_cmds); ".
|
||||
"\$${coutput}_arg= \$arg= pop(\@${coutput}_args); ";
|
||||
eval($evstrg);
|
||||
length($@) && warn "endarg extracting for $coutput (($evstrg)): $@";
|
||||
#print STDERR ">call $coutput $cmd $arg< (($evstrg))\n";
|
||||
$evstrg= "&${coutput}_do_${cmd}(\$arg)";
|
||||
eval($evstrg);
|
||||
length($@) && warn "endarg running ${coutput}_do_${cmd} (($evstrg)): $@";
|
||||
}
|
||||
842
fftw-3.3.10/doc/FAQ/fftw-faq.ascii
Normal file
@@ -0,0 +1,842 @@
|
||||
FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS
|
||||
14 Sep 2021
|
||||
Matteo Frigo
|
||||
Steven G. Johnson
|
||||
<fftw@fftw.org>
|
||||
|
||||
This is the list of Frequently Asked Questions about FFTW, a collection of
|
||||
fast C routines for computing the Discrete Fourier Transform in one or
|
||||
more dimensions.
|
||||
|
||||
===============================================================================
|
||||
|
||||
Index
|
||||
|
||||
Section 1. Introduction and General Information
|
||||
Q1.1 What is FFTW?
|
||||
Q1.2 How do I obtain FFTW?
|
||||
Q1.3 Is FFTW free software?
|
||||
Q1.4 What is this about non-free licenses?
|
||||
Q1.5 In the West? I thought MIT was in the East?
|
||||
|
||||
Section 2. Installing FFTW
|
||||
Q2.1 Which systems does FFTW run on?
|
||||
Q2.2 Does FFTW run on Windows?
|
||||
Q2.3 My compiler has trouble with FFTW.
|
||||
Q2.4 FFTW does not compile on Solaris, complaining about const.
|
||||
Q2.5 What's the difference between --enable-3dnow and --enable-k7?
|
||||
Q2.6 What's the difference between the fma and the non-fma versions?
|
||||
Q2.7 Which language is FFTW written in?
|
||||
Q2.8 Can I call FFTW from Fortran?
|
||||
Q2.9 Can I call FFTW from C++?
|
||||
Q2.10 Why isn't FFTW written in Fortran/C++?
|
||||
Q2.11 How do I compile FFTW to run in single precision?
|
||||
Q2.12 --enable-k7 does not work on x86-64
|
||||
|
||||
Section 3. Using FFTW
|
||||
Q3.1 Why not support the FFTW 2 interface in FFTW 3?
|
||||
Q3.2 Why do FFTW 3 plans encapsulate the input/output arrays and not ju
|
||||
Q3.3 FFTW seems really slow.
|
||||
Q3.4 FFTW slows down after repeated calls.
|
||||
Q3.5 An FFTW routine is crashing when I call it.
|
||||
Q3.6 My Fortran program crashes when calling FFTW.
|
||||
Q3.7 FFTW gives results different from my old FFT.
|
||||
Q3.8 FFTW gives different results between runs
|
||||
Q3.9 Can I save FFTW's plans?
|
||||
Q3.10 Why does your inverse transform return a scaled result?
|
||||
Q3.11 How can I make FFTW put the origin (zero frequency) at the center
|
||||
Q3.12 How do I FFT an image/audio file in *foobar* format?
|
||||
Q3.13 My program does not link (on Unix).
|
||||
Q3.14 I included your header, but linking still fails.
|
||||
Q3.15 My program crashes, complaining about stack space.
|
||||
Q3.16 FFTW seems to have a memory leak.
|
||||
Q3.17 The output of FFTW's transform is all zeros.
|
||||
Q3.18 How do I call FFTW from the Microsoft language du jour?
|
||||
Q3.19 Can I compute only a subset of the DFT outputs?
|
||||
Q3.20 Can I use FFTW's routines for in-place and out-of-place matrix tra
|
||||
|
||||
Section 4. Internals of FFTW
|
||||
Q4.1 How does FFTW work?
|
||||
Q4.2 Why is FFTW so fast?
|
||||
|
||||
Section 5. Known bugs
|
||||
Q5.1 FFTW 1.1 crashes in rfftwnd on Linux.
|
||||
Q5.2 The MPI transforms in FFTW 1.2 give incorrect results/leak memory.
|
||||
Q5.3 The test programs in FFTW 1.2.1 fail when I change FFTW to use sin
|
||||
Q5.4 The test program in FFTW 1.2.1 fails for n > 46340.
|
||||
Q5.5 The threaded code fails on Linux Redhat 5.0
|
||||
Q5.6 FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dime
|
||||
Q5.7 FFTW 2.0's complex transforms give the wrong results with prime fa
|
||||
Q5.8 FFTW 2.1.1's MPI test programs crash with MPICH.
|
||||
Q5.9 FFTW 2.1.2's multi-threaded transforms don't work on AIX.
|
||||
Q5.10 FFTW 2.1.2's complex transforms give incorrect results for large p
|
||||
Q5.11 FFTW 2.1.3's multi-threaded transforms don't give any speedup on S
|
||||
Q5.12 FFTW 2.1.3 crashes on AIX.
|
||||
|
||||
===============================================================================
|
||||
|
||||
Section 1. Introduction and General Information
|
||||
|
||||
Q1.1 What is FFTW?
|
||||
Q1.2 How do I obtain FFTW?
|
||||
Q1.3 Is FFTW free software?
|
||||
Q1.4 What is this about non-free licenses?
|
||||
Q1.5 In the West? I thought MIT was in the East?
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 1.1. What is FFTW?
|
||||
|
||||
FFTW is a free collection of fast C routines for computing the Discrete
|
||||
Fourier Transform in one or more dimensions. It includes complex, real,
|
||||
symmetric, and parallel transforms, and can handle arbitrary array sizes
|
||||
efficiently. FFTW is typically faster than other publically-available FFT
|
||||
implementations, and is even competitive with vendor-tuned libraries.
|
||||
(See our web page for extensive benchmarks.) To achieve this performance,
|
||||
FFTW uses novel code-generation and runtime self-optimization techniques
|
||||
(along with many other tricks).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 1.2. How do I obtain FFTW?
|
||||
|
||||
FFTW can be found at the FFTW web page. You can also retrieve it from
|
||||
ftp.fftw.org in /pub/fftw.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 1.3. Is FFTW free software?
|
||||
|
||||
Starting with version 1.3, FFTW is Free Software in the technical sense
|
||||
defined by the Free Software Foundation (see Categories of Free and
|
||||
Non-Free Software), and is distributed under the terms of the GNU General
|
||||
Public License. Previous versions of FFTW were distributed without fee
|
||||
for noncommercial use, but were not technically ``free.''
|
||||
|
||||
Non-free licenses for FFTW are also available that permit different terms
|
||||
of use than the GPL.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 1.4. What is this about non-free licenses?
|
||||
|
||||
The non-free licenses are for companies that wish to use FFTW in their
|
||||
products but are unwilling to release their software under the GPL (which
|
||||
would require them to release source code and allow free redistribution).
|
||||
Such users can purchase an unlimited-use license from MIT. Contact us for
|
||||
more details.
|
||||
|
||||
We could instead have released FFTW under the LGPL, or even disallowed
|
||||
non-Free usage. Suffice it to say, however, that MIT owns the copyright
|
||||
to FFTW and they only let us GPL it because we convinced them that it
|
||||
would neither affect their licensing revenue nor irritate existing
|
||||
licensees.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 1.5. In the West? I thought MIT was in the East?
|
||||
|
||||
Not to an Italian. You could say that we're a Spaghetti Western (with
|
||||
apologies to Sergio Leone).
|
||||
|
||||
===============================================================================
|
||||
|
||||
Section 2. Installing FFTW
|
||||
|
||||
Q2.1 Which systems does FFTW run on?
|
||||
Q2.2 Does FFTW run on Windows?
|
||||
Q2.3 My compiler has trouble with FFTW.
|
||||
Q2.4 FFTW does not compile on Solaris, complaining about const.
|
||||
Q2.5 What's the difference between --enable-3dnow and --enable-k7?
|
||||
Q2.6 What's the difference between the fma and the non-fma versions?
|
||||
Q2.7 Which language is FFTW written in?
|
||||
Q2.8 Can I call FFTW from Fortran?
|
||||
Q2.9 Can I call FFTW from C++?
|
||||
Q2.10 Why isn't FFTW written in Fortran/C++?
|
||||
Q2.11 How do I compile FFTW to run in single precision?
|
||||
Q2.12 --enable-k7 does not work on x86-64
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.1. Which systems does FFTW run on?
|
||||
|
||||
FFTW is written in ANSI C, and should work on any system with a decent C
|
||||
compiler. (See also Q2.2 `Does FFTW run on Windows?', Q2.3 `My compiler
|
||||
has trouble with FFTW.'.) FFTW can also take advantage of certain
|
||||
hardware-specific features, such as cycle counters and SIMD instructions,
|
||||
but this is optional.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.2. Does FFTW run on Windows?
|
||||
|
||||
Yes, many people have reported successfully using FFTW on Windows with
|
||||
various compilers. FFTW was not developed on Windows, but the source code
|
||||
is essentially straight ANSI C. See also the FFTW Windows installation
|
||||
notes, Q2.3 `My compiler has trouble with FFTW.', and Q3.18 `How do I call
|
||||
FFTW from the Microsoft language du jour?'.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.3. My compiler has trouble with FFTW.
|
||||
|
||||
Complain fiercely to the vendor of the compiler.
|
||||
|
||||
We have successfully used gcc 3.2.x on x86 and PPC, a recent Compaq C
|
||||
compiler for Alpha, version 6 of IBM's xlc compiler for AIX, Intel's icc
|
||||
versions 5-7, and Sun WorkShop cc version 6.
|
||||
|
||||
FFTW is likely to push compilers to their limits, however, and several
|
||||
compiler bugs have been exposed by FFTW. A partial list follows.
|
||||
|
||||
gcc 2.95.x for Solaris/SPARC produces incorrect code for the test program
|
||||
(workaround: recompile the libbench2 directory with -O2).
|
||||
|
||||
NetBSD/macppc 1.6 comes with a gcc version that also miscompiles the test
|
||||
program. (Please report a workaround if you know one.)
|
||||
|
||||
gcc 3.2.3 for ARM reportedly crashes during compilation. This bug is
|
||||
reportedly fixed in later versions of gcc.
|
||||
|
||||
Versions 8.0 and 8.1 of Intel's icc falsely claim to be gcc, so you should
|
||||
specify CC="icc -no-gcc"; this is automatic in FFTW 3.1. icc-8.0.066
|
||||
reportely produces incorrect code for FFTW 2.1.5, but is fixed in version
|
||||
8.1. icc-7.1 compiler build 20030402Z appears to produce incorrect
|
||||
dependencies, causing the compilation to fail. icc-7.1 build 20030307Z
|
||||
appears to work fine. (Use icc -V to check which build you have.) As of
|
||||
2003/04/18, build 20030402Z appears not to be available any longer on
|
||||
Intel's website, whereas the older build 20030307Z is available.
|
||||
|
||||
ranlib of GNU binutils 2.9.1 on Irix has been observed to corrupt the FFTW
|
||||
libraries, causing a link failure when FFTW is compiled. Since ranlib is
|
||||
completely superfluous on Irix, we suggest deleting it from your system
|
||||
and replacing it with a symbolic link to /bin/echo.
|
||||
|
||||
If support for SIMD instructions is enabled in FFTW, further compiler
|
||||
problems may appear:
|
||||
|
||||
gcc 3.4.[0123] for x86 produces incorrect SSE2 code for FFTW when -O2 (the
|
||||
best choice for FFTW) is used, causing FFTW to crash (make check crashes).
|
||||
This bug is fixed in gcc 3.4.4. On x86_64 (amd64/em64t), gcc 3.4.4
|
||||
reportedly still has a similar problem, but this is fixed as of gcc 3.4.6.
|
||||
|
||||
gcc-3.2 for x86 produces incorrect SIMD code if -O3 is used. The same
|
||||
compiler produces incorrect SIMD code if no optimization is used, too.
|
||||
When using gcc-3.2, it is a good idea not to change the default CFLAGS
|
||||
selected by the configure script.
|
||||
|
||||
Some 3.0.x and 3.1.x versions of gcc on x86 may crash. gcc so-called 2.96
|
||||
shipping with RedHat 7.3 crashes when compiling SIMD code. In both cases,
|
||||
please upgrade to gcc-3.2 or later.
|
||||
|
||||
Intel's icc 6.0 misaligns SSE constants, but FFTW has a workaround. icc
|
||||
8.x fails to compile FFTW 3.0.x because it falsely claims to be gcc; we
|
||||
believe this to be a bug in icc, but FFTW 3.1 has a workaround.
|
||||
|
||||
Visual C++ 2003 reportedly produces incorrect code for SSE/SSE2 when
|
||||
compiling FFTW. This bug was reportedly fixed in VC++ 2005;
|
||||
alternatively, you could switch to the Intel compiler. VC++ 6.0 also
|
||||
reportedly produces incorrect code for the file reodft11e-r2hc-odd.c
|
||||
unless optimizations are disabled for that file.
|
||||
|
||||
gcc 2.95 on MacOS X miscompiles AltiVec code (fixed in later versions).
|
||||
gcc 3.2.x miscompiles AltiVec permutations, but FFTW has a workaround.
|
||||
gcc 4.0.1 on MacOS for Intel crashes when compiling FFTW; a workaround is
|
||||
to compile one file without optimization: cd kernel; make CFLAGS=" "
|
||||
trig.lo.
|
||||
|
||||
gcc 4.1.1 reportedly crashes when compiling FFTW for MIPS; the workaround
|
||||
is to compile the file it crashes on (t2_64.c) with a lower optimization
|
||||
level.
|
||||
|
||||
gcc versions 4.1.2 to 4.2.0 for x86 reportedly miscompile FFTW 3.1's test
|
||||
program, causing make check to crash (gcc bug #26528). The bug was
|
||||
reportedly fixed in gcc version 4.2.1 and later. A workaround is to
|
||||
compile libbench2/verify-lib.c without optimization.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.4. FFTW does not compile on Solaris, complaining about const.
|
||||
|
||||
We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you might
|
||||
get error messages from make such as
|
||||
|
||||
"./fftw.h", line 88: warning: const is a keyword in ANSI C
|
||||
|
||||
This is the case when the configure script reports that const does not
|
||||
work:
|
||||
|
||||
checking for working const... (cached) no
|
||||
|
||||
You should be aware that Solaris comes with two compilers, namely,
|
||||
/opt/SUNWspro/SC4.2/bin/cc and /usr/ucb/cc. The latter compiler is
|
||||
non-ANSI. Indeed, it is a perverse shell script that calls the real
|
||||
compiler in non-ANSI mode. In order to compile FFTW, change your path so
|
||||
that the right cc is used.
|
||||
|
||||
To know whether your compiler is the right one, type cc -V. If the
|
||||
compiler prints ``ucbcc'', as in
|
||||
|
||||
ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2
|
||||
|
||||
then the compiler is wrong. The right message is something like
|
||||
|
||||
cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.5. What's the difference between --enable-3dnow and --enable-k7?
|
||||
|
||||
--enable-k7 enables 3DNow! instructions on K7 processors (AMD Athlon and
|
||||
its variants). K7 support is provided by assembly routines generated by a
|
||||
special purpose compiler. As of fftw-3.2, --enable-k7 is no longer
|
||||
supported.
|
||||
|
||||
--enable-3dnow enables generic 3DNow! support using gcc builtin functions.
|
||||
This works on earlier AMD processors, but it is not as fast as our special
|
||||
assembly routines. As of fftw-3.1, --enable-3dnow is no longer supported.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.6. What's the difference between the fma and the non-fma versions?
|
||||
|
||||
The fma version tries to exploit the fused multiply-add instructions
|
||||
implemented in many processors such as PowerPC, ia-64, and MIPS. The two
|
||||
FFTW packages are otherwise identical. In FFTW 3.1, the fma and non-fma
|
||||
versions were merged together into a single package, and the configure
|
||||
script attempts to automatically guess which version to use.
|
||||
|
||||
The FFTW 3.1 configure script enables fma by default on PowerPC, Itanium,
|
||||
and PA-RISC, and disables it otherwise. You can force one or the other by
|
||||
using the --enable-fma or --disable-fma flag for configure.
|
||||
|
||||
Definitely use fma if you have a PowerPC-based system with gcc (or IBM
|
||||
xlc). This includes all GNU/Linux systems for PowerPC and the older
|
||||
PowerPC-based MacOS systems. Also use it on PA-RISC and Itanium with the
|
||||
HP/UX compiler.
|
||||
|
||||
Definitely do not use the fma version if you have an ia-32 processor
|
||||
(Intel, AMD, MacOS on Intel, etcetera).
|
||||
|
||||
For other architectures/compilers, the situation is not so clear. For
|
||||
example, ia-64 has the fma instruction, but gcc-3.2 appears not to exploit
|
||||
it correctly. Other compilers may do the right thing, but we have not
|
||||
tried them. Please send us your feedback so that we can update this FAQ
|
||||
entry.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.7. Which language is FFTW written in?
|
||||
|
||||
FFTW is written in ANSI C. Most of the code, however, was automatically
|
||||
generated by a program called genfft, written in the Objective Caml
|
||||
dialect of ML. You do not need to know ML or to have an Objective Caml
|
||||
compiler in order to use FFTW.
|
||||
|
||||
genfft is provided with the FFTW sources, which means that you can play
|
||||
with the code generator if you want. In this case, you need a working
|
||||
Objective Caml system. Objective Caml is available from the Caml web
|
||||
page.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.8. Can I call FFTW from Fortran?
|
||||
|
||||
Yes, FFTW (versions 1.3 and higher) contains a Fortran-callable interface,
|
||||
documented in the FFTW manual.
|
||||
|
||||
By default, FFTW configures its Fortran interface to work with the first
|
||||
compiler it finds, e.g. g77. To configure for a different, incompatible
|
||||
Fortran compiler foobar, use ./configure F77=foobar when installing FFTW.
|
||||
(In the case of g77, however, FFTW 3.x also includes an extra set of
|
||||
Fortran-callable routines with one less underscore at the end of
|
||||
identifiers, which should cover most other Fortran compilers on Linux at
|
||||
least.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.9. Can I call FFTW from C++?
|
||||
|
||||
Most definitely. FFTW should compile and/or link under any C++ compiler.
|
||||
Moreover, it is likely that the C++ <complex> template class is
|
||||
bit-compatible with FFTW's complex-number format (see the FFTW manual for
|
||||
more details).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.10. Why isn't FFTW written in Fortran/C++?
|
||||
|
||||
Because we don't like those languages, and neither approaches the
|
||||
portability of C.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.11. How do I compile FFTW to run in single precision?
|
||||
|
||||
On a Unix system: configure --enable-float. On a non-Unix system: edit
|
||||
config.h to #define the symbol FFTW_SINGLE (for FFTW 3.x). In both cases,
|
||||
you must then recompile FFTW. In FFTW 3, all FFTW identifiers will then
|
||||
begin with fftwf_ instead of fftw_.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 2.12. --enable-k7 does not work on x86-64
|
||||
|
||||
Support for --enable-k7 was discontinued in fftw-3.2.
|
||||
|
||||
The fftw-3.1 release supports --enable-k7. This option only works on
|
||||
32-bit x86 machines that implement 3DNow!, including the AMD Athlon and
|
||||
the AMD Opteron in 32-bit mode. --enable-k7 does not work on AMD Opteron
|
||||
in 64-bit mode. Use --enable-sse for x86-64 machines.
|
||||
|
||||
FFTW supports 3DNow! by means of assembly code generated by a
|
||||
special-purpose compiler. It is hard to produce assembly code that works
|
||||
in both 32-bit and 64-bit mode.
|
||||
|
||||
===============================================================================
|
||||
|
||||
Section 3. Using FFTW
|
||||
|
||||
Q3.1 Why not support the FFTW 2 interface in FFTW 3?
|
||||
Q3.2 Why do FFTW 3 plans encapsulate the input/output arrays and not ju
|
||||
Q3.3 FFTW seems really slow.
|
||||
Q3.4 FFTW slows down after repeated calls.
|
||||
Q3.5 An FFTW routine is crashing when I call it.
|
||||
Q3.6 My Fortran program crashes when calling FFTW.
|
||||
Q3.7 FFTW gives results different from my old FFT.
|
||||
Q3.8 FFTW gives different results between runs
|
||||
Q3.9 Can I save FFTW's plans?
|
||||
Q3.10 Why does your inverse transform return a scaled result?
|
||||
Q3.11 How can I make FFTW put the origin (zero frequency) at the center
|
||||
Q3.12 How do I FFT an image/audio file in *foobar* format?
|
||||
Q3.13 My program does not link (on Unix).
|
||||
Q3.14 I included your header, but linking still fails.
|
||||
Q3.15 My program crashes, complaining about stack space.
|
||||
Q3.16 FFTW seems to have a memory leak.
|
||||
Q3.17 The output of FFTW's transform is all zeros.
|
||||
Q3.18 How do I call FFTW from the Microsoft language du jour?
|
||||
Q3.19 Can I compute only a subset of the DFT outputs?
|
||||
Q3.20 Can I use FFTW's routines for in-place and out-of-place matrix tra
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.1. Why not support the FFTW 2 interface in FFTW 3?
|
||||
|
||||
FFTW 3 has semantics incompatible with earlier versions: its plans can
|
||||
only be used for a given stride, multiplicity, and other characteristics
|
||||
of the input and output arrays; these stronger semantics are necessary for
|
||||
performance reasons. Thus, it is impossible to efficiently emulate the
|
||||
older interface (whose plans can be used for any transform of the same
|
||||
size). We believe that it should be possible to upgrade most programs
|
||||
without any difficulty, however.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.2. Why do FFTW 3 plans encapsulate the input/output arrays and not just the algorithm?
|
||||
|
||||
There are several reasons:
|
||||
|
||||
* It was important for performance reasons that the plan be specific to
|
||||
array characteristics like the stride (and alignment, for SIMD), and
|
||||
requiring that the user maintain these invariants is error prone.
|
||||
* In most high-performance applications, as far as we can tell, you are
|
||||
usually transforming the same array over and over, so FFTW's semantics
|
||||
should not be a burden.
|
||||
* If you need to transform another array of the same size, creating a new
|
||||
plan once the first exists is a cheap operation.
|
||||
* If you need to transform many arrays of the same size at once, you
|
||||
should really use the plan_many routines in FFTW's "advanced" interface.
|
||||
* If the abovementioned array characteristics are the same, you are
|
||||
willing to pay close attention to the documentation, and you really need
|
||||
to, we provide a "new-array execution" interface to apply a plan to a
|
||||
new array.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.3. FFTW seems really slow.
|
||||
|
||||
You are probably recreating the plan before every transform, rather than
|
||||
creating it once and reusing it for all transforms of the same size. FFTW
|
||||
is designed to be used in the following way:
|
||||
|
||||
* First, you create a plan. This will take several seconds.
|
||||
* Then, you reuse the plan many times to perform FFTs. These are fast.
|
||||
|
||||
If you don't need to compute many transforms and the time for the planner
|
||||
is significant, you have two options. First, you can use the
|
||||
FFTW_ESTIMATE option in the planner, which uses heuristics instead of
|
||||
runtime measurements and produces a good plan in a short time. Second,
|
||||
you can use the wisdom feature to precompute the plan; see Q3.9 `Can I
|
||||
save FFTW's plans?'
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.4. FFTW slows down after repeated calls.
|
||||
|
||||
Probably, NaNs or similar are creeping into your data, and the slowdown is
|
||||
due to the resulting floating-point exceptions. For example, be aware
|
||||
that repeatedly FFTing the same array is a diverging process (because FFTW
|
||||
computes the unnormalized transform).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.5. An FFTW routine is crashing when I call it.
|
||||
|
||||
Did the FFTW test programs pass (make check, or cd tests; make bigcheck if
|
||||
you want to be paranoid)? If so, you almost certainly have a bug in your
|
||||
own code. For example, you could be passing invalid arguments (such as
|
||||
wrongly-sized arrays) to FFTW, or you could simply have memory corruption
|
||||
elsewhere in your program that causes random crashes later on. Please
|
||||
don't complain to us unless you can come up with a minimal self-contained
|
||||
program (preferably under 30 lines) that illustrates the problem.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.6. My Fortran program crashes when calling FFTW.
|
||||
|
||||
As described in the manual, on 64-bit machines you must store the plans in
|
||||
variables large enough to hold a pointer, for example integer*8. We
|
||||
recommend using integer*8 on 32-bit machines as well, to simplify porting.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.7. FFTW gives results different from my old FFT.
|
||||
|
||||
People follow many different conventions for the DFT, and you should be
|
||||
sure to know the ones that we use (described in the FFTW manual). In
|
||||
particular, you should be aware that the FFTW_FORWARD/FFTW_BACKWARD
|
||||
directions correspond to signs of -1/+1 in the exponent of the DFT
|
||||
definition. (*Numerical Recipes* uses the opposite convention.)
|
||||
|
||||
You should also know that we compute an unnormalized transform. In
|
||||
contrast, Matlab is an example of program that computes a normalized
|
||||
transform. See Q3.10 `Why does your inverse transform return a scaled
|
||||
result?'.
|
||||
|
||||
Finally, note that floating-point arithmetic is not exact, so different
|
||||
FFT algorithms will give slightly different results (on the order of the
|
||||
numerical accuracy; typically a fractional difference of 1e-15 or so in
|
||||
double precision).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.8. FFTW gives different results between runs
|
||||
|
||||
If you use FFTW_MEASURE or FFTW_PATIENT mode, then the algorithm FFTW
|
||||
employs is not deterministic: it depends on runtime performance
|
||||
measurements. This will cause the results to vary slightly from run to
|
||||
run. However, the differences should be slight, on the order of the
|
||||
floating-point precision, and therefore should have no practical impact on
|
||||
most applications.
|
||||
|
||||
If you use saved plans (wisdom) or FFTW_ESTIMATE mode, however, then the
|
||||
algorithm is deterministic and the results should be identical between
|
||||
runs.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.9. Can I save FFTW's plans?
|
||||
|
||||
Yes. Starting with version 1.2, FFTW provides the wisdom mechanism for
|
||||
saving plans; see the FFTW manual.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.10. Why does your inverse transform return a scaled result?
|
||||
|
||||
Computing the forward transform followed by the backward transform (or
|
||||
vice versa) yields the original array scaled by the size of the array.
|
||||
(For multi-dimensional transforms, the size of the array is the product of
|
||||
the dimensions.) We could, instead, have chosen a normalization that
|
||||
would have returned the unscaled array. Or, to accomodate the many
|
||||
conventions in this matter, the transform routines could have accepted a
|
||||
"scale factor" parameter. We did not do this, however, for two reasons.
|
||||
First, we didn't want to sacrifice performance in the common case where
|
||||
the scale factor is 1. Second, in real applications the FFT is followed or
|
||||
preceded by some computation on the data, into which the scale factor can
|
||||
typically be absorbed at little or no cost.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.11. How can I make FFTW put the origin (zero frequency) at the center of its output?
|
||||
|
||||
For human viewing of a spectrum, it is often convenient to put the origin
|
||||
in frequency space at the center of the output array, rather than in the
|
||||
zero-th element (the default in FFTW). If all of the dimensions of your
|
||||
array are even, you can accomplish this by simply multiplying each element
|
||||
of the input array by (-1)^(i + j + ...), where i, j, etcetera are the
|
||||
indices of the element. (This trick is a general property of the DFT, and
|
||||
is not specific to FFTW.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.12. How do I FFT an image/audio file in *foobar* format?
|
||||
|
||||
FFTW performs an FFT on an array of floating-point values. You can
|
||||
certainly use it to compute the transform of an image or audio stream, but
|
||||
you are responsible for figuring out your data format and converting it to
|
||||
the form FFTW requires.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.13. My program does not link (on Unix).
|
||||
|
||||
The libraries must be listed in the correct order (-lfftw3 -lm for FFTW
|
||||
3.x) and *after* your program sources/objects. (The general rule is that
|
||||
if *A* uses *B*, then *A* must be listed before *B* in the link command.).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.14. I included your header, but linking still fails.
|
||||
|
||||
You're a C++ programmer, aren't you? You have to compile the FFTW library
|
||||
and link it into your program, not just #include <fftw3.h>. (Yes, this is
|
||||
really a FAQ.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.15. My program crashes, complaining about stack space.
|
||||
|
||||
You cannot declare large arrays with automatic storage (e.g. via
|
||||
fftw_complex array[N]); you should use fftw_malloc (or equivalent) to
|
||||
allocate the arrays you want to transform if they are larger than a few
|
||||
hundred elements.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.16. FFTW seems to have a memory leak.
|
||||
|
||||
After you create a plan, FFTW caches the information required to quickly
|
||||
recreate the plan. (See Q3.9 `Can I save FFTW's plans?') It also
|
||||
maintains a small amount of other persistent memory. You can deallocate
|
||||
all of FFTW's internally allocated memory, if you wish, by calling
|
||||
fftw_cleanup(), as documented in the manual.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.17. The output of FFTW's transform is all zeros.
|
||||
|
||||
You should initialize your input array *after* creating the plan, unless
|
||||
you use FFTW_ESTIMATE: planning with FFTW_MEASURE or FFTW_PATIENT
|
||||
overwrites the input/output arrays, as described in the manual.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.18. How do I call FFTW from the Microsoft language du jour?
|
||||
|
||||
Please *do not* ask us Windows-specific questions. We do not use Windows.
|
||||
We know nothing about Visual Basic, Visual C++, or .NET. Please find the
|
||||
appropriate Usenet discussion group and ask your question there. See also
|
||||
Q2.2 `Does FFTW run on Windows?'.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.19. Can I compute only a subset of the DFT outputs?
|
||||
|
||||
In general, no, an FFT intrinsically computes all outputs from all inputs.
|
||||
In principle, there is something called a *pruned FFT* that can do what
|
||||
you want, but to compute K outputs out of N the complexity is in general
|
||||
O(N log K) instead of O(N log N), thus saving only a small additive factor
|
||||
in the log. (The same argument holds if you instead have only K nonzero
|
||||
inputs.)
|
||||
|
||||
There are some specific cases in which you can get the O(N log K)
|
||||
performance benefits easily, however, by combining a few ordinary FFTs.
|
||||
In particular, the case where you want the first K outputs, where K
|
||||
divides N, can be handled by performing N/K transforms of size K and then
|
||||
summing the outputs multiplied by appropriate phase factors. For more
|
||||
details, see pruned FFTs with FFTW.
|
||||
|
||||
There are also some algorithms that compute pruned transforms
|
||||
*approximately*, but they are beyond the scope of this FAQ.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 3.20. Can I use FFTW's routines for in-place and out-of-place matrix transposition?
|
||||
|
||||
You can use the FFTW guru interface to create a rank-0 transform of vector
|
||||
rank 2 where the vector strides are transposed. (A rank-0 transform is
|
||||
equivalent to a 1D transform of size 1, which. just copies the input into
|
||||
the output.) Specifying the same location for the input and output makes
|
||||
the transpose in-place.
|
||||
|
||||
For double-valued data stored in row-major format, plan creation looks
|
||||
like this:
|
||||
|
||||
fftw_plan plan_transpose(int rows, int cols, double *in, double *out)
|
||||
{
|
||||
const unsigned flags = FFTW_ESTIMATE; /* other flags are possible */
|
||||
fftw_iodim howmany_dims[2];
|
||||
|
||||
howmany_dims[0].n = rows;
|
||||
howmany_dims[0].is = cols;
|
||||
howmany_dims[0].os = 1;
|
||||
|
||||
howmany_dims[1].n = cols;
|
||||
howmany_dims[1].is = 1;
|
||||
howmany_dims[1].os = rows;
|
||||
|
||||
return fftw_plan_guru_r2r(/*rank=*/ 0, /*dims=*/ NULL,
|
||||
/*howmany_rank=*/ 2, howmany_dims,
|
||||
in, out, /*kind=*/ NULL, flags);
|
||||
}
|
||||
(This entry was written by Rhys Ulerich.)
|
||||
|
||||
===============================================================================
|
||||
|
||||
Section 4. Internals of FFTW
|
||||
|
||||
Q4.1 How does FFTW work?
|
||||
Q4.2 Why is FFTW so fast?
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 4.1. How does FFTW work?
|
||||
|
||||
The innovation (if it can be so called) in FFTW consists in having a
|
||||
variety of composable *solvers*, representing different FFT algorithms and
|
||||
implementation strategies, whose combination into a particular *plan* for
|
||||
a given size can be determined at runtime according to the characteristics
|
||||
of your machine/compiler. This peculiar software architecture allows FFTW
|
||||
to adapt itself to almost any machine.
|
||||
|
||||
For more details (albeit somewhat outdated), see the paper "FFTW: An
|
||||
Adaptive Software Architecture for the FFT", by M. Frigo and S. G.
|
||||
Johnson, *Proc. ICASSP* 3, 1381 (1998), also available at the FFTW web
|
||||
page.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 4.2. Why is FFTW so fast?
|
||||
|
||||
This is a complex question, and there is no simple answer. In fact, the
|
||||
authors do not fully know the answer, either. In addition to many small
|
||||
performance hacks throughout FFTW, there are three general reasons for
|
||||
FFTW's speed.
|
||||
|
||||
* FFTW uses a variety of FFT algorithms and implementation styles that
|
||||
can be arbitrarily composed to adapt itself to a machine. See Q4.1 `How
|
||||
does FFTW work?'.
|
||||
* FFTW uses a code generator to produce highly-optimized routines for
|
||||
computing small transforms.
|
||||
* FFTW uses explicit divide-and-conquer to take advantage of the memory
|
||||
hierarchy.
|
||||
|
||||
For more details (albeit somewhat outdated), see the paper "FFTW: An
|
||||
Adaptive Software Architecture for the FFT", by M. Frigo and S. G.
|
||||
Johnson, *Proc. ICASSP* 3, 1381 (1998), available along with other
|
||||
references at the FFTW web page.
|
||||
|
||||
===============================================================================
|
||||
|
||||
Section 5. Known bugs
|
||||
|
||||
Q5.1 FFTW 1.1 crashes in rfftwnd on Linux.
|
||||
Q5.2 The MPI transforms in FFTW 1.2 give incorrect results/leak memory.
|
||||
Q5.3 The test programs in FFTW 1.2.1 fail when I change FFTW to use sin
|
||||
Q5.4 The test program in FFTW 1.2.1 fails for n > 46340.
|
||||
Q5.5 The threaded code fails on Linux Redhat 5.0
|
||||
Q5.6 FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dime
|
||||
Q5.7 FFTW 2.0's complex transforms give the wrong results with prime fa
|
||||
Q5.8 FFTW 2.1.1's MPI test programs crash with MPICH.
|
||||
Q5.9 FFTW 2.1.2's multi-threaded transforms don't work on AIX.
|
||||
Q5.10 FFTW 2.1.2's complex transforms give incorrect results for large p
|
||||
Q5.11 FFTW 2.1.3's multi-threaded transforms don't give any speedup on S
|
||||
Q5.12 FFTW 2.1.3 crashes on AIX.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.1. FFTW 1.1 crashes in rfftwnd on Linux.
|
||||
|
||||
This bug was fixed in FFTW 1.2. There was a bug in rfftwnd causing an
|
||||
incorrect amount of memory to be allocated. The bug showed up in Linux
|
||||
with libc-5.3.12 (and nowhere else that we know of).
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak memory.
|
||||
|
||||
These bugs were corrected in FFTW 1.2.1. The MPI transforms (really, just
|
||||
the transpose routines) in FFTW 1.2 had bugs that could cause errors in
|
||||
some situations.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision.
|
||||
|
||||
This bug was fixed in FFTW 1.3. (Older versions of FFTW did work in
|
||||
single precision, but the test programs didn't--the error tolerances in
|
||||
the tests were set for double precision.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.4. The test program in FFTW 1.2.1 fails for n > 46340.
|
||||
|
||||
This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer, but
|
||||
the test program was wrong. For large n, n*n in the naive transform that
|
||||
we used for comparison overflows 32 bit integer precision, breaking the
|
||||
test.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.5. The threaded code fails on Linux Redhat 5.0
|
||||
|
||||
We had problems with glibc-2.0.5. The code should work with glibc-2.0.7.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536.
|
||||
|
||||
This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer overflow
|
||||
due to a poorly-parenthesized expression.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.7. FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97.
|
||||
|
||||
There was a bug in the complex transforms that could cause incorrect
|
||||
results under (hopefully rare) circumstances for lengths with
|
||||
intermediate-size prime factors (17-97). This bug was fixed in FFTW
|
||||
2.1.1.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.8. FFTW 2.1.1's MPI test programs crash with MPICH.
|
||||
|
||||
This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs crashed
|
||||
when using the MPICH implementation of MPI with the ch_p4 device (TCP/IP);
|
||||
the transforms themselves worked fine.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.9. FFTW 2.1.2's multi-threaded transforms don't work on AIX.
|
||||
|
||||
This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in
|
||||
previous versions didn't work with AIX's pthreads implementation, which
|
||||
idiosyncratically creates threads in detached (non-joinable) mode by
|
||||
default.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime sizes.
|
||||
|
||||
This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm for
|
||||
prime sizes (in versions 2.0 to 2.1.2) had an integer overflow problem
|
||||
that caused incorrect results for many primes greater than 32768 (on
|
||||
32-bit machines). (Sizes without large prime factors are not affected.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.11. FFTW 2.1.3's multi-threaded transforms don't give any speedup on Solaris.
|
||||
|
||||
This bug was fixed in FFTW 2.1.4. (By default, Solaris creates threads
|
||||
that do not parallelize over multiple processors, so one has to request
|
||||
the proper behavior specifically.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Question 5.12. FFTW 2.1.3 crashes on AIX.
|
||||
|
||||
The FFTW 2.1.3 configure script picked incorrect compiler flags for the
|
||||
xlc compiler on newer IBM processors. This is fixed in FFTW 2.1.4.
|
||||
|
||||
708
fftw-3.3.10/doc/FAQ/fftw-faq.bfnn
Normal file
@@ -0,0 +1,708 @@
|
||||
\comment This is the source for the FFTW FAQ list, in
|
||||
\comment the Bizarre Format With No Name. It is turned into Lout
|
||||
\comment input, HTML, plain ASCII and an Info document by a Perl script.
|
||||
\comment
|
||||
\comment The format and scripts come from the Linux FAQ, by
|
||||
\comment Ian Jackson.
|
||||
\set brieftitle FFTW FAQ
|
||||
\set author <A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
\set authormail fftw@fftw.org
|
||||
\set title FFTW Frequently Asked Questions with Answers
|
||||
\set copyholder Matteo Frigo and Massachusetts Institute of Technology
|
||||
\call-html startup html.refs2
|
||||
\copyto ASCII
|
||||
FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS
|
||||
`date '+%d %h %Y'`
|
||||
Matteo Frigo
|
||||
Steven G. Johnson
|
||||
<fftw@fftw.org>
|
||||
|
||||
\endcopy
|
||||
\copyto INFO
|
||||
INFO-DIR-SECTION Development
|
||||
START-INFO-DIR-ENTRY
|
||||
* FFTW FAQ: (fftw-faq). FFTW Frequently Asked Questions with Answers.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir)
|
||||
|
||||
FFTW FREQUENTLY ASKED QUESTIONS WITH ANSWERS
|
||||
`date '+%d %h %Y'`
|
||||
Matteo Frigo
|
||||
Steven G. Johnson
|
||||
<fftw@fftw.org>
|
||||
|
||||
\endcopy
|
||||
|
||||
This is the list of Frequently Asked Questions about FFTW, a
|
||||
collection of fast C routines for computing the Discrete Fourier
|
||||
Transform in one or more dimensions.
|
||||
|
||||
\section Index
|
||||
|
||||
\index
|
||||
|
||||
\comment ######################################################################
|
||||
|
||||
\section Introduction and General Information
|
||||
|
||||
\question 26aug:whatisfftw What is FFTW?
|
||||
|
||||
FFTW is a free collection of fast C routines for computing the
|
||||
Discrete Fourier Transform in one or more dimensions. It includes
|
||||
complex, real, symmetric, and parallel transforms, and can handle
|
||||
arbitrary array sizes efficiently. FFTW is typically faster than
|
||||
other publically-available FFT implementations, and is even
|
||||
competitive with vendor-tuned libraries. (See our web page for
|
||||
extensive benchmarks.) To achieve this performance, FFTW uses novel
|
||||
code-generation and runtime self-optimization techniques (along with
|
||||
many other tricks).
|
||||
|
||||
\question 26aug:whereisfftw How do I obtain FFTW?
|
||||
|
||||
FFTW can be found at \docref{the FFTW web page\}. You can also
|
||||
retrieve it from \ftpon ftp.fftw.org in \ftpin /pub/fftw.
|
||||
|
||||
\question 26aug:isfftwfree Is FFTW free software?
|
||||
|
||||
Starting with version 1.3, FFTW is Free Software in the technical
|
||||
sense defined by the Free Software Foundation (see \docref{Categories
|
||||
of Free and Non-Free Software\}), and is distributed under the terms
|
||||
of the GNU General Public License. Previous versions of FFTW were
|
||||
distributed without fee for noncommercial use, but were not
|
||||
technically ``free.''
|
||||
|
||||
Non-free licenses for FFTW are also available that permit different
|
||||
terms of use than the GPL.
|
||||
|
||||
\question 10apr:nonfree What is this about non-free licenses?
|
||||
|
||||
The non-free licenses are for companies that wish to use FFTW in their
|
||||
products but are unwilling to release their software under the GPL
|
||||
(which would require them to release source code and allow free
|
||||
redistribution). Such users can purchase an unlimited-use license
|
||||
from MIT. Contact us for more details.
|
||||
|
||||
We could instead have released FFTW under the LGPL, or even disallowed
|
||||
non-Free usage. Suffice it to say, however, that MIT owns the
|
||||
copyright to FFTW and they only let us GPL it because we convinced
|
||||
them that it would neither affect their licensing revenue nor irritate
|
||||
existing licensees.
|
||||
|
||||
\question 24oct:west In the West? I thought MIT was in the East?
|
||||
|
||||
Not to an Italian. You could say that we're a Spaghetti Western
|
||||
(with apologies to Sergio Leone).
|
||||
|
||||
\comment ######################################################################
|
||||
|
||||
\section Installing FFTW
|
||||
|
||||
\question 26aug:systems Which systems does FFTW run on?
|
||||
|
||||
FFTW is written in ANSI C, and should work on any system with a decent
|
||||
C compiler. (See also \qref runOnWindows, \qref compilerCrashes.)
|
||||
FFTW can also take advantage of certain hardware-specific features,
|
||||
such as cycle counters and SIMD instructions, but this is optional.
|
||||
|
||||
\question 26aug:runOnWindows Does FFTW run on Windows?
|
||||
|
||||
Yes, many people have reported successfully using FFTW on Windows with
|
||||
various compilers. FFTW was not developed on Windows, but the source
|
||||
code is essentially straight ANSI C. See also the \docref{FFTW
|
||||
Windows installation notes\}, \qref compilerCrashes, and \qref
|
||||
vbetalia.
|
||||
|
||||
\question 26aug:compilerCrashes My compiler has trouble with FFTW.
|
||||
|
||||
Complain fiercely to the vendor of the compiler.
|
||||
|
||||
We have successfully used \courier{gcc\} 3.2.x on x86 and PPC, a
|
||||
recent Compaq C compiler for Alpha, version 6 of IBM's \courier{xlc\}
|
||||
compiler for AIX, Intel's \courier{icc\} versions 5-7, and Sun
|
||||
WorkShop \courier{cc\} version 6.
|
||||
|
||||
FFTW is likely to push compilers to their limits, however, and several
|
||||
compiler bugs have been exposed by FFTW. A partial list follows.
|
||||
|
||||
\courier{gcc\} 2.95.x for Solaris/SPARC produces incorrect code for
|
||||
the test program (workaround: recompile the \courier{libbench2\}
|
||||
directory with \courier{-O2\}).
|
||||
|
||||
NetBSD/macppc 1.6 comes with a \courier{gcc\} version that also
|
||||
miscompiles the test program. (Please report a workaround if you know
|
||||
one.)
|
||||
|
||||
\courier{gcc\} 3.2.3 for ARM reportedly crashes during compilation.
|
||||
This bug is reportedly fixed in later versions of \courier{gcc\}.
|
||||
|
||||
Versions 8.0 and 8.1 of Intel's \courier{icc\} falsely claim to be
|
||||
\courier{gcc\}, so you should specify \courier{CC="icc -no-gcc"\};
|
||||
this is automatic in FFTW 3.1. \courier{icc-8.0.066\} reportely
|
||||
produces incorrect code for FFTW 2.1.5, but is fixed in version 8.1.
|
||||
\courier{icc-7.1\} compiler build 20030402Z appears to produce
|
||||
incorrect dependencies, causing the compilation to fail.
|
||||
\courier{icc-7.1\} build 20030307Z appears to work fine. (Use
|
||||
\courier{icc -V\} to check which build you have.) As of 2003/04/18,
|
||||
build 20030402Z appears not to be available any longer on Intel's
|
||||
website, whereas the older build 20030307Z is available.
|
||||
|
||||
\courier{ranlib\} of GNU \courier{binutils\} 2.9.1 on Irix has been
|
||||
observed to corrupt the FFTW libraries, causing a link failure when
|
||||
FFTW is compiled. Since \courier{ranlib\} is completely superfluous
|
||||
on Irix, we suggest deleting it from your system and replacing it with
|
||||
a symbolic link to \courier{/bin/echo\}.
|
||||
|
||||
If support for SIMD instructions is enabled in FFTW, further compiler
|
||||
problems may appear:
|
||||
|
||||
\courier{gcc\} 3.4.[0123] for x86 produces incorrect SSE2 code for
|
||||
FFTW when \courier{-O2\} (the best choice for FFTW) is used, causing
|
||||
FFTW to crash (\courier{make check\} crashes). This bug is fixed in
|
||||
\courier{gcc\} 3.4.4. On x86_64 (amd64/em64t), \courier{gcc\} 3.4.4
|
||||
reportedly still has a similar problem, but this is fixed as of
|
||||
\courier{gcc\} 3.4.6.
|
||||
|
||||
\courier{gcc-3.2\} for x86 produces incorrect SIMD code if
|
||||
\courier{-O3\} is used. The same compiler produces incorrect SIMD
|
||||
code if no optimization is used, too. When using \courier{gcc-3.2\},
|
||||
it is a good idea not to change the default \courier{CFLAGS\} selected
|
||||
by the \courier{configure\} script.
|
||||
|
||||
Some 3.0.x and 3.1.x versions of \courier{gcc\} on \courier{x86\} may
|
||||
crash. \courier{gcc\} so-called 2.96 shipping with RedHat 7.3 crashes
|
||||
when compiling SIMD code. In both cases, please upgrade to
|
||||
\courier{gcc-3.2\} or later.
|
||||
|
||||
Intel's \courier{icc\} 6.0 misaligns SSE constants, but FFTW has a
|
||||
workaround. \courier{icc\} 8.x fails to compile FFTW 3.0.x because it
|
||||
falsely claims to be \courier{gcc\}; we believe this to be a bug in
|
||||
\courier{icc\}, but FFTW 3.1 has a workaround.
|
||||
|
||||
Visual C++ 2003 reportedly produces incorrect code for SSE/SSE2 when
|
||||
compiling FFTW. This bug was reportedly fixed in VC++ 2005;
|
||||
alternatively, you could switch to the Intel compiler. VC++ 6.0 also
|
||||
reportedly produces incorrect code for the file
|
||||
\courier{reodft11e-r2hc-odd.c\} unless optimizations are disabled for
|
||||
that file.
|
||||
|
||||
\courier{gcc\} 2.95 on MacOS X miscompiles AltiVec code (fixed in
|
||||
later versions). \courier{gcc\} 3.2.x miscompiles AltiVec
|
||||
permutations, but FFTW has a workaround. \courier{gcc\} 4.0.1 on
|
||||
MacOS for Intel crashes when compiling FFTW; a workaround is to
|
||||
compile one file without optimization: \courier{cd kernel; make
|
||||
CFLAGS=" " trig.lo\}.
|
||||
|
||||
\courier{gcc\} 4.1.1 reportedly crashes when compiling FFTW for MIPS;
|
||||
the workaround is to compile the file it crashes on
|
||||
(\courier{t2_64.c\}) with a lower optimization level.
|
||||
|
||||
\courier{gcc\} versions 4.1.2 to 4.2.0 for x86 reportedly miscompile
|
||||
FFTW 3.1's test program, causing \courier{make check\} to crash
|
||||
(\courier{gcc\} bug #26528). The bug was reportedly fixed in
|
||||
\courier{gcc\} version 4.2.1 and later. A workaround is to compile
|
||||
\courier{libbench2/verify-lib.c\} without optimization.
|
||||
|
||||
\question 26aug:solarisSucks FFTW does not compile on Solaris, complaining about \courier{const\}.
|
||||
|
||||
We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you
|
||||
might get error messages from \courier{make\} such as
|
||||
|
||||
\courier{"./fftw.h", line 88: warning: const is a keyword in ANSI C\}
|
||||
|
||||
This is the case when the \courier{configure\} script reports that
|
||||
\courier{const\} does not work:
|
||||
|
||||
\courier{checking for working const... (cached) no\}
|
||||
|
||||
You should be aware that Solaris comes with two compilers, namely,
|
||||
\courier{/opt/SUNWspro/SC4.2/bin/cc\} and \courier{/usr/ucb/cc\}. The
|
||||
latter compiler is non-ANSI. Indeed, it is a perverse shell script
|
||||
that calls the real compiler in non-ANSI mode. In order
|
||||
to compile FFTW, change your path so that the right \courier{cc\}
|
||||
is used.
|
||||
|
||||
To know whether your compiler is the right one, type
|
||||
\courier{cc -V\}. If the compiler prints ``\courier{ucbcc\}'',
|
||||
as in
|
||||
|
||||
\courier{ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2\}
|
||||
|
||||
then the compiler is wrong. The right message is something like
|
||||
|
||||
\courier{cc: WorkShop Compilers 4.2 30 Oct 1996 C 4.2\}
|
||||
|
||||
\question 19mar:3dnow What's the difference between \courier{--enable-3dnow\} and \courier{--enable-k7\}?
|
||||
|
||||
\courier{--enable-k7\} enables 3DNow! instructions on K7 processors
|
||||
(AMD Athlon and its variants). K7 support is provided by assembly
|
||||
routines generated by a special purpose compiler.
|
||||
As of fftw-3.2, --enable-k7 is no longer supported.
|
||||
|
||||
\courier{--enable-3dnow\} enables generic 3DNow! support using
|
||||
\courier{gcc\} builtin functions. This works on earlier AMD
|
||||
processors, but it is not as fast as our special assembly routines.
|
||||
As of fftw-3.1, --enable-3dnow is no longer supported.
|
||||
|
||||
\question 18apr:fma What's the difference between the fma and the non-fma versions?
|
||||
|
||||
The fma version tries to exploit the fused multiply-add instructions
|
||||
implemented in many processors such as PowerPC, ia-64, and MIPS. The
|
||||
two FFTW packages are otherwise identical. In FFTW 3.1, the fma and
|
||||
non-fma versions were merged together into a single package, and the
|
||||
\courier{configure\} script attempts to automatically guess which
|
||||
version to use.
|
||||
|
||||
The FFTW 3.1 \courier{configure\} script enables fma by default on
|
||||
PowerPC, Itanium, and PA-RISC, and disables it otherwise. You can
|
||||
force one or the other by using the \courier{--enable-fma\} or
|
||||
\courier{--disable-fma\} flag for \courier{configure\}.
|
||||
|
||||
Definitely use fma if you have a PowerPC-based system with
|
||||
\courier{gcc\} (or IBM \courier{xlc\}). This includes all GNU/Linux
|
||||
systems for PowerPC and the older PowerPC-based MacOS systems. Also
|
||||
use it on PA-RISC and Itanium with the HP/UX compiler.
|
||||
|
||||
Definitely do not use the fma version if you have an ia-32 processor
|
||||
(Intel, AMD, MacOS on Intel, etcetera).
|
||||
|
||||
For other architectures/compilers, the situation is not so clear. For
|
||||
example, ia-64 has the fma instruction, but \courier{gcc-3.2\} appears
|
||||
not to exploit it correctly. Other compilers may do the right thing,
|
||||
but we have not tried them. Please send us your feedback so that we
|
||||
can update this FAQ entry.
|
||||
|
||||
\question 26aug:languages Which language is FFTW written in?
|
||||
|
||||
FFTW is written in ANSI C. Most of the code, however, was
|
||||
automatically generated by a program called \courier{genfft\}, written
|
||||
in the Objective Caml dialect of ML. You do not need to know ML or to
|
||||
have an Objective Caml compiler in order to use FFTW.
|
||||
|
||||
\courier{genfft\} is provided with the FFTW sources, which means that
|
||||
you can play with the code generator if you want. In this case, you
|
||||
need a working Objective Caml system. Objective Caml is available
|
||||
from \docref{the Caml web page\}.
|
||||
|
||||
\question 26aug:fortran Can I call FFTW from Fortran?
|
||||
|
||||
Yes, FFTW (versions 1.3 and higher) contains a Fortran-callable
|
||||
interface, documented in the FFTW manual.
|
||||
|
||||
By default, FFTW configures its Fortran interface to work with the
|
||||
first compiler it finds, e.g. \courier{g77\}. To configure for a
|
||||
different, incompatible Fortran compiler \courier{foobar\}, use
|
||||
\courier{./configure F77=foobar\} when installing FFTW. (In the case
|
||||
of \courier{g77\}, however, FFTW 3.x also includes an extra set of
|
||||
Fortran-callable routines with one less underscore at the end of
|
||||
identifiers, which should cover most other Fortran compilers on Linux
|
||||
at least.)
|
||||
|
||||
\question 26aug:cplusplus Can I call FFTW from C++?
|
||||
|
||||
Most definitely. FFTW should compile and/or link under any C++
|
||||
compiler. Moreover, it is likely that the C++ \courier{<complex>\}
|
||||
template class is bit-compatible with FFTW's complex-number format
|
||||
(see the FFTW manual for more details).
|
||||
|
||||
\question 26aug:whynotfortran Why isn't FFTW written in Fortran/C++?
|
||||
|
||||
Because we don't like those languages, and neither approaches the
|
||||
portability of C.
|
||||
|
||||
\question 29mar:singleprec How do I compile FFTW to run in single precision?
|
||||
|
||||
On a Unix system: \courier{configure --enable-float\}. On a non-Unix
|
||||
system: edit \courier{config.h\} to \courier{#define\} the symbol
|
||||
\courier{FFTW_SINGLE\} (for FFTW 3.x). In both cases, you must then
|
||||
recompile FFTW. In FFTW 3, all FFTW identifiers will then begin with
|
||||
\courier{fftwf_\} instead of \courier{fftw_\}.
|
||||
|
||||
\question 28mar:64bitk7 --enable-k7 does not work on x86-64
|
||||
|
||||
Support for --enable-k7 was discontinued in fftw-3.2.
|
||||
|
||||
The fftw-3.1 release supports --enable-k7. This option only works on
|
||||
32-bit x86 machines that implement 3DNow!, including the AMD Athlon
|
||||
and the AMD Opteron in 32-bit mode. --enable-k7 does not work on AMD
|
||||
Opteron in 64-bit mode. Use --enable-sse for x86-64 machines.
|
||||
|
||||
FFTW supports 3DNow! by means of assembly code generated by a
|
||||
special-purpose compiler. It is hard to produce assembly code that
|
||||
works in both 32-bit and 64-bit mode.
|
||||
|
||||
\comment ######################################################################
|
||||
|
||||
\section Using FFTW
|
||||
|
||||
\question 15mar:fftw2to3 Why not support the FFTW 2 interface in FFTW 3?
|
||||
|
||||
FFTW 3 has semantics incompatible with earlier versions: its plans can
|
||||
only be used for a given stride, multiplicity, and other
|
||||
characteristics of the input and output arrays; these stronger
|
||||
semantics are necessary for performance reasons. Thus, it is
|
||||
impossible to efficiently emulate the older interface (whose plans can
|
||||
be used for any transform of the same size). We believe that it
|
||||
should be possible to upgrade most programs without any difficulty,
|
||||
however.
|
||||
|
||||
\question 20mar:planperarray Why do FFTW 3 plans encapsulate the input/output arrays and not just the algorithm?
|
||||
|
||||
There are several reasons:
|
||||
|
||||
\call startlist
|
||||
\call item
|
||||
It was important for performance reasons that the plan be specific to
|
||||
array characteristics like the stride (and alignment, for SIMD), and
|
||||
requiring that the user maintain these invariants is error prone.
|
||||
\call item
|
||||
In most high-performance applications, as far as we can tell, you are
|
||||
usually transforming the same array over and over, so FFTW's semantics
|
||||
should not be a burden.
|
||||
\call item
|
||||
If you need to transform another array of the same size, creating a
|
||||
new plan once the first exists is a cheap operation.
|
||||
\call item
|
||||
If you need to transform many arrays of the same size at once, you
|
||||
should really use the \courier{plan_many\} routines in FFTW's "advanced"
|
||||
interface.
|
||||
\call item
|
||||
If the abovementioned array characteristics are the same, you are
|
||||
willing to pay close attention to the documentation, and you really
|
||||
need to, we provide a "new-array execution" interface to apply a plan
|
||||
to a new array.
|
||||
\call endlist
|
||||
|
||||
\question 25may:slow FFTW seems really slow.
|
||||
|
||||
You are probably recreating the plan before every transform, rather
|
||||
than creating it once and reusing it for all transforms of the same
|
||||
size. FFTW is designed to be used in the following way:
|
||||
|
||||
\call startlist
|
||||
\call item
|
||||
First, you create a plan. This will take several seconds.
|
||||
\call item
|
||||
Then, you reuse the plan many times to perform FFTs. These are fast.
|
||||
\call endlist
|
||||
|
||||
If you don't need to compute many transforms and the time for the
|
||||
planner is significant, you have two options. First, you can use the
|
||||
\courier{FFTW_ESTIMATE\} option in the planner, which uses heuristics
|
||||
instead of runtime measurements and produces a good plan in a short
|
||||
time. Second, you can use the wisdom feature to precompute the plan;
|
||||
see \qref savePlans
|
||||
|
||||
\question 22oct:slows FFTW slows down after repeated calls.
|
||||
|
||||
Probably, NaNs or similar are creeping into your data, and the
|
||||
slowdown is due to the resulting floating-point exceptions. For
|
||||
example, be aware that repeatedly FFTing the same array is a diverging
|
||||
process (because FFTW computes the unnormalized transform).
|
||||
|
||||
\question 22oct:segfault An FFTW routine is crashing when I call it.
|
||||
|
||||
Did the FFTW test programs pass (\courier{make check\}, or \courier{cd
|
||||
tests; make bigcheck\} if you want to be paranoid)? If so, you almost
|
||||
certainly have a bug in your own code. For example, you could be
|
||||
passing invalid arguments (such as wrongly-sized arrays) to FFTW, or
|
||||
you could simply have memory corruption elsewhere in your program that
|
||||
causes random crashes later on. Please don't complain to us unless
|
||||
you can come up with a minimal self-contained program (preferably
|
||||
under 30 lines) that illustrates the problem.
|
||||
|
||||
\question 22oct:fortran64 My Fortran program crashes when calling FFTW.
|
||||
|
||||
As described in the manual, on 64-bit machines you must store the
|
||||
plans in variables large enough to hold a pointer, for example
|
||||
\courier{integer*8\}. We recommend using \courier{integer*8\} on
|
||||
32-bit machines as well, to simplify porting.
|
||||
|
||||
\question 24mar:conventions FFTW gives results different from my old FFT.
|
||||
|
||||
People follow many different conventions for the DFT, and you should
|
||||
be sure to know the ones that we use (described in the FFTW manual).
|
||||
In particular, you should be aware that the
|
||||
\courier{FFTW_FORWARD\}/\courier{FFTW_BACKWARD\} directions correspond
|
||||
to signs of -1/+1 in the exponent of the DFT definition.
|
||||
(\italic{Numerical Recipes\} uses the opposite convention.)
|
||||
|
||||
You should also know that we compute an unnormalized transform. In
|
||||
contrast, Matlab is an example of program that computes a normalized
|
||||
transform. See \qref whyscaled.
|
||||
|
||||
Finally, note that floating-point arithmetic is not exact, so
|
||||
different FFT algorithms will give slightly different results (on the
|
||||
order of the numerical accuracy; typically a fractional difference of
|
||||
1e-15 or so in double precision).
|
||||
|
||||
\question 31aug:nondeterministic FFTW gives different results between runs
|
||||
|
||||
If you use \courier{FFTW_MEASURE\} or \courier{FFTW_PATIENT\} mode,
|
||||
then the algorithm FFTW employs is not deterministic: it depends on
|
||||
runtime performance measurements. This will cause the results to vary
|
||||
slightly from run to run. However, the differences should be slight,
|
||||
on the order of the floating-point precision, and therefore should
|
||||
have no practical impact on most applications.
|
||||
|
||||
If you use saved plans (wisdom) or \courier{FFTW_ESTIMATE\} mode,
|
||||
however, then the algorithm is deterministic and the results should be
|
||||
identical between runs.
|
||||
|
||||
\question 26aug:savePlans Can I save FFTW's plans?
|
||||
|
||||
Yes. Starting with version 1.2, FFTW provides the \courier{wisdom\}
|
||||
mechanism for saving plans; see the FFTW manual.
|
||||
|
||||
\question 14sep:whyscaled Why does your inverse transform return a scaled result?
|
||||
|
||||
Computing the forward transform followed by the backward transform (or
|
||||
vice versa) yields the original array scaled by the size of the array.
|
||||
(For multi-dimensional transforms, the size of the array is the
|
||||
product of the dimensions.) We could, instead, have chosen a
|
||||
normalization that would have returned the unscaled array. Or, to
|
||||
accomodate the many conventions in this matter, the transform routines
|
||||
could have accepted a "scale factor" parameter. We did not do this,
|
||||
however, for two reasons. First, we didn't want to sacrifice
|
||||
performance in the common case where the scale factor is 1. Second, in
|
||||
real applications the FFT is followed or preceded by some computation
|
||||
on the data, into which the scale factor can typically be absorbed at
|
||||
little or no cost.
|
||||
|
||||
\question 02dec:centerorigin How can I make FFTW put the origin (zero frequency) at the center of its output?
|
||||
|
||||
For human viewing of a spectrum, it is often convenient to put the
|
||||
origin in frequency space at the center of the output array, rather
|
||||
than in the zero-th element (the default in FFTW). If all of the
|
||||
dimensions of your array are even, you can accomplish this by simply
|
||||
multiplying each element of the input array by (-1)^(i + j + ...),
|
||||
where i, j, etcetera are the indices of the element. (This trick is a
|
||||
general property of the DFT, and is not specific to FFTW.)
|
||||
|
||||
\question 08may:imageaudio How do I FFT an image/audio file in \italic{foobar\} format?
|
||||
|
||||
FFTW performs an FFT on an array of floating-point values. You can
|
||||
certainly use it to compute the transform of an image or audio stream,
|
||||
but you are responsible for figuring out your data format and
|
||||
converting it to the form FFTW requires.
|
||||
|
||||
\question 09apr:linkfails My program does not link (on Unix).
|
||||
|
||||
The libraries must be listed in the correct order (\courier{-lfftw3
|
||||
-lm\} for FFTW 3.x) and \italic{after\} your program sources/objects.
|
||||
(The general rule is that if \italic{A\} uses \italic{B\}, then
|
||||
\italic{A\} must be listed before \italic{B\} in the link command.).
|
||||
|
||||
\question 15mar:linkheader I included your header, but linking still fails.
|
||||
|
||||
You're a C++ programmer, aren't you? You have to compile the FFTW
|
||||
library and link it into your program, not just \courier{#include
|
||||
<fftw3.h>\}. (Yes, this is really a FAQ.)
|
||||
|
||||
\question 22oct:nostack My program crashes, complaining about stack space.
|
||||
|
||||
You cannot declare large arrays with automatic storage (e.g. via
|
||||
\courier{fftw_complex array[N]\}); you should use
|
||||
\courier{fftw_malloc\} (or equivalent) to allocate the arrays you want
|
||||
to transform if they are larger than a few hundred elements.
|
||||
|
||||
\question 13may:leaks FFTW seems to have a memory leak.
|
||||
|
||||
After you create a plan, FFTW caches the information required to
|
||||
quickly recreate the plan. (See \qref savePlans) It also maintains a
|
||||
small amount of other persistent memory. You can deallocate all of
|
||||
FFTW's internally allocated memory, if you wish, by calling
|
||||
\courier{fftw_cleanup()\}, as documented in the manual.
|
||||
|
||||
\question 16may:allzero The output of FFTW's transform is all zeros.
|
||||
|
||||
You should initialize your input array \italic{after\} creating the
|
||||
plan, unless you use \courier{FFTW_ESTIMATE\}: planning with
|
||||
\courier{FFTW_MEASURE\} or \courier{FFTW_PATIENT\} overwrites the
|
||||
input/output arrays, as described in the manual.
|
||||
|
||||
\question 05sep:vbetalia How do I call FFTW from the Microsoft language du jour?
|
||||
|
||||
Please \italic{do not\} ask us Windows-specific questions. We do not
|
||||
use Windows. We know nothing about Visual Basic, Visual C++, or .NET.
|
||||
Please find the appropriate Usenet discussion group and ask your
|
||||
question there. See also \qref runOnWindows.
|
||||
|
||||
\question 15oct:pruned Can I compute only a subset of the DFT outputs?
|
||||
|
||||
In general, no, an FFT intrinsically computes all outputs from all
|
||||
inputs. In principle, there is something called a \italic{pruned
|
||||
FFT\} that can do what you want, but to compute K outputs out of N the
|
||||
complexity is in general O(N log K) instead of O(N log N), thus saving
|
||||
only a small additive factor in the log. (The same argument holds if
|
||||
you instead have only K nonzero inputs.)
|
||||
|
||||
There are some specific cases in which you can get the O(N log K)
|
||||
performance benefits easily, however, by combining a few ordinary
|
||||
FFTs. In particular, the case where you want the first K outputs,
|
||||
where K divides N, can be handled by performing N/K transforms of size
|
||||
K and then summing the outputs multiplied by appropriate phase
|
||||
factors. For more details, see \docref{pruned FFTs with FFTW\}.
|
||||
|
||||
There are also some algorithms that compute pruned transforms
|
||||
\italic{approximately\}, but they are beyond the scope of this FAQ.
|
||||
|
||||
\question 21jan:transpose Can I use FFTW's routines for in-place and out-of-place matrix transposition?
|
||||
|
||||
You can use the FFTW guru interface to create a rank-0 transform of
|
||||
vector rank 2 where the vector strides are transposed. (A rank-0
|
||||
transform is equivalent to a 1D transform of size 1, which. just
|
||||
copies the input into the output.) Specifying the same location for
|
||||
the input and output makes the transpose in-place.
|
||||
|
||||
For double-valued data stored in row-major format, plan creation looks like
|
||||
this:
|
||||
|
||||
\verbatim
|
||||
fftw_plan plan_transpose(int rows, int cols, double *in, double *out)
|
||||
{
|
||||
const unsigned flags = FFTW_ESTIMATE; /* other flags are possible */
|
||||
fftw_iodim howmany_dims[2];
|
||||
|
||||
howmany_dims[0].n = rows;
|
||||
howmany_dims[0].is = cols;
|
||||
howmany_dims[0].os = 1;
|
||||
|
||||
howmany_dims[1].n = cols;
|
||||
howmany_dims[1].is = 1;
|
||||
howmany_dims[1].os = rows;
|
||||
|
||||
return fftw_plan_guru_r2r(/*rank=*/ 0, /*dims=*/ NULL,
|
||||
/*howmany_rank=*/ 2, howmany_dims,
|
||||
in, out, /*kind=*/ NULL, flags);
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
(This entry was written by Rhys Ulerich.)
|
||||
|
||||
\comment ######################################################################
|
||||
|
||||
\section Internals of FFTW
|
||||
|
||||
\question 26aug:howworks How does FFTW work?
|
||||
|
||||
The innovation (if it can be so called) in FFTW consists in having a
|
||||
variety of composable \italic{solvers\}, representing different FFT
|
||||
algorithms and implementation strategies, whose combination into a
|
||||
particular \italic{plan\} for a given size can be determined at
|
||||
runtime according to the characteristics of your machine/compiler.
|
||||
This peculiar software architecture allows FFTW to adapt itself to
|
||||
almost any machine.
|
||||
|
||||
For more details (albeit somewhat outdated), see the paper "FFTW: An
|
||||
Adaptive Software Architecture for the FFT", by M. Frigo and
|
||||
S. G. Johnson, \italic{Proc. ICASSP\} 3, 1381 (1998), also
|
||||
available at \docref{the FFTW web page\}.
|
||||
|
||||
\question 26aug:whyfast Why is FFTW so fast?
|
||||
|
||||
This is a complex question, and there is no simple answer. In fact,
|
||||
the authors do not fully know the answer, either. In addition to many
|
||||
small performance hacks throughout FFTW, there are three general
|
||||
reasons for FFTW's speed.
|
||||
|
||||
\call startlist
|
||||
\call item
|
||||
FFTW uses a variety of FFT algorithms and implementation styles
|
||||
that can be arbitrarily composed to adapt itself to
|
||||
a machine. See \qref howworks.
|
||||
\call item
|
||||
FFTW uses a code generator to produce highly-optimized
|
||||
routines for computing small transforms.
|
||||
\call item
|
||||
FFTW uses explicit divide-and-conquer to take advantage
|
||||
of the memory hierarchy.
|
||||
\call endlist
|
||||
|
||||
For more details (albeit somewhat outdated), see the paper "FFTW: An
|
||||
Adaptive Software Architecture for the FFT", by M. Frigo and
|
||||
S. G. Johnson, \italic{Proc. ICASSP\} 3, 1381 (1998),
|
||||
available along with other references at \docref{the FFTW web page\}.
|
||||
|
||||
\comment ######################################################################
|
||||
|
||||
\section Known bugs
|
||||
|
||||
\question 27aug:rfftwndbug FFTW 1.1 crashes in rfftwnd on Linux.
|
||||
|
||||
This bug was fixed in FFTW 1.2. There was a bug in \courier{rfftwnd\}
|
||||
causing an incorrect amount of memory to be allocated. The bug showed
|
||||
up in Linux with libc-5.3.12 (and nowhere else that we know of).
|
||||
|
||||
\question 15oct:fftwmpibug The MPI transforms in FFTW 1.2 give incorrect results/leak memory.
|
||||
|
||||
These bugs were corrected in FFTW 1.2.1. The MPI transforms (really,
|
||||
just the transpose routines) in FFTW 1.2 had bugs that could cause
|
||||
errors in some situations.
|
||||
|
||||
\question 05nov:testsingbug The test programs in FFTW 1.2.1 fail when I change FFTW to use single precision.
|
||||
|
||||
This bug was fixed in FFTW 1.3. (Older versions of FFTW did
|
||||
work in single precision, but the test programs didn't--the error
|
||||
tolerances in the tests were set for double precision.)
|
||||
|
||||
\question 24mar:teststoobig The test program in FFTW 1.2.1 fails for n > 46340.
|
||||
|
||||
This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer,
|
||||
but the test program was wrong. For large n, n*n in the naive
|
||||
transform that we used for comparison overflows 32 bit integer
|
||||
precision, breaking the test.
|
||||
|
||||
\question 24aug:linuxthreads The threaded code fails on Linux Redhat 5.0
|
||||
|
||||
We had problems with glibc-2.0.5. The code should work with
|
||||
glibc-2.0.7.
|
||||
|
||||
\question 26sep:bigrfftwnd FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final dimension >= 65536.
|
||||
|
||||
This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer overflow due
|
||||
to a poorly-parenthesized expression.)
|
||||
|
||||
\question 26mar:primebug FFTW 2.0's complex transforms give the wrong results with prime factors 17 to 97.
|
||||
|
||||
There was a bug in the complex transforms that could cause incorrect
|
||||
results under (hopefully rare) circumstances for lengths with
|
||||
intermediate-size prime factors (17-97). This bug was fixed in FFTW
|
||||
2.1.1.
|
||||
|
||||
\question 05apr:mpichbug FFTW 2.1.1's MPI test programs crash with MPICH.
|
||||
|
||||
This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs crashed
|
||||
when using the MPICH implementation of MPI with the \courier{ch_p4\}
|
||||
device (TCP/IP); the transforms themselves worked fine.
|
||||
|
||||
\question 25may:aixthreadbug FFTW 2.1.2's multi-threaded transforms don't work on AIX.
|
||||
|
||||
This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in
|
||||
previous versions didn't work with AIX's \courier{pthreads\}
|
||||
implementation, which idiosyncratically creates threads in detached
|
||||
(non-joinable) mode by default.
|
||||
|
||||
\question 27sep:bigprimebug FFTW 2.1.2's complex transforms give incorrect results for large prime sizes.
|
||||
|
||||
This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm
|
||||
for prime sizes (in versions 2.0 to 2.1.2) had an integer overflow
|
||||
problem that caused incorrect results for many primes greater than
|
||||
32768 (on 32-bit machines). (Sizes without large prime factors are
|
||||
not affected.)
|
||||
|
||||
\question 25may:solaristhreadbug FFTW 2.1.3's multi-threaded transforms don't give any speedup on Solaris.
|
||||
|
||||
This bug was fixed in FFTW 2.1.4. (By default, Solaris creates
|
||||
threads that do not parallelize over multiple processors, so one has
|
||||
to request the proper behavior specifically.)
|
||||
|
||||
\question 03may:aixflags FFTW 2.1.3 crashes on AIX.
|
||||
|
||||
The FFTW 2.1.3 \courier{configure\} script picked incorrect compiler
|
||||
flags for the \courier{xlc\} compiler on newer IBM processors. This
|
||||
is fixed in FFTW 2.1.4.
|
||||
|
||||
\comment Here it ends!
|
||||
|
||||
110
fftw-3.3.10/doc/FAQ/fftw-faq.html/index.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head><title>
|
||||
FFTW Frequently Asked Questions with Answers
|
||||
</title>
|
||||
<link rev="made" href="mailto:fftw@fftw.org">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<META name="description"
|
||||
content="Frequently asked questions and answers (FAQ) for FFTW.">
|
||||
<link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
<LINK rel="Bookmark" title="FFTW Home Page"
|
||||
href="http://www.fftw.org">
|
||||
<LINK rel="Bookmark" title="FFTW Manual"
|
||||
href="http://www.fftw.org/doc/">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
FFTW Frequently Asked Questions with Answers
|
||||
</h1>
|
||||
This is the list of Frequently Asked Questions about FFTW, a
|
||||
collection of fast C routines for computing the Discrete Fourier
|
||||
Transform in one or more dimensions.
|
||||
<h1>
|
||||
Index
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li><b><font size="+2"><a href="section1.html" rel=subdocument>Section 1. Introduction and General Information</a></font></b>
|
||||
<li><a href="section1.html#whatisfftw" rel=subdocument>Q1.1. What is FFTW?</a>
|
||||
<li><a href="section1.html#whereisfftw" rel=subdocument>Q1.2. How do I obtain FFTW?</a>
|
||||
<li><a href="section1.html#isfftwfree" rel=subdocument>Q1.3. Is FFTW free software?</a>
|
||||
<li><a href="section1.html#nonfree" rel=subdocument>Q1.4. What is this about non-free licenses?</a>
|
||||
<li><a href="section1.html#west" rel=subdocument>Q1.5. In the West? I thought MIT was in the East?</a>
|
||||
<br><br><li><b><font size="+2"><a href="section2.html" rel=subdocument>Section 2. Installing FFTW</a></font></b>
|
||||
<li><a href="section2.html#systems" rel=subdocument>Q2.1. Which systems does FFTW run on?</a>
|
||||
<li><a href="section2.html#runOnWindows" rel=subdocument>Q2.2. Does FFTW run on Windows?</a>
|
||||
<li><a href="section2.html#compilerCrashes" rel=subdocument>Q2.3. My compiler has trouble with FFTW.</a>
|
||||
<li><a href="section2.html#solarisSucks" rel=subdocument>Q2.4. FFTW does not compile on Solaris, complaining about
|
||||
<code>const</code>.</a>
|
||||
<li><a href="section2.html#3dnow" rel=subdocument>Q2.5. What's the difference between <code>--enable-3dnow</code> and <code>--enable-k7</code>?</a>
|
||||
<li><a href="section2.html#fma" rel=subdocument>Q2.6. What's the difference between the fma and the non-fma
|
||||
versions?</a>
|
||||
<li><a href="section2.html#languages" rel=subdocument>Q2.7. Which language is FFTW written in?</a>
|
||||
<li><a href="section2.html#fortran" rel=subdocument>Q2.8. Can I call FFTW from Fortran?</a>
|
||||
<li><a href="section2.html#cplusplus" rel=subdocument>Q2.9. Can I call FFTW from C++?</a>
|
||||
<li><a href="section2.html#whynotfortran" rel=subdocument>Q2.10. Why isn't FFTW written in Fortran/C++?</a>
|
||||
<li><a href="section2.html#singleprec" rel=subdocument>Q2.11. How do I compile FFTW to run in single precision?</a>
|
||||
<li><a href="section2.html#64bitk7" rel=subdocument>Q2.12. --enable-k7 does not work on x86-64</a>
|
||||
<br><br><li><b><font size="+2"><a href="section3.html" rel=subdocument>Section 3. Using FFTW</a></font></b>
|
||||
<li><a href="section3.html#fftw2to3" rel=subdocument>Q3.1. Why not support the FFTW 2 interface in FFTW
|
||||
3?</a>
|
||||
<li><a href="section3.html#planperarray" rel=subdocument>Q3.2. Why do FFTW 3 plans encapsulate the input/output arrays and not just
|
||||
the algorithm?</a>
|
||||
<li><a href="section3.html#slow" rel=subdocument>Q3.3. FFTW seems really slow.</a>
|
||||
<li><a href="section3.html#slows" rel=subdocument>Q3.4. FFTW slows down after repeated calls.</a>
|
||||
<li><a href="section3.html#segfault" rel=subdocument>Q3.5. An FFTW routine is crashing when I call it.</a>
|
||||
<li><a href="section3.html#fortran64" rel=subdocument>Q3.6. My Fortran program crashes when calling FFTW.</a>
|
||||
<li><a href="section3.html#conventions" rel=subdocument>Q3.7. FFTW gives results different from my old
|
||||
FFT.</a>
|
||||
<li><a href="section3.html#nondeterministic" rel=subdocument>Q3.8. FFTW gives different results between runs</a>
|
||||
<li><a href="section3.html#savePlans" rel=subdocument>Q3.9. Can I save FFTW's plans?</a>
|
||||
<li><a href="section3.html#whyscaled" rel=subdocument>Q3.10. Why does your inverse transform return a scaled
|
||||
result?</a>
|
||||
<li><a href="section3.html#centerorigin" rel=subdocument>Q3.11. How can I make FFTW put the origin (zero frequency) at the center of
|
||||
its output?</a>
|
||||
<li><a href="section3.html#imageaudio" rel=subdocument>Q3.12. How do I FFT an image/audio file in <i>foobar</i> format?</a>
|
||||
<li><a href="section3.html#linkfails" rel=subdocument>Q3.13. My program does not link (on Unix).</a>
|
||||
<li><a href="section3.html#linkheader" rel=subdocument>Q3.14. I included your header, but linking still
|
||||
fails.</a>
|
||||
<li><a href="section3.html#nostack" rel=subdocument>Q3.15. My program crashes, complaining about stack
|
||||
space.</a>
|
||||
<li><a href="section3.html#leaks" rel=subdocument>Q3.16. FFTW seems to have a memory leak.</a>
|
||||
<li><a href="section3.html#allzero" rel=subdocument>Q3.17. The output of FFTW's transform is all zeros.</a>
|
||||
<li><a href="section3.html#vbetalia" rel=subdocument>Q3.18. How do I call FFTW from the Microsoft language du
|
||||
jour?</a>
|
||||
<li><a href="section3.html#pruned" rel=subdocument>Q3.19. Can I compute only a subset of the DFT outputs?</a>
|
||||
<li><a href="section3.html#transpose" rel=subdocument>Q3.20. Can I use FFTW's routines for in-place and out-of-place matrix
|
||||
transposition?</a>
|
||||
<br><br><li><b><font size="+2"><a href="section4.html" rel=subdocument>Section 4. Internals of FFTW</a></font></b>
|
||||
<li><a href="section4.html#howworks" rel=subdocument>Q4.1. How does FFTW work?</a>
|
||||
<li><a href="section4.html#whyfast" rel=subdocument>Q4.2. Why is FFTW so fast?</a>
|
||||
<br><br><li><b><font size="+2"><a href="section5.html" rel=subdocument>Section 5. Known bugs</a></font></b>
|
||||
<li><a href="section5.html#rfftwndbug" rel=subdocument>Q5.1. FFTW 1.1 crashes in rfftwnd on Linux.</a>
|
||||
<li><a href="section5.html#fftwmpibug" rel=subdocument>Q5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak
|
||||
memory.</a>
|
||||
<li><a href="section5.html#testsingbug" rel=subdocument>Q5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single
|
||||
precision.</a>
|
||||
<li><a href="section5.html#teststoobig" rel=subdocument>Q5.4. The test program in FFTW 1.2.1 fails for n >
|
||||
46340.</a>
|
||||
<li><a href="section5.html#linuxthreads" rel=subdocument>Q5.5. The threaded code fails on Linux Redhat 5.0</a>
|
||||
<li><a href="section5.html#bigrfftwnd" rel=subdocument>Q5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final
|
||||
dimension >= 65536.</a>
|
||||
<li><a href="section5.html#primebug" rel=subdocument>Q5.7. FFTW 2.0's complex transforms give the wrong results with prime
|
||||
factors 17 to 97.</a>
|
||||
<li><a href="section5.html#mpichbug" rel=subdocument>Q5.8. FFTW 2.1.1's MPI test programs crash with
|
||||
MPICH.</a>
|
||||
<li><a href="section5.html#aixthreadbug" rel=subdocument>Q5.9. FFTW 2.1.2's multi-threaded transforms don't work on
|
||||
AIX.</a>
|
||||
<li><a href="section5.html#bigprimebug" rel=subdocument>Q5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime
|
||||
sizes.</a>
|
||||
<li><a href="section5.html#solaristhreadbug" rel=subdocument>Q5.11. FFTW 2.1.3's multi-threaded transforms don't give any speedup on
|
||||
Solaris.</a>
|
||||
<li><a href="section5.html#aixflags" rel=subdocument>Q5.12. FFTW 2.1.3 crashes on AIX.</a>
|
||||
</ul><hr>
|
||||
<address>
|
||||
<A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
- 14 September 2021
|
||||
</address><br>
|
||||
Extracted from FFTW Frequently Asked Questions with Answers,
|
||||
Copyright © 2021 Matteo Frigo and Massachusetts Institute of Technology.
|
||||
</body></html>
|
||||
85
fftw-3.3.10/doc/FAQ/fftw-faq.html/section1.html
Normal file
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head><title>
|
||||
FFTW FAQ - Section 1
|
||||
</title>
|
||||
<link rev="made" href="mailto:fftw@fftw.org">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<link rel="Next" href="section2.html"><link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
FFTW FAQ - Section 1 <br>
|
||||
Introduction and General Information
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#whatisfftw" rel=subdocument>Q1.1. What is FFTW?</a>
|
||||
<li><a href="#whereisfftw" rel=subdocument>Q1.2. How do I obtain FFTW?</a>
|
||||
<li><a href="#isfftwfree" rel=subdocument>Q1.3. Is FFTW free software?</a>
|
||||
<li><a href="#nonfree" rel=subdocument>Q1.4. What is this about non-free licenses?</a>
|
||||
<li><a href="#west" rel=subdocument>Q1.5. In the West? I thought MIT was in the East?</a>
|
||||
</ul><hr>
|
||||
|
||||
<h2><A name="whatisfftw">
|
||||
Question 1.1. What is FFTW?
|
||||
</A></h2>
|
||||
|
||||
FFTW is a free collection of fast C routines for computing the
|
||||
Discrete Fourier Transform in one or more dimensions. It includes
|
||||
complex, real, symmetric, and parallel transforms, and can handle
|
||||
arbitrary array sizes efficiently. FFTW is typically faster than
|
||||
other publically-available FFT implementations, and is even
|
||||
competitive with vendor-tuned libraries. (See our web page for
|
||||
extensive benchmarks.) To achieve this performance, FFTW uses novel
|
||||
code-generation and runtime self-optimization techniques (along with
|
||||
many other tricks).
|
||||
<h2><A name="whereisfftw">
|
||||
Question 1.2. How do I obtain FFTW?
|
||||
</A></h2>
|
||||
|
||||
FFTW can be found at <A href="http://www.fftw.org">the FFTW web page</A>. You can also retrieve it from <code>ftp.fftw.org</code> in <A href="ftp://ftp.fftw.org/pub/fftw"><code>/pub/fftw</code></A>.
|
||||
<h2><A name="isfftwfree">
|
||||
Question 1.3. Is FFTW free software?
|
||||
</A></h2>
|
||||
|
||||
Starting with version 1.3, FFTW is Free Software in the technical
|
||||
sense defined by the Free Software Foundation (see
|
||||
<A href="http://www.gnu.org/philosophy/categories.html">Categories of Free and Non-Free Software</A>), and is distributed under the terms of the GNU General Public License. Previous versions of FFTW were
|
||||
distributed without fee for noncommercial use, but were not
|
||||
technically ``free.''
|
||||
<p>
|
||||
Non-free licenses for FFTW are also available that permit different
|
||||
terms of use than the GPL.
|
||||
<h2><A name="nonfree">
|
||||
Question 1.4. What is this about non-free
|
||||
licenses?
|
||||
</A></h2>
|
||||
|
||||
The non-free licenses are for companies that wish to use FFTW in their
|
||||
products but are unwilling to release their software under the GPL
|
||||
(which would require them to release source code and allow free
|
||||
redistribution). Such users can purchase an unlimited-use license
|
||||
from MIT. Contact us for more details.
|
||||
|
||||
<p>
|
||||
We could instead have released FFTW under the LGPL, or even disallowed
|
||||
non-Free usage. Suffice it to say, however, that MIT owns the
|
||||
copyright to FFTW and they only let us GPL it because we convinced
|
||||
them that it would neither affect their licensing revenue nor irritate
|
||||
existing licensees.
|
||||
<h2><A name="west">
|
||||
Question 1.5. In the West? I thought MIT was in the
|
||||
East?
|
||||
</A></h2>
|
||||
|
||||
Not to an Italian. You could say that we're a Spaghetti Western
|
||||
(with apologies to Sergio Leone). <hr>
|
||||
Next: <a href="section2.html" rel=precedes>Installing FFTW</a>.<br>
|
||||
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
|
||||
<address>
|
||||
<A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
- 14 September 2021
|
||||
</address><br>
|
||||
Extracted from FFTW Frequently Asked Questions with Answers,
|
||||
Copyright © 2021 Matteo Frigo and Massachusetts Institute of Technology.
|
||||
</body></html>
|
||||
285
fftw-3.3.10/doc/FAQ/fftw-faq.html/section2.html
Normal file
@@ -0,0 +1,285 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head><title>
|
||||
FFTW FAQ - Section 2
|
||||
</title>
|
||||
<link rev="made" href="mailto:fftw@fftw.org">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<link rel="Next" href="section3.html"><link rel="Previous" href="section1.html"><link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
FFTW FAQ - Section 2 <br>
|
||||
Installing FFTW
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#systems" rel=subdocument>Q2.1. Which systems does FFTW run on?</a>
|
||||
<li><a href="#runOnWindows" rel=subdocument>Q2.2. Does FFTW run on Windows?</a>
|
||||
<li><a href="#compilerCrashes" rel=subdocument>Q2.3. My compiler has trouble with FFTW.</a>
|
||||
<li><a href="#solarisSucks" rel=subdocument>Q2.4. FFTW does not compile on Solaris, complaining about
|
||||
<code>const</code>.</a>
|
||||
<li><a href="#3dnow" rel=subdocument>Q2.5. What's the difference between <code>--enable-3dnow</code> and <code>--enable-k7</code>?</a>
|
||||
<li><a href="#fma" rel=subdocument>Q2.6. What's the difference between the fma and the non-fma
|
||||
versions?</a>
|
||||
<li><a href="#languages" rel=subdocument>Q2.7. Which language is FFTW written in?</a>
|
||||
<li><a href="#fortran" rel=subdocument>Q2.8. Can I call FFTW from Fortran?</a>
|
||||
<li><a href="#cplusplus" rel=subdocument>Q2.9. Can I call FFTW from C++?</a>
|
||||
<li><a href="#whynotfortran" rel=subdocument>Q2.10. Why isn't FFTW written in Fortran/C++?</a>
|
||||
<li><a href="#singleprec" rel=subdocument>Q2.11. How do I compile FFTW to run in single precision?</a>
|
||||
<li><a href="#64bitk7" rel=subdocument>Q2.12. --enable-k7 does not work on x86-64</a>
|
||||
</ul><hr>
|
||||
|
||||
<h2><A name="systems">
|
||||
Question 2.1. Which systems does FFTW run
|
||||
on?
|
||||
</A></h2>
|
||||
|
||||
FFTW is written in ANSI C, and should work on any system with a decent
|
||||
C compiler. (See also <A href="#runOnWindows">Q2.2 `Does FFTW run on Windows?'</A>, <A href="#compilerCrashes">Q2.3 `My compiler has trouble with FFTW.'</A>.) FFTW can also take advantage of certain hardware-specific features,
|
||||
such as cycle counters and SIMD instructions, but this is optional.
|
||||
|
||||
<h2><A name="runOnWindows">
|
||||
Question 2.2. Does FFTW run on Windows?
|
||||
</A></h2>
|
||||
|
||||
Yes, many people have reported successfully using FFTW on Windows with
|
||||
various compilers. FFTW was not developed on Windows, but the source
|
||||
code is essentially straight ANSI C. See also the
|
||||
<A href="http://www.fftw.org/install/windows.html">FFTW Windows installation notes</A>, <A href="#compilerCrashes">Q2.3 `My compiler has trouble with FFTW.'</A>, and <A href="section3.html#vbetalia">Q3.18 `How do I call FFTW from the Microsoft language du
|
||||
jour?'</A>.
|
||||
<h2><A name="compilerCrashes">
|
||||
Question 2.3. My compiler has trouble with
|
||||
FFTW.
|
||||
</A></h2>
|
||||
|
||||
Complain fiercely to the vendor of the compiler.
|
||||
|
||||
<p>
|
||||
We have successfully used <code>gcc</code> 3.2.x on x86 and PPC, a recent Compaq C compiler for Alpha, version 6 of IBM's
|
||||
<code>xlc</code> compiler for AIX, Intel's <code>icc</code> versions 5-7, and Sun WorkShop <code>cc</code> version 6.
|
||||
<p>
|
||||
FFTW is likely to push compilers to their limits, however, and several
|
||||
compiler bugs have been exposed by FFTW. A partial list follows.
|
||||
|
||||
<p>
|
||||
<code>gcc</code> 2.95.x for Solaris/SPARC produces incorrect code for
|
||||
the test program (workaround: recompile the
|
||||
<code>libbench2</code> directory with <code>-O2</code>).
|
||||
<p>
|
||||
NetBSD/macppc 1.6 comes with a <code>gcc</code> version that also miscompiles the test program. (Please report a workaround if you know
|
||||
one.)
|
||||
<p>
|
||||
<code>gcc</code> 3.2.3 for ARM reportedly crashes during compilation.
|
||||
This bug is reportedly fixed in later versions of
|
||||
<code>gcc</code>.
|
||||
<p>
|
||||
Versions 8.0 and 8.1 of Intel's <code>icc</code> falsely claim to be <code>gcc</code>, so you should specify <code>CC="icc -no-gcc"</code>; this is automatic in FFTW 3.1. <code>icc-8.0.066</code> reportely produces incorrect code for FFTW 2.1.5, but is fixed in version 8.1.
|
||||
<code>icc-7.1</code> compiler build 20030402Z appears to produce
|
||||
incorrect dependencies, causing the compilation to fail.
|
||||
<code>icc-7.1</code> build 20030307Z appears to work fine. (Use
|
||||
<code>icc -V</code> to check which build you have.) As of 2003/04/18,
|
||||
build 20030402Z appears not to be available any longer on Intel's
|
||||
website, whereas the older build 20030307Z is available.
|
||||
|
||||
<p>
|
||||
<code>ranlib</code> of GNU <code>binutils</code> 2.9.1 on Irix has been observed to corrupt the FFTW libraries, causing a link failure when
|
||||
FFTW is compiled. Since <code>ranlib</code> is completely superfluous on Irix, we suggest deleting it from your system and replacing it with
|
||||
a symbolic link to <code>/bin/echo</code>.
|
||||
<p>
|
||||
If support for SIMD instructions is enabled in FFTW, further compiler
|
||||
problems may appear:
|
||||
<p>
|
||||
<code>gcc</code> 3.4.[0123] for x86 produces incorrect SSE2 code for
|
||||
FFTW when <code>-O2</code> (the best choice for FFTW) is used, causing
|
||||
FFTW to crash (<code>make check</code> crashes). This bug is fixed in <code>gcc</code> 3.4.4. On x86_64 (amd64/em64t), <code>gcc</code> 3.4.4 reportedly still has a similar problem, but this is fixed as of
|
||||
<code>gcc</code> 3.4.6.
|
||||
<p>
|
||||
<code>gcc-3.2</code> for x86 produces incorrect SIMD code if
|
||||
<code>-O3</code> is used. The same compiler produces incorrect SIMD
|
||||
code if no optimization is used, too. When using
|
||||
<code>gcc-3.2</code>, it is a good idea not to change the default
|
||||
<code>CFLAGS</code> selected by the <code>configure</code> script.
|
||||
<p>
|
||||
Some 3.0.x and 3.1.x versions of <code>gcc</code> on <code>x86</code> may crash. <code>gcc</code> so-called 2.96 shipping with RedHat 7.3 crashes
|
||||
when compiling SIMD code. In both cases, please upgrade to
|
||||
<code>gcc-3.2</code> or later.
|
||||
<p>
|
||||
Intel's <code>icc</code> 6.0 misaligns SSE constants, but FFTW has a
|
||||
workaround. <code>icc</code> 8.x fails to compile FFTW 3.0.x because it
|
||||
falsely claims to be <code>gcc</code>; we believe this to be a bug in <code>icc</code>, but FFTW 3.1 has a workaround.
|
||||
<p>
|
||||
Visual C++ 2003 reportedly produces incorrect code for SSE/SSE2 when
|
||||
compiling FFTW. This bug was reportedly fixed in VC++ 2005;
|
||||
alternatively, you could switch to the Intel compiler. VC++ 6.0 also
|
||||
reportedly produces incorrect code for the file
|
||||
<code>reodft11e-r2hc-odd.c</code> unless optimizations are disabled for that file.
|
||||
<p>
|
||||
<code>gcc</code> 2.95 on MacOS X miscompiles AltiVec code (fixed in
|
||||
later versions). <code>gcc</code> 3.2.x miscompiles AltiVec permutations, but FFTW has a workaround.
|
||||
<code>gcc</code> 4.0.1 on MacOS for Intel crashes when compiling FFTW; a workaround is to
|
||||
compile one file without optimization: <code>cd kernel; make CFLAGS=" " trig.lo</code>.
|
||||
<p>
|
||||
<code>gcc</code> 4.1.1 reportedly crashes when compiling FFTW for MIPS;
|
||||
the workaround is to compile the file it crashes on
|
||||
(<code>t2_64.c</code>) with a lower optimization level.
|
||||
<p>
|
||||
<code>gcc</code> versions 4.1.2 to 4.2.0 for x86 reportedly miscompile
|
||||
FFTW 3.1's test program, causing <code>make check</code> to crash (<code>gcc</code> bug #26528). The bug was reportedly fixed in
|
||||
<code>gcc</code> version 4.2.1 and later. A workaround is to compile
|
||||
<code>libbench2/verify-lib.c</code> without optimization.
|
||||
<h2><A name="solarisSucks">
|
||||
Question 2.4. FFTW does not compile on Solaris, complaining about
|
||||
<code>const</code>.
|
||||
</A></h2>
|
||||
|
||||
We know that at least on Solaris 2.5.x with Sun's compilers 4.2 you
|
||||
might get error messages from <code>make</code> such as
|
||||
<p>
|
||||
<code>"./fftw.h", line 88: warning: const is a keyword in ANSI
|
||||
C</code>
|
||||
<p>
|
||||
This is the case when the <code>configure</code> script reports that <code>const</code> does not work:
|
||||
<p>
|
||||
<code>checking for working const... (cached) no</code>
|
||||
<p>
|
||||
You should be aware that Solaris comes with two compilers, namely,
|
||||
<code>/opt/SUNWspro/SC4.2/bin/cc</code> and <code>/usr/ucb/cc</code>. The latter compiler is non-ANSI. Indeed, it is a perverse shell script
|
||||
that calls the real compiler in non-ANSI mode. In order
|
||||
to compile FFTW, change your path so that the right
|
||||
<code>cc</code> is used.
|
||||
<p>
|
||||
To know whether your compiler is the right one, type
|
||||
<code>cc -V</code>. If the compiler prints ``<code>ucbcc</code>'', as in
|
||||
<p>
|
||||
<code>ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C
|
||||
4.2</code>
|
||||
<p>
|
||||
then the compiler is wrong. The right message is something like
|
||||
|
||||
<p>
|
||||
<code>cc: WorkShop Compilers 4.2 30 Oct 1996 C
|
||||
4.2</code>
|
||||
<h2><A name="3dnow">
|
||||
Question 2.5. What's the difference between
|
||||
<code>--enable-3dnow</code> and <code>--enable-k7</code>?
|
||||
</A></h2>
|
||||
|
||||
<code>--enable-k7</code> enables 3DNow! instructions on K7 processors
|
||||
(AMD Athlon and its variants). K7 support is provided by assembly
|
||||
routines generated by a special purpose compiler.
|
||||
As of fftw-3.2, --enable-k7 is no longer supported.
|
||||
|
||||
<p>
|
||||
<code>--enable-3dnow</code> enables generic 3DNow! support using <code>gcc</code> builtin functions. This works on earlier AMD
|
||||
processors, but it is not as fast as our special assembly routines.
|
||||
As of fftw-3.1, --enable-3dnow is no longer supported.
|
||||
|
||||
<h2><A name="fma">
|
||||
Question 2.6. What's the difference between the fma and the non-fma
|
||||
versions?
|
||||
</A></h2>
|
||||
|
||||
The fma version tries to exploit the fused multiply-add instructions
|
||||
implemented in many processors such as PowerPC, ia-64, and MIPS. The
|
||||
two FFTW packages are otherwise identical. In FFTW 3.1, the fma and
|
||||
non-fma versions were merged together into a single package, and the
|
||||
<code>configure</code> script attempts to automatically guess which
|
||||
version to use.
|
||||
<p>
|
||||
The FFTW 3.1 <code>configure</code> script enables fma by default on PowerPC, Itanium, and PA-RISC, and disables it otherwise. You can
|
||||
force one or the other by using the <code>--enable-fma</code> or <code>--disable-fma</code> flag for <code>configure</code>.
|
||||
<p>
|
||||
Definitely use fma if you have a PowerPC-based system with
|
||||
<code>gcc</code> (or IBM <code>xlc</code>). This includes all GNU/Linux systems for PowerPC and the older PowerPC-based MacOS systems. Also
|
||||
use it on PA-RISC and Itanium with the HP/UX compiler.
|
||||
|
||||
<p>
|
||||
Definitely do not use the fma version if you have an ia-32 processor
|
||||
(Intel, AMD, MacOS on Intel, etcetera).
|
||||
|
||||
<p>
|
||||
For other architectures/compilers, the situation is not so clear. For
|
||||
example, ia-64 has the fma instruction, but
|
||||
<code>gcc-3.2</code> appears not to exploit it correctly. Other compilers may do the right thing,
|
||||
but we have not tried them. Please send us your feedback so that we
|
||||
can update this FAQ entry.
|
||||
<h2><A name="languages">
|
||||
Question 2.7. Which language is FFTW written
|
||||
in?
|
||||
</A></h2>
|
||||
|
||||
FFTW is written in ANSI C. Most of the code, however, was
|
||||
automatically generated by a program called
|
||||
<code>genfft</code>, written in the Objective Caml dialect of ML. You do not need to know ML or to
|
||||
have an Objective Caml compiler in order to use FFTW.
|
||||
|
||||
<p>
|
||||
<code>genfft</code> is provided with the FFTW sources, which means that
|
||||
you can play with the code generator if you want. In this case, you
|
||||
need a working Objective Caml system. Objective Caml is available
|
||||
from <A href="http://caml.inria.fr">the Caml web page</A>.
|
||||
<h2><A name="fortran">
|
||||
Question 2.8. Can I call FFTW from Fortran?
|
||||
</A></h2>
|
||||
|
||||
Yes, FFTW (versions 1.3 and higher) contains a Fortran-callable
|
||||
interface, documented in the FFTW manual.
|
||||
|
||||
<p>
|
||||
By default, FFTW configures its Fortran interface to work with the
|
||||
first compiler it finds, e.g. <code>g77</code>. To configure for a different, incompatible Fortran compiler
|
||||
<code>foobar</code>, use <code>./configure F77=foobar</code> when installing FFTW. (In the case of <code>g77</code>, however, FFTW 3.x also includes an extra set of
|
||||
Fortran-callable routines with one less underscore at the end of
|
||||
identifiers, which should cover most other Fortran compilers on Linux
|
||||
at least.)
|
||||
<h2><A name="cplusplus">
|
||||
Question 2.9. Can I call FFTW from C++?
|
||||
</A></h2>
|
||||
|
||||
Most definitely. FFTW should compile and/or link under any C++
|
||||
compiler. Moreover, it is likely that the C++
|
||||
<code><complex></code> template class is bit-compatible with FFTW's complex-number format
|
||||
(see the FFTW manual for more details).
|
||||
|
||||
<h2><A name="whynotfortran">
|
||||
Question 2.10. Why isn't FFTW written in
|
||||
Fortran/C++?
|
||||
</A></h2>
|
||||
|
||||
Because we don't like those languages, and neither approaches the
|
||||
portability of C.
|
||||
<h2><A name="singleprec">
|
||||
Question 2.11. How do I compile FFTW to run in single
|
||||
precision?
|
||||
</A></h2>
|
||||
|
||||
On a Unix system: <code>configure --enable-float</code>. On a non-Unix system: edit <code>config.h</code> to <code>#define</code> the symbol <code>FFTW_SINGLE</code> (for FFTW 3.x). In both cases, you must then
|
||||
recompile FFTW. In FFTW 3, all FFTW identifiers will then begin with
|
||||
<code>fftwf_</code> instead of <code>fftw_</code>.
|
||||
<h2><A name="64bitk7">
|
||||
Question 2.12. --enable-k7 does not work on
|
||||
x86-64
|
||||
</A></h2>
|
||||
|
||||
Support for --enable-k7 was discontinued in fftw-3.2.
|
||||
|
||||
<p>
|
||||
The fftw-3.1 release supports --enable-k7. This option only works on
|
||||
32-bit x86 machines that implement 3DNow!, including the AMD Athlon
|
||||
and the AMD Opteron in 32-bit mode. --enable-k7 does not work on AMD
|
||||
Opteron in 64-bit mode. Use --enable-sse for x86-64 machines.
|
||||
|
||||
<p>
|
||||
FFTW supports 3DNow! by means of assembly code generated by a
|
||||
special-purpose compiler. It is hard to produce assembly code that
|
||||
works in both 32-bit and 64-bit mode. <hr>
|
||||
Next: <a href="section3.html" rel=precedes>Using FFTW</a>.<br>
|
||||
Back: <a href="section1.html" rev=precedes>Introduction and General Information</a>.<br>
|
||||
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
|
||||
<address>
|
||||
<A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
- 14 September 2021
|
||||
</address><br>
|
||||
Extracted from FFTW Frequently Asked Questions with Answers,
|
||||
Copyright © 2021 Matteo Frigo and Massachusetts Institute of Technology.
|
||||
</body></html>
|
||||
334
fftw-3.3.10/doc/FAQ/fftw-faq.html/section3.html
Normal file
@@ -0,0 +1,334 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head><title>
|
||||
FFTW FAQ - Section 3
|
||||
</title>
|
||||
<link rev="made" href="mailto:fftw@fftw.org">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<link rel="Next" href="section4.html"><link rel="Previous" href="section2.html"><link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
FFTW FAQ - Section 3 <br>
|
||||
Using FFTW
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#fftw2to3" rel=subdocument>Q3.1. Why not support the FFTW 2 interface in FFTW
|
||||
3?</a>
|
||||
<li><a href="#planperarray" rel=subdocument>Q3.2. Why do FFTW 3 plans encapsulate the input/output arrays and not just
|
||||
the algorithm?</a>
|
||||
<li><a href="#slow" rel=subdocument>Q3.3. FFTW seems really slow.</a>
|
||||
<li><a href="#slows" rel=subdocument>Q3.4. FFTW slows down after repeated calls.</a>
|
||||
<li><a href="#segfault" rel=subdocument>Q3.5. An FFTW routine is crashing when I call it.</a>
|
||||
<li><a href="#fortran64" rel=subdocument>Q3.6. My Fortran program crashes when calling FFTW.</a>
|
||||
<li><a href="#conventions" rel=subdocument>Q3.7. FFTW gives results different from my old
|
||||
FFT.</a>
|
||||
<li><a href="#nondeterministic" rel=subdocument>Q3.8. FFTW gives different results between runs</a>
|
||||
<li><a href="#savePlans" rel=subdocument>Q3.9. Can I save FFTW's plans?</a>
|
||||
<li><a href="#whyscaled" rel=subdocument>Q3.10. Why does your inverse transform return a scaled
|
||||
result?</a>
|
||||
<li><a href="#centerorigin" rel=subdocument>Q3.11. How can I make FFTW put the origin (zero frequency) at the center of
|
||||
its output?</a>
|
||||
<li><a href="#imageaudio" rel=subdocument>Q3.12. How do I FFT an image/audio file in <i>foobar</i> format?</a>
|
||||
<li><a href="#linkfails" rel=subdocument>Q3.13. My program does not link (on Unix).</a>
|
||||
<li><a href="#linkheader" rel=subdocument>Q3.14. I included your header, but linking still
|
||||
fails.</a>
|
||||
<li><a href="#nostack" rel=subdocument>Q3.15. My program crashes, complaining about stack
|
||||
space.</a>
|
||||
<li><a href="#leaks" rel=subdocument>Q3.16. FFTW seems to have a memory leak.</a>
|
||||
<li><a href="#allzero" rel=subdocument>Q3.17. The output of FFTW's transform is all zeros.</a>
|
||||
<li><a href="#vbetalia" rel=subdocument>Q3.18. How do I call FFTW from the Microsoft language du
|
||||
jour?</a>
|
||||
<li><a href="#pruned" rel=subdocument>Q3.19. Can I compute only a subset of the DFT outputs?</a>
|
||||
<li><a href="#transpose" rel=subdocument>Q3.20. Can I use FFTW's routines for in-place and out-of-place matrix
|
||||
transposition?</a>
|
||||
</ul><hr>
|
||||
|
||||
<h2><A name="fftw2to3">
|
||||
Question 3.1. Why not support the FFTW 2 interface in FFTW
|
||||
3?
|
||||
</A></h2>
|
||||
|
||||
FFTW 3 has semantics incompatible with earlier versions: its plans can
|
||||
only be used for a given stride, multiplicity, and other
|
||||
characteristics of the input and output arrays; these stronger
|
||||
semantics are necessary for performance reasons. Thus, it is
|
||||
impossible to efficiently emulate the older interface (whose plans can
|
||||
be used for any transform of the same size). We believe that it
|
||||
should be possible to upgrade most programs without any difficulty,
|
||||
however.
|
||||
<h2><A name="planperarray">
|
||||
Question 3.2. Why do FFTW 3 plans encapsulate the input/output arrays
|
||||
and not just the algorithm?
|
||||
</A></h2>
|
||||
|
||||
There are several reasons:
|
||||
<ul>
|
||||
<li>It was important for performance reasons that the plan be specific to
|
||||
array characteristics like the stride (and alignment, for SIMD), and
|
||||
requiring that the user maintain these invariants is error prone.
|
||||
|
||||
<li>In most high-performance applications, as far as we can tell, you are
|
||||
usually transforming the same array over and over, so FFTW's semantics
|
||||
should not be a burden.
|
||||
<li>If you need to transform another array of the same size, creating a
|
||||
new plan once the first exists is a cheap operation.
|
||||
|
||||
<li>If you need to transform many arrays of the same size at once, you
|
||||
should really use the <code>plan_many</code> routines in FFTW's "advanced"
|
||||
interface.
|
||||
<li>If the abovementioned array characteristics are the same, you are
|
||||
willing to pay close attention to the documentation, and you really
|
||||
need to, we provide a "new-array execution" interface to
|
||||
apply a plan to a new array.
|
||||
</ul>
|
||||
|
||||
<h2><A name="slow">
|
||||
Question 3.3. FFTW seems really slow.
|
||||
</A></h2>
|
||||
|
||||
You are probably recreating the plan before every transform, rather
|
||||
than creating it once and reusing it for all transforms of the same
|
||||
size. FFTW is designed to be used in the following way:
|
||||
|
||||
<ul>
|
||||
<li>First, you create a plan. This will take several seconds.
|
||||
|
||||
<li>Then, you reuse the plan many times to perform FFTs. These are fast.
|
||||
|
||||
</ul>
|
||||
If you don't need to compute many transforms and the time for the
|
||||
planner is significant, you have two options. First, you can use the
|
||||
<code>FFTW_ESTIMATE</code> option in the planner, which uses heuristics
|
||||
instead of runtime measurements and produces a good plan in a short
|
||||
time. Second, you can use the wisdom feature to precompute the plan;
|
||||
see <A href="#savePlans">Q3.9 `Can I save FFTW's plans?'</A>
|
||||
<h2><A name="slows">
|
||||
Question 3.4. FFTW slows down after repeated
|
||||
calls.
|
||||
</A></h2>
|
||||
|
||||
Probably, NaNs or similar are creeping into your data, and the
|
||||
slowdown is due to the resulting floating-point exceptions. For
|
||||
example, be aware that repeatedly FFTing the same array is a diverging
|
||||
process (because FFTW computes the unnormalized transform).
|
||||
|
||||
<h2><A name="segfault">
|
||||
Question 3.5. An FFTW routine is crashing when I call
|
||||
it.
|
||||
</A></h2>
|
||||
|
||||
Did the FFTW test programs pass (<code>make check</code>, or <code>cd tests; make bigcheck</code> if you want to be paranoid)? If so, you almost
|
||||
certainly have a bug in your own code. For example, you could be
|
||||
passing invalid arguments (such as wrongly-sized arrays) to FFTW, or
|
||||
you could simply have memory corruption elsewhere in your program that
|
||||
causes random crashes later on. Please don't complain to us unless
|
||||
you can come up with a minimal self-contained program (preferably
|
||||
under 30 lines) that illustrates the problem.
|
||||
|
||||
<h2><A name="fortran64">
|
||||
Question 3.6. My Fortran program crashes when calling
|
||||
FFTW.
|
||||
</A></h2>
|
||||
|
||||
As described in the manual, on 64-bit machines you must store the
|
||||
plans in variables large enough to hold a pointer, for example
|
||||
<code>integer*8</code>. We recommend using <code>integer*8</code> on 32-bit machines as well, to simplify porting.
|
||||
|
||||
<h2><A name="conventions">
|
||||
Question 3.7. FFTW gives results different from my old
|
||||
FFT.
|
||||
</A></h2>
|
||||
|
||||
People follow many different conventions for the DFT, and you should
|
||||
be sure to know the ones that we use (described in the FFTW manual).
|
||||
In particular, you should be aware that the
|
||||
<code>FFTW_FORWARD</code>/<code>FFTW_BACKWARD</code> directions correspond to signs of -1/+1 in the exponent of the DFT definition.
|
||||
(<i>Numerical Recipes</i> uses the opposite convention.)
|
||||
<p>
|
||||
You should also know that we compute an unnormalized transform. In
|
||||
contrast, Matlab is an example of program that computes a normalized
|
||||
transform. See <A href="#whyscaled">Q3.10 `Why does your inverse transform return a scaled
|
||||
result?'</A>.
|
||||
<p>
|
||||
Finally, note that floating-point arithmetic is not exact, so
|
||||
different FFT algorithms will give slightly different results (on the
|
||||
order of the numerical accuracy; typically a fractional difference of
|
||||
1e-15 or so in double precision).
|
||||
<h2><A name="nondeterministic">
|
||||
Question 3.8. FFTW gives different results between
|
||||
runs
|
||||
</A></h2>
|
||||
|
||||
If you use <code>FFTW_MEASURE</code> or <code>FFTW_PATIENT</code> mode, then the algorithm FFTW employs is not deterministic: it depends on
|
||||
runtime performance measurements. This will cause the results to vary
|
||||
slightly from run to run. However, the differences should be slight,
|
||||
on the order of the floating-point precision, and therefore should
|
||||
have no practical impact on most applications.
|
||||
|
||||
<p>
|
||||
If you use saved plans (wisdom) or <code>FFTW_ESTIMATE</code> mode, however, then the algorithm is deterministic and the results should be
|
||||
identical between runs.
|
||||
<h2><A name="savePlans">
|
||||
Question 3.9. Can I save FFTW's plans?
|
||||
</A></h2>
|
||||
|
||||
Yes. Starting with version 1.2, FFTW provides the
|
||||
<code>wisdom</code> mechanism for saving plans; see the FFTW manual.
|
||||
|
||||
<h2><A name="whyscaled">
|
||||
Question 3.10. Why does your inverse transform return a scaled
|
||||
result?
|
||||
</A></h2>
|
||||
|
||||
Computing the forward transform followed by the backward transform (or
|
||||
vice versa) yields the original array scaled by the size of the array.
|
||||
(For multi-dimensional transforms, the size of the array is the
|
||||
product of the dimensions.) We could, instead, have chosen a
|
||||
normalization that would have returned the unscaled array. Or, to
|
||||
accomodate the many conventions in this matter, the transform routines
|
||||
could have accepted a "scale factor" parameter. We did not
|
||||
do this, however, for two reasons. First, we didn't want to sacrifice
|
||||
performance in the common case where the scale factor is 1. Second, in
|
||||
real applications the FFT is followed or preceded by some computation
|
||||
on the data, into which the scale factor can typically be absorbed at
|
||||
little or no cost.
|
||||
<h2><A name="centerorigin">
|
||||
Question 3.11. How can I make FFTW put the origin (zero frequency) at
|
||||
the center of its output?
|
||||
</A></h2>
|
||||
|
||||
For human viewing of a spectrum, it is often convenient to put the
|
||||
origin in frequency space at the center of the output array, rather
|
||||
than in the zero-th element (the default in FFTW). If all of the
|
||||
dimensions of your array are even, you can accomplish this by simply
|
||||
multiplying each element of the input array by (-1)^(i + j + ...),
|
||||
where i, j, etcetera are the indices of the element. (This trick is a
|
||||
general property of the DFT, and is not specific to FFTW.)
|
||||
|
||||
<h2><A name="imageaudio">
|
||||
Question 3.12. How do I FFT an image/audio file in
|
||||
<i>foobar</i> format?
|
||||
</A></h2>
|
||||
|
||||
FFTW performs an FFT on an array of floating-point values. You can
|
||||
certainly use it to compute the transform of an image or audio stream,
|
||||
but you are responsible for figuring out your data format and
|
||||
converting it to the form FFTW requires.
|
||||
|
||||
<h2><A name="linkfails">
|
||||
Question 3.13. My program does not link (on
|
||||
Unix).
|
||||
</A></h2>
|
||||
|
||||
The libraries must be listed in the correct order
|
||||
(<code>-lfftw3 -lm</code> for FFTW 3.x) and <i>after</i> your program sources/objects. (The general rule is that if <i>A</i> uses <i>B</i>, then <i>A</i> must be listed before <i>B</i> in the link command.).
|
||||
<h2><A name="linkheader">
|
||||
Question 3.14. I included your header, but linking still
|
||||
fails.
|
||||
</A></h2>
|
||||
|
||||
You're a C++ programmer, aren't you? You have to compile the FFTW
|
||||
library and link it into your program, not just
|
||||
<code>#include <fftw3.h></code>. (Yes, this is really a FAQ.)
|
||||
<h2><A name="nostack">
|
||||
Question 3.15. My program crashes, complaining about stack
|
||||
space.
|
||||
</A></h2>
|
||||
|
||||
You cannot declare large arrays with automatic storage (e.g. via
|
||||
<code>fftw_complex array[N]</code>); you should use <code>fftw_malloc</code> (or equivalent) to allocate the arrays you want
|
||||
to transform if they are larger than a few hundred elements.
|
||||
|
||||
<h2><A name="leaks">
|
||||
Question 3.16. FFTW seems to have a memory
|
||||
leak.
|
||||
</A></h2>
|
||||
|
||||
After you create a plan, FFTW caches the information required to
|
||||
quickly recreate the plan. (See <A href="#savePlans">Q3.9 `Can I save FFTW's plans?'</A>) It also maintains a small amount of other persistent memory. You can deallocate all of
|
||||
FFTW's internally allocated memory, if you wish, by calling
|
||||
<code>fftw_cleanup()</code>, as documented in the manual.
|
||||
<h2><A name="allzero">
|
||||
Question 3.17. The output of FFTW's transform is all
|
||||
zeros.
|
||||
</A></h2>
|
||||
|
||||
You should initialize your input array <i>after</i> creating the plan, unless you use <code>FFTW_ESTIMATE</code>: planning with <code>FFTW_MEASURE</code> or <code>FFTW_PATIENT</code> overwrites the input/output arrays, as described in the manual.
|
||||
|
||||
<h2><A name="vbetalia">
|
||||
Question 3.18. How do I call FFTW from the Microsoft language du
|
||||
jour?
|
||||
</A></h2>
|
||||
|
||||
Please <i>do not</i> ask us Windows-specific questions. We do not
|
||||
use Windows. We know nothing about Visual Basic, Visual C++, or .NET.
|
||||
Please find the appropriate Usenet discussion group and ask your
|
||||
question there. See also <A href="section2.html#runOnWindows">Q2.2 `Does FFTW run on Windows?'</A>.
|
||||
<h2><A name="pruned">
|
||||
Question 3.19. Can I compute only a subset of the DFT
|
||||
outputs?
|
||||
</A></h2>
|
||||
|
||||
In general, no, an FFT intrinsically computes all outputs from all
|
||||
inputs. In principle, there is something called a
|
||||
<i>pruned FFT</i> that can do what you want, but to compute K outputs out of N the
|
||||
complexity is in general O(N log K) instead of O(N log N), thus saving
|
||||
only a small additive factor in the log. (The same argument holds if
|
||||
you instead have only K nonzero inputs.)
|
||||
|
||||
<p>
|
||||
There are some specific cases in which you can get the O(N log K)
|
||||
performance benefits easily, however, by combining a few ordinary
|
||||
FFTs. In particular, the case where you want the first K outputs,
|
||||
where K divides N, can be handled by performing N/K transforms of size
|
||||
K and then summing the outputs multiplied by appropriate phase
|
||||
factors. For more details, see <A href="http://www.fftw.org/pruned.html">pruned FFTs with FFTW</A>.
|
||||
<p>
|
||||
There are also some algorithms that compute pruned transforms
|
||||
<i>approximately</i>, but they are beyond the scope of this FAQ.
|
||||
|
||||
<h2><A name="transpose">
|
||||
Question 3.20. Can I use FFTW's routines for in-place and
|
||||
out-of-place matrix transposition?
|
||||
</A></h2>
|
||||
|
||||
You can use the FFTW guru interface to create a rank-0 transform of
|
||||
vector rank 2 where the vector strides are transposed. (A rank-0
|
||||
transform is equivalent to a 1D transform of size 1, which. just
|
||||
copies the input into the output.) Specifying the same location for
|
||||
the input and output makes the transpose in-place.
|
||||
|
||||
<p>
|
||||
For double-valued data stored in row-major format, plan creation looks
|
||||
like this: <pre>
|
||||
fftw_plan plan_transpose(int rows, int cols, double *in, double *out)
|
||||
{
|
||||
const unsigned flags = FFTW_ESTIMATE; /* other flags are possible */
|
||||
fftw_iodim howmany_dims[2];
|
||||
|
||||
howmany_dims[0].n = rows;
|
||||
howmany_dims[0].is = cols;
|
||||
howmany_dims[0].os = 1;
|
||||
|
||||
howmany_dims[1].n = cols;
|
||||
howmany_dims[1].is = 1;
|
||||
howmany_dims[1].os = rows;
|
||||
|
||||
return fftw_plan_guru_r2r(/*rank=*/ 0, /*dims=*/ NULL,
|
||||
/*howmany_rank=*/ 2, howmany_dims,
|
||||
in, out, /*kind=*/ NULL, flags);
|
||||
}
|
||||
</pre>
|
||||
(This entry was written by Rhys Ulerich.)
|
||||
<hr>
|
||||
Next: <a href="section4.html" rel=precedes>Internals of FFTW</a>.<br>
|
||||
Back: <a href="section2.html" rev=precedes>Installing FFTW</a>.<br>
|
||||
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
|
||||
<address>
|
||||
<A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
- 14 September 2021
|
||||
</address><br>
|
||||
Extracted from FFTW Frequently Asked Questions with Answers,
|
||||
Copyright © 2021 Matteo Frigo and Massachusetts Institute of Technology.
|
||||
</body></html>
|
||||
64
fftw-3.3.10/doc/FAQ/fftw-faq.html/section4.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head><title>
|
||||
FFTW FAQ - Section 4
|
||||
</title>
|
||||
<link rev="made" href="mailto:fftw@fftw.org">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<link rel="Next" href="section5.html"><link rel="Previous" href="section3.html"><link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
FFTW FAQ - Section 4 <br>
|
||||
Internals of FFTW
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#howworks" rel=subdocument>Q4.1. How does FFTW work?</a>
|
||||
<li><a href="#whyfast" rel=subdocument>Q4.2. Why is FFTW so fast?</a>
|
||||
</ul><hr>
|
||||
|
||||
<h2><A name="howworks">
|
||||
Question 4.1. How does FFTW work?
|
||||
</A></h2>
|
||||
|
||||
The innovation (if it can be so called) in FFTW consists in having a
|
||||
variety of composable <i>solvers</i>, representing different FFT algorithms and implementation strategies, whose combination into a
|
||||
particular <i>plan</i> for a given size can be determined at runtime according to the characteristics of your machine/compiler.
|
||||
This peculiar software architecture allows FFTW to adapt itself to
|
||||
almost any machine.
|
||||
<p>
|
||||
For more details (albeit somewhat outdated), see the paper "FFTW:
|
||||
An Adaptive Software Architecture for the FFT", by M. Frigo and
|
||||
S. G. Johnson, <i>Proc. ICASSP</i> 3, 1381 (1998), also available at <A href="http://www.fftw.org">the FFTW web page</A>.
|
||||
<h2><A name="whyfast">
|
||||
Question 4.2. Why is FFTW so fast?
|
||||
</A></h2>
|
||||
|
||||
This is a complex question, and there is no simple answer. In fact,
|
||||
the authors do not fully know the answer, either. In addition to many
|
||||
small performance hacks throughout FFTW, there are three general
|
||||
reasons for FFTW's speed.
|
||||
<ul>
|
||||
<li> FFTW uses a variety of FFT algorithms and implementation styles
|
||||
that can be arbitrarily composed to adapt itself to
|
||||
a machine. See <A href="#howworks">Q4.1 `How does FFTW work?'</A>.
|
||||
<li> FFTW uses a code generator to produce highly-optimized
|
||||
routines for computing small transforms.
|
||||
|
||||
<li> FFTW uses explicit divide-and-conquer to take advantage
|
||||
of the memory hierarchy.
|
||||
</ul>
|
||||
For more details (albeit somewhat outdated), see the paper "FFTW:
|
||||
An Adaptive Software Architecture for the FFT", by M. Frigo and
|
||||
S. G. Johnson, <i>Proc. ICASSP</i> 3, 1381 (1998), available along with other references at
|
||||
<A href="http://www.fftw.org">the FFTW web page</A>. <hr>
|
||||
Next: <a href="section5.html" rel=precedes>Known bugs</a>.<br>
|
||||
Back: <a href="section3.html" rev=precedes>Using FFTW</a>.<br>
|
||||
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
|
||||
<address>
|
||||
<A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
- 14 September 2021
|
||||
</address><br>
|
||||
Extracted from FFTW Frequently Asked Questions with Answers,
|
||||
Copyright © 2021 Matteo Frigo and Massachusetts Institute of Technology.
|
||||
</body></html>
|
||||
148
fftw-3.3.10/doc/FAQ/fftw-faq.html/section5.html
Normal file
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head><title>
|
||||
FFTW FAQ - Section 5
|
||||
</title>
|
||||
<link rev="made" href="mailto:fftw@fftw.org">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<link rel="Previous" href="section4.html"><link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
FFTW FAQ - Section 5 <br>
|
||||
Known bugs
|
||||
</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#rfftwndbug" rel=subdocument>Q5.1. FFTW 1.1 crashes in rfftwnd on Linux.</a>
|
||||
<li><a href="#fftwmpibug" rel=subdocument>Q5.2. The MPI transforms in FFTW 1.2 give incorrect results/leak
|
||||
memory.</a>
|
||||
<li><a href="#testsingbug" rel=subdocument>Q5.3. The test programs in FFTW 1.2.1 fail when I change FFTW to use single
|
||||
precision.</a>
|
||||
<li><a href="#teststoobig" rel=subdocument>Q5.4. The test program in FFTW 1.2.1 fails for n >
|
||||
46340.</a>
|
||||
<li><a href="#linuxthreads" rel=subdocument>Q5.5. The threaded code fails on Linux Redhat 5.0</a>
|
||||
<li><a href="#bigrfftwnd" rel=subdocument>Q5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms with a final
|
||||
dimension >= 65536.</a>
|
||||
<li><a href="#primebug" rel=subdocument>Q5.7. FFTW 2.0's complex transforms give the wrong results with prime
|
||||
factors 17 to 97.</a>
|
||||
<li><a href="#mpichbug" rel=subdocument>Q5.8. FFTW 2.1.1's MPI test programs crash with
|
||||
MPICH.</a>
|
||||
<li><a href="#aixthreadbug" rel=subdocument>Q5.9. FFTW 2.1.2's multi-threaded transforms don't work on
|
||||
AIX.</a>
|
||||
<li><a href="#bigprimebug" rel=subdocument>Q5.10. FFTW 2.1.2's complex transforms give incorrect results for large prime
|
||||
sizes.</a>
|
||||
<li><a href="#solaristhreadbug" rel=subdocument>Q5.11. FFTW 2.1.3's multi-threaded transforms don't give any speedup on
|
||||
Solaris.</a>
|
||||
<li><a href="#aixflags" rel=subdocument>Q5.12. FFTW 2.1.3 crashes on AIX.</a>
|
||||
</ul><hr>
|
||||
|
||||
<h2><A name="rfftwndbug">
|
||||
Question 5.1. FFTW 1.1 crashes in rfftwnd on
|
||||
Linux.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 1.2. There was a bug in
|
||||
<code>rfftwnd</code> causing an incorrect amount of memory to be allocated. The bug showed
|
||||
up in Linux with libc-5.3.12 (and nowhere else that we know of).
|
||||
|
||||
<h2><A name="fftwmpibug">
|
||||
Question 5.2. The MPI transforms in FFTW 1.2 give incorrect
|
||||
results/leak memory.
|
||||
</A></h2>
|
||||
|
||||
These bugs were corrected in FFTW 1.2.1. The MPI transforms (really,
|
||||
just the transpose routines) in FFTW 1.2 had bugs that could cause
|
||||
errors in some situations.
|
||||
<h2><A name="testsingbug">
|
||||
Question 5.3. The test programs in FFTW 1.2.1 fail when I change FFTW
|
||||
to use single precision.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 1.3. (Older versions of FFTW did
|
||||
work in single precision, but the test programs didn't--the error
|
||||
tolerances in the tests were set for double precision.)
|
||||
|
||||
<h2><A name="teststoobig">
|
||||
Question 5.4. The test program in FFTW 1.2.1 fails for n >
|
||||
46340.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 1.3. FFTW 1.2.1 produced the right answer,
|
||||
but the test program was wrong. For large n, n*n in the naive
|
||||
transform that we used for comparison overflows 32 bit integer
|
||||
precision, breaking the test.
|
||||
<h2><A name="linuxthreads">
|
||||
Question 5.5. The threaded code fails on Linux Redhat
|
||||
5.0
|
||||
</A></h2>
|
||||
|
||||
We had problems with glibc-2.0.5. The code should work with
|
||||
glibc-2.0.7.
|
||||
<h2><A name="bigrfftwnd">
|
||||
Question 5.6. FFTW 2.0's rfftwnd fails for rank > 1 transforms
|
||||
with a final dimension >= 65536.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 2.0.1. (There was a 32-bit integer
|
||||
overflow due to a poorly-parenthesized expression.)
|
||||
<h2><A name="primebug">
|
||||
Question 5.7. FFTW 2.0's complex transforms give the wrong results
|
||||
with prime factors 17 to 97.
|
||||
</A></h2>
|
||||
|
||||
There was a bug in the complex transforms that could cause incorrect
|
||||
results under (hopefully rare) circumstances for lengths with
|
||||
intermediate-size prime factors (17-97). This bug was fixed in FFTW
|
||||
2.1.1.
|
||||
<h2><A name="mpichbug">
|
||||
Question 5.8. FFTW 2.1.1's MPI test programs crash with
|
||||
MPICH.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 2.1.2. The 2.1/2.1.1 MPI test programs
|
||||
crashed when using the MPICH implementation of MPI with the
|
||||
<code>ch_p4</code> device (TCP/IP); the transforms themselves worked fine.
|
||||
|
||||
<h2><A name="aixthreadbug">
|
||||
Question 5.9. FFTW 2.1.2's multi-threaded transforms don't work on
|
||||
AIX.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 2.1.3. The multi-threaded transforms in
|
||||
previous versions didn't work with AIX's
|
||||
<code>pthreads</code> implementation, which idiosyncratically creates threads in detached
|
||||
(non-joinable) mode by default.
|
||||
<h2><A name="bigprimebug">
|
||||
Question 5.10. FFTW 2.1.2's complex transforms give incorrect results
|
||||
for large prime sizes.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 2.1.3. FFTW's complex-transform algorithm
|
||||
for prime sizes (in versions 2.0 to 2.1.2) had an integer overflow
|
||||
problem that caused incorrect results for many primes greater than
|
||||
32768 (on 32-bit machines). (Sizes without large prime factors are
|
||||
not affected.)
|
||||
<h2><A name="solaristhreadbug">
|
||||
Question 5.11. FFTW 2.1.3's multi-threaded transforms don't give any
|
||||
speedup on Solaris.
|
||||
</A></h2>
|
||||
|
||||
This bug was fixed in FFTW 2.1.4. (By default, Solaris creates
|
||||
threads that do not parallelize over multiple processors, so one has
|
||||
to request the proper behavior specifically.)
|
||||
|
||||
<h2><A name="aixflags">
|
||||
Question 5.12. FFTW 2.1.3 crashes on AIX.
|
||||
</A></h2>
|
||||
|
||||
The FFTW 2.1.3 <code>configure</code> script picked incorrect compiler flags for the <code>xlc</code> compiler on newer IBM processors. This
|
||||
is fixed in FFTW 2.1.4. <hr>
|
||||
Back: <a href="section4.html" rev=precedes>Internals of FFTW</a>.<br>
|
||||
<a href="index.html" rev=subdocument>Return to contents</a>.<p>
|
||||
<address>
|
||||
<A href="http://www.fftw.org">Matteo Frigo and Steven G. Johnson</A> / <A href="mailto:fftw@fftw.org">fftw@fftw.org</A>
|
||||
- 14 September 2021
|
||||
</address><br>
|
||||
Extracted from FFTW Frequently Asked Questions with Answers,
|
||||
Copyright © 2021 Matteo Frigo and Massachusetts Institute of Technology.
|
||||
</body></html>
|
||||
7
fftw-3.3.10/doc/FAQ/html.refs
Normal file
@@ -0,0 +1,7 @@
|
||||
\ References for the FFTW FAQ
|
||||
\
|
||||
the FFTW web page \ http://www.fftw.org
|
||||
FFTW Windows installation notes \ http://www.fftw.org/install/windows.html
|
||||
Categories of Free and Non-Free Software \ http://www.gnu.org/philosophy/categories.html
|
||||
the Caml web page \ http://caml.inria.fr
|
||||
pruned FFTs with FFTW \ http://www.fftw.org/pruned.html
|
||||
189
fftw-3.3.10/doc/FAQ/m-ascii.pl
Normal file
@@ -0,0 +1,189 @@
|
||||
## ASCII output
|
||||
# Copyright (C) 1993-1995 Ian Jackson.
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# It is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# (Note: I do not consider works produced using these BFNN processing
|
||||
# tools to be derivative works of the tools, so they are NOT covered
|
||||
# by the GPL. However, I would appreciate it if you credited me if
|
||||
# appropriate in any documents you format using BFNN.)
|
||||
|
||||
sub ascii_init {
|
||||
open(ASCII,">$prefix.ascii");
|
||||
}
|
||||
|
||||
sub ascii_startmajorheading {
|
||||
print ASCII '='x79,"\n\n";
|
||||
$ascii_status= 'h';
|
||||
&ascii_text($_[0] ? "Section $_[0]. " : '');
|
||||
}
|
||||
|
||||
sub ascii_startminorheading {
|
||||
print ASCII '-'x79,"\n\n";
|
||||
$ascii_status= 'h';
|
||||
}
|
||||
|
||||
sub ascii_italic { &ascii_text('*'); }
|
||||
sub ascii_enditalic { $ascii_para .= '*'; }
|
||||
|
||||
sub ascii_email { &ascii_text('<'); } sub ascii_endemail { &ascii_text('>'); }
|
||||
|
||||
sub ascii_ftpon { } sub ascii_endftpon { }
|
||||
sub ascii_ftpin { } sub ascii_endftpin { }
|
||||
sub ascii_docref { } sub ascii_enddocref { }
|
||||
sub ascii_courier { } sub ascii_endcourier { }
|
||||
sub ascii_newsgroup { } sub ascii_endnewsgroup { }
|
||||
sub ascii_ftpsilent { $ascii_ignore++; }
|
||||
sub ascii_endftpsilent { $ascii_ignore--; }
|
||||
|
||||
sub ascii_text {
|
||||
return if $ascii_ignore;
|
||||
if ($ascii_status eq '') {
|
||||
$ascii_status= 'p';
|
||||
}
|
||||
$ascii_para .= $_[0];
|
||||
}
|
||||
|
||||
sub ascii_tab {
|
||||
local ($n) = $_[0]-length($ascii_para);
|
||||
$ascii_para .= ' 'x$n if $n>0;
|
||||
}
|
||||
|
||||
sub ascii_newline {
|
||||
return unless $ascii_status eq 'p';
|
||||
&ascii_writepara;
|
||||
}
|
||||
|
||||
sub ascii_writepara {
|
||||
local ($thisline, $thisword, $rest);
|
||||
for (;;) {
|
||||
last unless $ascii_para =~ m/\S/;
|
||||
$thisline= $ascii_indentstring;
|
||||
for (;;) {
|
||||
last unless $ascii_para =~ m/^(\s*\S+)/;
|
||||
unless (length($1) + length($thisline) < 75 ||
|
||||
length($thisline) == length($ascii_indentstring)) {
|
||||
last;
|
||||
}
|
||||
$thisline .= $1;
|
||||
$ascii_para= $';
|
||||
}
|
||||
$ascii_para =~ s/^\s*//;
|
||||
print ASCII $thisline,"\n";
|
||||
$ascii_indentstring= $ascii_nextindent;
|
||||
last unless length($ascii_para);
|
||||
}
|
||||
$ascii_status= ''; $ascii_para= '';
|
||||
}
|
||||
|
||||
sub ascii_endpara {
|
||||
return unless $ascii_status eq 'p';
|
||||
&ascii_writepara;
|
||||
print ASCII "\n";
|
||||
}
|
||||
|
||||
sub ascii_endheading {
|
||||
$ascii_para =~ s/\s*$//;
|
||||
print ASCII "$ascii_para\n\n";
|
||||
$ascii_status= '';
|
||||
$ascii_para= '';
|
||||
}
|
||||
|
||||
sub ascii_endmajorheading { &ascii_endheading(@_); }
|
||||
sub ascii_endminorheading { &ascii_endheading(@_); }
|
||||
|
||||
sub ascii_startverbatim {
|
||||
$ascii_vstatus= $ascii_status;
|
||||
&ascii_writepara;
|
||||
}
|
||||
|
||||
sub ascii_verbatim {
|
||||
print ASCII $_[0],"\n";
|
||||
}
|
||||
|
||||
sub ascii_endverbatim {
|
||||
$ascii_status= $ascii_vstatus;
|
||||
}
|
||||
|
||||
sub ascii_finish {
|
||||
close(ASCII);
|
||||
}
|
||||
|
||||
sub ascii_startindex { $ascii_status= ''; }
|
||||
sub ascii_endindex { $ascii_status= 'p'; }
|
||||
|
||||
sub ascii_endindexitem {
|
||||
printf ASCII " %-11s %-.66s\n",$ascii_left,$ascii_para;
|
||||
$ascii_status= 'p';
|
||||
$ascii_para= '';
|
||||
}
|
||||
|
||||
sub ascii_startindexitem {
|
||||
$ascii_left= $_[1];
|
||||
}
|
||||
|
||||
sub ascii_startindexmainitem {
|
||||
$ascii_left= $_[1];
|
||||
print ASCII "\n" if $ascii_status eq 'p';
|
||||
}
|
||||
|
||||
sub ascii_startindent {
|
||||
$ascii_istatus= $ascii_status;
|
||||
&ascii_writepara;
|
||||
$ascii_indentstring= " $ascii_indentstring";
|
||||
$ascii_nextindent= " $ascii_nextindent";
|
||||
}
|
||||
|
||||
sub ascii_endindent {
|
||||
$ascii_indentstring =~ s/^ //;
|
||||
$ascii_nextindent =~ s/^ //;
|
||||
$ascii_status= $ascii_istatus;
|
||||
}
|
||||
|
||||
sub ascii_startpackedlist { $ascii_plc=0; }
|
||||
sub ascii_endpackedlist { &ascii_newline if !$ascii_plc; }
|
||||
sub ascii_packeditem {
|
||||
&ascii_newline if !$ascii_plc;
|
||||
&ascii_tab($ascii_plc*40+5);
|
||||
$ascii_plc= !$ascii_plc;
|
||||
}
|
||||
|
||||
sub ascii_startlist {
|
||||
&ascii_endpara;
|
||||
$ascii_indentstring= " $ascii_indentstring";
|
||||
$ascii_nextindent= " $ascii_nextindent";
|
||||
}
|
||||
|
||||
sub ascii_endlist {
|
||||
&ascii_endpara;
|
||||
$ascii_indentstring =~ s/^ //;
|
||||
$ascii_nextindent =~ s/^ //;
|
||||
}
|
||||
|
||||
sub ascii_item {
|
||||
&ascii_newline;
|
||||
$ascii_indentstring =~ s/ $/* /;
|
||||
}
|
||||
|
||||
sub ascii_pageref {
|
||||
&ascii_text("Q$_[1] \`");
|
||||
}
|
||||
|
||||
sub ascii_endpageref {
|
||||
&ascii_text("'");
|
||||
}
|
||||
|
||||
1;
|
||||
337
fftw-3.3.10/doc/FAQ/m-html.pl
Normal file
@@ -0,0 +1,337 @@
|
||||
## HTML output
|
||||
# Copyright (C) 1993-1995 Ian Jackson.
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# It is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# (Note: I do not consider works produced using these BFNN processing
|
||||
# tools to be derivative works of the tools, so they are NOT covered
|
||||
# by the GPL. However, I would appreciate it if you credited me if
|
||||
# appropriate in any documents you format using BFNN.)
|
||||
|
||||
%saniarray= ('<','lt', '>','gt', '&','amp', '"','quot');
|
||||
|
||||
sub html_init {
|
||||
$html_prefix = './'.$prefix;
|
||||
$html_prefix =~ s:^\.//:/:;
|
||||
system('rm','-r',"$html_prefix.html");
|
||||
system('mkdir',"$html_prefix.html");
|
||||
open(HTML,">$html_prefix.html/index.html");
|
||||
print HTML "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n";
|
||||
print HTML "<html>\n";
|
||||
$html_needpara= -1;
|
||||
$html_end='';
|
||||
chop($html_date=`date '+%d %B %Y'`);
|
||||
chop($html_year=`date '+%Y'`);
|
||||
}
|
||||
|
||||
sub html_startup {
|
||||
print HTML <<END;
|
||||
<head><title>
|
||||
$user_title
|
||||
</title>
|
||||
<link rev="made" href="mailto:$user_authormail">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
<META name="description"
|
||||
content="Frequently asked questions and answers (FAQ) for FFTW.">
|
||||
<link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
<LINK rel="Bookmark" title="FFTW Home Page"
|
||||
href="http://www.fftw.org">
|
||||
<LINK rel="Bookmark" title="FFTW Manual"
|
||||
href="http://www.fftw.org/doc/">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
$user_title
|
||||
</h1>
|
||||
END
|
||||
&html_readrefs($_[0]);
|
||||
if (length($user_copyrightref)) {
|
||||
local ($refn) = $qrefn{$user_copyrightref};
|
||||
if (!length($refn)) {
|
||||
warn "unknown question (copyright) `$user_copyrightref'";
|
||||
}
|
||||
$refn =~ m/(\d+)\.(\d+)/;
|
||||
local ($s,$n) = ($1,$2);
|
||||
$html_copyrighthref= ($s == $html_sectionn)?'':"section$s.html";
|
||||
$html_copyrighthref.= "#$qn2ref{$s,$n}";
|
||||
}
|
||||
}
|
||||
|
||||
sub html_close {
|
||||
print HTML $html_end,"<address>\n$user_author\n";
|
||||
print HTML "- $html_date\n</address><br>\n";
|
||||
print HTML "Extracted from $user_title,\n";
|
||||
print HTML "<A href=\"$html_copyrighthref\">" if length($html_copyrighthref);
|
||||
print HTML "Copyright © $html_year $user_copyholder.";
|
||||
print HTML "</A>" if length($html_copyrighthref);
|
||||
print HTML "\n</body></html>\n";
|
||||
close(HTML);
|
||||
}
|
||||
|
||||
sub html_startmajorheading {
|
||||
local ($ref, $this,$next,$back) = @_;
|
||||
local ($nextt,$backt);
|
||||
$this =~ s/^Section /section/; $html_sectionn= $ref;
|
||||
$next =~ s/^Section /section/ && ($nextt= $sn2title{$'});
|
||||
$back =~ s/^Section /section/ ? ($backt= $sn2title{$'}) : ($back='');
|
||||
if ($html_sectionn) {
|
||||
&html_close;
|
||||
open(HTML,">$html_prefix.html/$this.html");
|
||||
print HTML "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n";
|
||||
print HTML "<html>\n";
|
||||
$html_end= "<hr>\n";
|
||||
$html_end.= "Next: <a href=\"$next.html\" rel=precedes>$nextt</a>.<br>\n"
|
||||
if $next;
|
||||
$html_end.= "Back: <a href=\"$back.html\" rev=precedes>$backt</a>.<br>\n"
|
||||
if $back;
|
||||
$html_end.= "<a href=\"index.html\" rev=subdocument>";
|
||||
$html_end.= "Return to contents</a>.<p>\n";
|
||||
print HTML <<END;
|
||||
<head><title>
|
||||
$user_brieftitle - Section $html_sectionn
|
||||
</title>
|
||||
<link rev="made" href="mailto:$user_authormail">
|
||||
<link rel="Contents" href="index.html">
|
||||
<link rel="Start" href="index.html">
|
||||
END
|
||||
print HTML "<link rel=\"Next\" href=\"$next.html\">" if $next;
|
||||
print HTML "<link rel=\"Previous\" href=\"$back.html\">" if $back;
|
||||
print HTML <<END;
|
||||
<link rel="Bookmark" title="FFTW FAQ" href="index.html">
|
||||
</head><body text="#000000" bgcolor="#FFFFFF"><h1>
|
||||
$user_brieftitle - Section $html_sectionn <br>
|
||||
END
|
||||
$html_needpara= -1;
|
||||
}
|
||||
else {
|
||||
print HTML "\n<h1>\n";
|
||||
$html_needpara=-1;
|
||||
}
|
||||
}
|
||||
|
||||
sub html_endmajorheading {
|
||||
print HTML "\n</h1>\n\n";
|
||||
$html_needpara=-1;
|
||||
}
|
||||
|
||||
sub html_startminorheading {
|
||||
local ($ref, $this) = @_;
|
||||
$html_needpara=0;
|
||||
$this =~ m/^Question (\d+)\.(\d+)/;
|
||||
local ($s,$n) = ($1,$2);
|
||||
print HTML "\n<h2><A name=\"$qn2ref{$s,$n}\">\n";
|
||||
}
|
||||
|
||||
sub html_endminorheading {
|
||||
print HTML "\n</A></h2>\n\n";
|
||||
$html_needpara=-1;
|
||||
}
|
||||
|
||||
sub html_newsgroup { &arg('newsgroup'); }
|
||||
sub html_endnewsgroup { &endarg('newsgroup'); }
|
||||
sub html_do_newsgroup {
|
||||
print HTML "<A href=\"news:$_[0]\"><code>$_[0]</code></A>";
|
||||
}
|
||||
|
||||
sub html_email { &arg('email'); }
|
||||
sub html_endemail { &endarg('email'); }
|
||||
sub html_do_email {
|
||||
print HTML "<A href=\"mailto:$_[0]\"><code>$_[0]</code></A>";
|
||||
}
|
||||
|
||||
sub html_courier { print HTML "<code>" ; }
|
||||
sub html_endcourier { print HTML "</code>"; }
|
||||
sub html_italic { print HTML "<i>" ; }
|
||||
sub html_enditalic { print HTML "</i>" ; }
|
||||
|
||||
sub html_docref { &arg('docref'); }
|
||||
sub html_enddocref { &endarg('docref'); }
|
||||
sub html_do_docref {
|
||||
if (!defined($html_refval{$_[0]})) {
|
||||
warn "undefined HTML reference $_[0]";
|
||||
$html_refval{$n}='UNDEFINED';
|
||||
}
|
||||
print HTML "<A href=\"$html_refval{$_[0]}\">";
|
||||
&recurse($_[0]);
|
||||
print HTML "</A>";
|
||||
}
|
||||
|
||||
sub html_readrefs {
|
||||
local ($p);
|
||||
open(HTMLREFS,"<$_[0]") || (warn("failed to open HTML refs $_[0]: $!"),return);
|
||||
while(<HTMLREFS>) {
|
||||
next if m/^\\\s/;
|
||||
s/\s*\n$//;
|
||||
if (s/^\\prefix\s*//) {
|
||||
$p= $'; next;
|
||||
} elsif (s/^\s*(\S.*\S)\s*\\\s*//) {
|
||||
$_=$1; $v=$';
|
||||
s/\\\\/\\/g;
|
||||
$html_refval{$_}= $p.$v;
|
||||
} else {
|
||||
warn("ununderstood line in HTML refs >$_<");
|
||||
}
|
||||
}
|
||||
close(HTMLREFS);
|
||||
}
|
||||
|
||||
sub html_ftpsilent { &arg('ftpsilent'); }
|
||||
sub html_endftpsilent { &endarg('ftpsilent'); }
|
||||
sub html_do_ftpsilent {
|
||||
if ($_[0] =~ m/:/) {
|
||||
$html_ftpsite= $`;
|
||||
$html_ftpdir= $'.'/';
|
||||
} else {
|
||||
$html_ftpsite= $_[0];
|
||||
$html_ftpdir= '';
|
||||
}
|
||||
}
|
||||
|
||||
sub html_ftpon { &arg('ftpon'); }
|
||||
sub html_endftpon { &endarg('ftpon'); }
|
||||
sub html_do_ftpon {
|
||||
#print STDERR "ftpon($_[0])\n";
|
||||
$html_ftpsite= $_[0]; $html_ftpdir= '';
|
||||
print HTML "<code>";
|
||||
&recurse($_[0]);
|
||||
print HTML "</code>";
|
||||
}
|
||||
|
||||
sub html_ftpin { &arg('ftpin'); }
|
||||
sub html_endftpin { &endarg('ftpin'); }
|
||||
sub html_do_ftpin {
|
||||
#print STDERR "ftpin($_[0])\n";
|
||||
print HTML "<A href=\"ftp://$html_ftpsite$html_ftpdir$_[0]\"><code>";
|
||||
&recurse($_[0]);
|
||||
print HTML "</code></A>";
|
||||
}
|
||||
|
||||
sub html_text {
|
||||
print HTML "\n<p>\n" if $html_needpara > 0;
|
||||
$html_needpara=0;
|
||||
$html_stuff= &html_sanitise($_[0]);
|
||||
while ($html_stuff =~ s/^(.{40,70}) //) {
|
||||
print HTML "$1\n";
|
||||
}
|
||||
print HTML $html_stuff;
|
||||
}
|
||||
|
||||
sub html_tab {
|
||||
$htmltabignore++ || warn "html tab ignored";
|
||||
}
|
||||
|
||||
sub html_newline { print HTML "<br>\n" ; }
|
||||
sub html_startverbatim { print HTML "<pre>\n" ; }
|
||||
sub html_verbatim { print HTML &html_sanitise($_[0]),"\n"; }
|
||||
sub html_endverbatim { print HTML "</pre>\n" ; $html_needpara= -1; }
|
||||
|
||||
sub html_endpara {
|
||||
$html_needpara || $html_needpara++;
|
||||
}
|
||||
|
||||
sub html_finish {
|
||||
&html_close;
|
||||
}
|
||||
|
||||
sub html_startindex {
|
||||
print HTML "<ul>\n";
|
||||
}
|
||||
|
||||
sub html_endindex {
|
||||
print HTML "</ul><hr>\n";
|
||||
}
|
||||
|
||||
sub html_startindexitem {
|
||||
local ($ref,$qval) = @_;
|
||||
$qval =~ m/Q(\d+)\.(\d+)/;
|
||||
local ($s,$n) = ($1,$2);
|
||||
print HTML "<li><a href=\"";
|
||||
print HTML ($s == $html_sectionn)?'':"section$s.html";
|
||||
print HTML "#$qn2ref{$s,$n}\" rel=subdocument>Q$s.$n. ";
|
||||
$html_indexunhead='';
|
||||
}
|
||||
|
||||
sub html_startindexmainitem {
|
||||
local ($ref,$s) = @_;
|
||||
$s =~ m/\d+/; $s= $&;
|
||||
print HTML "<br><br>" if ($s > 1);
|
||||
print HTML "<li><b><font size=\"+2\"><a href=\"section$s.html\" rel=subdocument>Section $s. ";
|
||||
$html_indexunhead='</font></b>';
|
||||
}
|
||||
|
||||
sub html_endindexitem {
|
||||
print HTML "</a>$html_indexunhead\n";
|
||||
}
|
||||
|
||||
sub html_startlist {
|
||||
print HTML "\n";
|
||||
$html_itemend="<ul>";
|
||||
}
|
||||
|
||||
sub html_endlist {
|
||||
print HTML "$html_itemend\n</ul>\n";
|
||||
$html_needpara=-1
|
||||
}
|
||||
|
||||
sub html_item {
|
||||
print HTML "$html_itemend\n<li>";
|
||||
$html_itemend="";
|
||||
$html_needpara=-1;
|
||||
}
|
||||
|
||||
sub html_startpackedlist {
|
||||
print HTML "\n";
|
||||
$html_itemend="<dir>";
|
||||
}
|
||||
|
||||
sub html_endpackedlist {
|
||||
print HTML "$html_itemend\n</dir>\n";
|
||||
$html_needpara=-1;
|
||||
}
|
||||
|
||||
sub html_packeditem {
|
||||
print HTML "$html_itemend\n<li>";
|
||||
$html_itemend="";
|
||||
$html_needpara=-1;
|
||||
}
|
||||
|
||||
sub html_startindent { print HTML "<blockquote>\n"; }
|
||||
sub html_endindent { print HTML "</blockquote>\n"; }
|
||||
|
||||
sub html_pageref {
|
||||
local ($ref,$sq) = @_;
|
||||
$sq =~ m/(\d+)\.(\d+)/;
|
||||
local ($s,$n) = ($1,$2);
|
||||
print HTML "<A href=\"";
|
||||
print HTML ($s == $html_sectionn)?'':"section$s.html";
|
||||
print HTML "#$qn2ref{$s,$n}\">Q$sq \`";
|
||||
}
|
||||
|
||||
sub html_endpageref {
|
||||
print HTML "'</A>";
|
||||
}
|
||||
|
||||
sub html_sanitise {
|
||||
local ($in) = @_;
|
||||
local ($out);
|
||||
while ($in =~ m/[<>&"]/) {
|
||||
$out.= $`. '&'. $saniarray{$&}. ';';
|
||||
$in=$';
|
||||
}
|
||||
$out.= $in;
|
||||
$out;
|
||||
}
|
||||
|
||||
1;
|
||||
226
fftw-3.3.10/doc/FAQ/m-info.pl
Normal file
@@ -0,0 +1,226 @@
|
||||
## Info output
|
||||
# Copyright (C) 1993-1995 Ian Jackson.
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# It is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# (Note: I do not consider works produced using these BFNN processing
|
||||
# tools to be derivative works of the tools, so they are NOT covered
|
||||
# by the GPL. However, I would appreciate it if you credited me if
|
||||
# appropriate in any documents you format using BFNN.)
|
||||
|
||||
sub info_init {
|
||||
open(INFO,">$prefix.info");
|
||||
print INFO <<END;
|
||||
Info file: $prefix.info, -*-Text-*-
|
||||
produced by bfnnconv.pl from the Bizarre Format With No Name.
|
||||
|
||||
END
|
||||
}
|
||||
|
||||
sub info_heading {
|
||||
# refstring Node Next Previous Up
|
||||
print INFO "\nFile: $prefix.info, Node: $_[1]";
|
||||
print INFO ", Next: $_[2]" if length($_[2]);
|
||||
print INFO ", Previous: $_[3]" if length($_[3]);
|
||||
print INFO ", Up: $_[4]" if length($_[4]);
|
||||
print INFO "\n\n";
|
||||
$info_status= '';
|
||||
}
|
||||
|
||||
sub info_startmajorheading {
|
||||
return if $_[0] eq '0';
|
||||
&info_heading('s_'.$_[0],@_[1..$#_],'Top');
|
||||
}
|
||||
|
||||
sub info_startminorheading {
|
||||
&info_heading(@_);
|
||||
}
|
||||
|
||||
sub info_italic { &info_text('*'); }
|
||||
sub info_enditalic { $info_para .= '*'; }
|
||||
|
||||
sub info_email { &info_text('<'); } sub info_endemail { &info_text('>'); }
|
||||
|
||||
sub info_ftpon { } sub info_endftpon { }
|
||||
sub info_ftpin { } sub info_endftpin { }
|
||||
sub info_docref { } sub info_enddocref { }
|
||||
sub info_courier { } sub info_endcourier { }
|
||||
sub info_newsgroup { } sub info_endnewsgroup { }
|
||||
sub info_ftpsilent { $info_ignore++; }
|
||||
sub info_endftpsilent { $info_ignore--; }
|
||||
|
||||
sub info_text {
|
||||
return if $info_ignore;
|
||||
if ($info_status eq '') {
|
||||
$info_status= 'p';
|
||||
}
|
||||
$info_para .= $_[0];
|
||||
}
|
||||
|
||||
sub info_tab {
|
||||
local ($n) = $_[0]-length($info_para);
|
||||
$info_para .= ' 'x$n if $n>0;
|
||||
}
|
||||
|
||||
sub info_newline {
|
||||
return unless $info_status eq 'p';
|
||||
print INFO &info_writepara;
|
||||
}
|
||||
|
||||
sub info_writepara {
|
||||
local ($thisline, $thisword, $rest, $output);
|
||||
for (;;) {
|
||||
last unless $info_para =~ m/\S/;
|
||||
$thisline= $info_indentstring;
|
||||
for (;;) {
|
||||
last unless $info_para =~ m/^(\s*\S+)/;
|
||||
unless (length($1) + length($thisline) < 75 ||
|
||||
length($thisline) == length($info_indentstring)) {
|
||||
last;
|
||||
}
|
||||
$thisline .= $1;
|
||||
$info_para= $';
|
||||
}
|
||||
$info_para =~ s/^\s*//;
|
||||
$output.= $thisline."\n";
|
||||
$info_indentstring= $info_nextindent;
|
||||
last unless length($info_para);
|
||||
}
|
||||
$info_status= ''; $info_para= '';
|
||||
return $output;
|
||||
}
|
||||
|
||||
sub info_endpara {
|
||||
return unless $info_status eq 'p';
|
||||
print INFO &info_writepara;
|
||||
print INFO "\n";
|
||||
}
|
||||
|
||||
sub info_endheading {
|
||||
$info_para =~ s/\s*$//;
|
||||
print INFO "$info_para\n\n";
|
||||
$info_status= '';
|
||||
$info_para= '';
|
||||
}
|
||||
|
||||
sub info_endmajorheading { &info_endheading(@_); }
|
||||
sub info_endminorheading { &info_endheading(@_); }
|
||||
|
||||
sub info_startverbatim {
|
||||
print INFO &info_writepara;
|
||||
}
|
||||
|
||||
sub info_verbatim {
|
||||
print INFO $_[0],"\n";
|
||||
}
|
||||
|
||||
sub info_endverbatim {
|
||||
$info_status= $info_vstatus;
|
||||
}
|
||||
|
||||
sub info_finish {
|
||||
close(INFO);
|
||||
}
|
||||
|
||||
sub info_startindex {
|
||||
&info_endpara;
|
||||
$info_moredetail= '';
|
||||
$info_status= '';
|
||||
}
|
||||
|
||||
sub info_endindex {
|
||||
print INFO "$info_moredetail\n" if length($info_moredetail);
|
||||
}
|
||||
|
||||
sub info_endindexitem {
|
||||
$info_indentstring= sprintf("* %-17s ",$info_label.'::');
|
||||
$info_nextindent= ' 'x20;
|
||||
local ($txt);
|
||||
$txt= &info_writepara;
|
||||
if ($info_main) {
|
||||
print INFO $label.$txt;
|
||||
$txt =~ s/^.{20}//;
|
||||
$info_moredetail.= $txt;
|
||||
} else {
|
||||
$info_moredetail.= $label.$txt;
|
||||
}
|
||||
$info_indentstring= $info_nextindent= '';
|
||||
$info_status='p';
|
||||
}
|
||||
|
||||
sub info_startindexitem {
|
||||
print INFO "* Menu:\n" if $info_status eq '';
|
||||
$info_status= '';
|
||||
$info_label= $_[2];
|
||||
$info_main= 0;
|
||||
}
|
||||
|
||||
sub info_startindexmainitem {
|
||||
print INFO "* Menu:\n" if $info_status eq '';
|
||||
$info_label= $_[2];
|
||||
$info_main= 1;
|
||||
$info_moredetail .= "\n$_[2], ";
|
||||
$info_status= '';
|
||||
}
|
||||
|
||||
sub info_startindent {
|
||||
$info_istatus= $info_status;
|
||||
print INFO &info_writepara;
|
||||
$info_indentstring= " $info_indentstring";
|
||||
$info_nextindent= " $info_nextindent";
|
||||
}
|
||||
|
||||
sub info_endindent {
|
||||
$info_indentstring =~ s/^ //;
|
||||
$info_nextindent =~ s/^ //;
|
||||
$info_status= $info_istatus;
|
||||
}
|
||||
|
||||
sub info_startpackedlist { $info_plc=0; }
|
||||
sub info_endpackedlist { &info_newline if !$info_plc; }
|
||||
sub info_packeditem {
|
||||
&info_newline if !$info_plc;
|
||||
&info_tab($info_plc*40+5);
|
||||
$info_plc= !$info_plc;
|
||||
}
|
||||
|
||||
sub info_startlist {
|
||||
$info_istatus= $info_status;
|
||||
print INFO &info_writepara;
|
||||
$info_indentstring= " $info_indentstring";
|
||||
$info_nextindent= " $info_nextindent";
|
||||
}
|
||||
|
||||
sub info_endlist {
|
||||
$info_indentstring =~ s/^ //;
|
||||
$info_nextindent =~ s/^ //;
|
||||
$info_status= $info_lstatus;
|
||||
}
|
||||
|
||||
sub info_item {
|
||||
&info_newline;
|
||||
$info_indentstring =~ s/ $/* /;
|
||||
}
|
||||
|
||||
sub info_pageref {
|
||||
&info_text("*Note Question $_[1]:: \`");
|
||||
}
|
||||
|
||||
sub info_endpageref {
|
||||
&info_text("'");
|
||||
}
|
||||
|
||||
1;
|
||||
242
fftw-3.3.10/doc/FAQ/m-lout.pl
Normal file
@@ -0,0 +1,242 @@
|
||||
## Lout output
|
||||
# Copyright (C) 1993-1995 Ian Jackson.
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# It is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# (Note: I do not consider works produced using these BFNN processing
|
||||
# tools to be derivative works of the tools, so they are NOT covered
|
||||
# by the GPL. However, I would appreciate it if you credited me if
|
||||
# appropriate in any documents you format using BFNN.)
|
||||
|
||||
sub lout_init {
|
||||
open(LOUT,">$prefix.lout");
|
||||
chop($dprint= `date '+%d %B %Y'`);
|
||||
$dprint =~ s/^0//;
|
||||
}
|
||||
|
||||
sub lout_startup {
|
||||
local ($lbs) = &lout_sanitise($user_brieftitle);
|
||||
print LOUT <<END;
|
||||
\@SysInclude{ fontdefs }
|
||||
\@SysInclude{ langdefs }
|
||||
\@SysInclude{ dl }
|
||||
\@SysInclude{ docf }
|
||||
\@Use { \@DocumentLayout
|
||||
\@OddTop { \@Null }
|
||||
\@EvenTop { \@Null }
|
||||
\@StartOddTop { \@Null }
|
||||
\@StartEvenTop { \@Null }
|
||||
\@OddFoot { { $lbs } \@Centre{ - \@PageNum - } \@Right{ $dprint } }
|
||||
\@EvenFoot { { $lbs } \@Centre{ - \@PageNum - } \@Right{ $dprint } }
|
||||
\@StartOddFoot { { $lbs } \@Centre{ - \@PageNum - } \@Right{ $dprint } }
|
||||
\@StartEvenFoot { { $lbs } \@Centre{ - \@PageNum - } \@Right{ $dprint } }
|
||||
\@ParaGap { 1.70vx }
|
||||
\@InitialBreak { 1.0fx ragged hyphen }
|
||||
}
|
||||
\@Use { \@OrdinaryLayout }
|
||||
END
|
||||
$lout_textstatus= 'p';
|
||||
}
|
||||
|
||||
sub lout_pageref {
|
||||
print LOUT "Q$_[1] (page {\@PageOf{$_[0]}}) ";
|
||||
&lout_text("\`");
|
||||
}
|
||||
|
||||
sub lout_endpageref {
|
||||
&lout_text("'");
|
||||
}
|
||||
|
||||
sub lout_finish {
|
||||
print LOUT "\@End \@Text\n";
|
||||
close(L);
|
||||
}
|
||||
|
||||
sub lout_startmajorheading {
|
||||
$lout_styles .= 'h';
|
||||
print LOUT <<END
|
||||
\@CNP
|
||||
{
|
||||
newpath 0 ysize 0.3 ft sub moveto
|
||||
xsize 0 rlineto
|
||||
0 0.2 ft rlineto
|
||||
xsize neg 0 rlineto
|
||||
closepath fill
|
||||
} \@Graphic { //1.6f \@HAdjust \@Heading{
|
||||
END
|
||||
;
|
||||
$endh= "}\n{\@PageMark s_$_[0]}\n/1.0fo\n";
|
||||
&lout_text($_[0] ? "Section $_[0]. " : '');
|
||||
}
|
||||
|
||||
sub lout_startminorheading {
|
||||
$lout_styles .= 'h';
|
||||
print LOUT "//0.2f \@CNP {\@PageMark $_[0]} \@Heading{\n";
|
||||
$endh= '';
|
||||
}
|
||||
|
||||
sub lout_endheading {
|
||||
$lout_styles =~ s/.$//; print LOUT "}\n$endh";
|
||||
$lout_status= 'p';
|
||||
}
|
||||
|
||||
sub lout_endmajorheading { &lout_endheading(@_); }
|
||||
sub lout_endminorheading { &lout_endheading(@_); }
|
||||
|
||||
sub lout_courier {
|
||||
$lout_styles .= 'f';
|
||||
print LOUT "{{0.7 1.0} \@Scale {Courier Bold} \@Font {";
|
||||
}
|
||||
|
||||
sub lout_endcourier {
|
||||
$lout_styles =~ s/.$//; print LOUT "}}";
|
||||
}
|
||||
|
||||
sub lout_italic { $lout_styles .= 'f'; print LOUT "{Slope \@Font {"; }
|
||||
sub lout_enditalic { $lout_styles =~ s/.$//; print LOUT "}}"; }
|
||||
|
||||
sub lout_startindent { $lout_styles .= 'i'; print LOUT "\@IndentedDisplay {\n"; }
|
||||
|
||||
sub lout_endindent {
|
||||
&lout_endpara;
|
||||
$lout_styles =~ s/.$//; print LOUT "}\n\@LP\n";
|
||||
}
|
||||
|
||||
sub lout_startpackedlist { $lout_plc=-1; }
|
||||
sub lout_endpackedlist { &lout_newline if !$lout_plc; }
|
||||
sub lout_packeditem {
|
||||
&lout_newline if !$lout_plc;
|
||||
&lout_tab(($lout_plc>0)*40+5);
|
||||
$lout_plc= !$lout_plc;
|
||||
}
|
||||
|
||||
sub lout_startlist {
|
||||
&lout_endpara;
|
||||
print LOUT "\@RawIndentedList style {\@Bullet} indent {0.5i} gap {1.1vx}\n";
|
||||
$lout_styles .= 'l';
|
||||
$lout_status= '';
|
||||
}
|
||||
|
||||
sub lout_endlist {
|
||||
&lout_endpara;
|
||||
print LOUT "\@EndList\n\n";
|
||||
$lout_styles =~ s/.$//;
|
||||
}
|
||||
|
||||
sub lout_item {
|
||||
&lout_endpara;
|
||||
print LOUT "\@ListItem{";
|
||||
$lout_styles.= 'I';
|
||||
}
|
||||
|
||||
sub lout_startindex {
|
||||
print LOUT "//0.0fe\n";
|
||||
}
|
||||
|
||||
sub lout_endindex {
|
||||
$lout_status='p';
|
||||
}
|
||||
|
||||
sub lout_startindexmainitem {
|
||||
$lout_marker= $_[0];
|
||||
$lout_status= '';
|
||||
print LOUT "//0.3vx Bold \@Font \@HAdjust { \@HContract { { $_[1] } |3cx {";
|
||||
$lout_iiendheight= '1.00';
|
||||
$lout_styles .= 'X';
|
||||
}
|
||||
|
||||
sub lout_startindexitem {
|
||||
$lout_marker= $_[0];
|
||||
print LOUT "\@HAdjust { \@HContract { { $_[1] } |3cx {";
|
||||
$lout_iiendheight= '0.95';
|
||||
$lout_styles .= 'X';
|
||||
}
|
||||
|
||||
sub lout_endindexitem {
|
||||
print LOUT "} } |0c \@PageOf { $lout_marker } } //${lout_iiendheight}vx\n";
|
||||
$lout_styles =~ s/.$//;
|
||||
}
|
||||
|
||||
sub lout_email { &lout_courier; &lout_text('<'); }
|
||||
sub lout_endemail { &lout_text('>'); &lout_endcourier; }
|
||||
|
||||
sub lout_ftpon { &lout_courier; } sub lout_endftpon { &lout_endcourier; }
|
||||
sub lout_ftpin { &lout_courier; } sub lout_endftpin { &lout_endcourier; }
|
||||
sub lout_docref { } sub lout_enddocref { }
|
||||
sub lout_ftpsilent { $lout_ignore++; }
|
||||
sub lout_endftpsilent { $lout_ignore--; }
|
||||
|
||||
sub lout_newsgroup { &lout_courier; }
|
||||
sub lout_endnewsgroup { &lout_endcourier; }
|
||||
|
||||
sub lout_text {
|
||||
return if $lout_ignore;
|
||||
$lout_status= 'p';
|
||||
$_= &lout_sanitise($_[0]);
|
||||
s/ $/\n/ unless $lout_styles =~ m/[fhX]/;
|
||||
print LOUT $_;
|
||||
}
|
||||
|
||||
sub lout_tab {
|
||||
local ($size) = $_[0]*0.5;
|
||||
print LOUT " |${size}ft ";
|
||||
}
|
||||
|
||||
sub lout_newline {
|
||||
print LOUT " //1.0vx\n";
|
||||
}
|
||||
|
||||
sub lout_sanitise {
|
||||
local ($in) = @_;
|
||||
local ($out);
|
||||
$in= ' '.$in.' ';
|
||||
$out='';
|
||||
while ($in =~ m/(\s)(\S*[\@\/|\\\"\^\&\{\}\#]\S*)(\s)/) {
|
||||
$out .= $`.$1;
|
||||
$in = $3.$';
|
||||
$_= $2;
|
||||
s/[\\\"]/\\$&/g;
|
||||
$out .= '"'.$_.'"';
|
||||
}
|
||||
$out .= $in;
|
||||
$out =~ s/^ //; $out =~ s/ $//;
|
||||
$out;
|
||||
}
|
||||
|
||||
sub lout_endpara {
|
||||
return if $lout_status eq '';
|
||||
if ($lout_styles eq '') {
|
||||
print LOUT "\@LP\n\n";
|
||||
} elsif ($lout_styles =~ s/I$//) {
|
||||
print LOUT "}\n";
|
||||
}
|
||||
$lout_status= '';
|
||||
}
|
||||
|
||||
sub lout_startverbatim {
|
||||
print LOUT "//0.4f\n\@RawIndentedDisplay lines \@Break".
|
||||
" { {0.7 1.0} \@Scale {Courier Bold} \@Font {\n";
|
||||
}
|
||||
|
||||
sub lout_verbatim {
|
||||
$_= $_[0];
|
||||
s/^\s*//;
|
||||
print LOUT &lout_sanitise($_),"\n";
|
||||
}
|
||||
|
||||
sub lout_endverbatim { print LOUT "}\n}\n//0.4f\n"; }
|
||||
|
||||
1;
|
||||
189
fftw-3.3.10/doc/FAQ/m-post.pl
Normal file
@@ -0,0 +1,189 @@
|
||||
## POST output
|
||||
# Copyright (C) 1993-1995 Ian Jackson.
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# It is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Emacs; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
# (Note: I do not consider works produced using these BFNN processing
|
||||
# tools to be derivative works of the tools, so they are NOT covered
|
||||
# by the GPL. However, I would appreciate it if you credited me if
|
||||
# appropriate in any documents you format using BFNN.)
|
||||
|
||||
sub post_init {
|
||||
open(POST,">$prefix.post");
|
||||
}
|
||||
|
||||
sub post_startmajorheading {
|
||||
print POST '='x79,"\n\n";
|
||||
$post_status= 'h';
|
||||
&post_text($_[0] ? "Section $_[0]. " : '');
|
||||
}
|
||||
|
||||
sub post_startminorheading {
|
||||
print POST '-'x77,"\n\n";
|
||||
$post_status= 'h';
|
||||
}
|
||||
|
||||
sub post_italic { &post_text('*'); }
|
||||
sub post_enditalic { $post_para .= '*'; }
|
||||
|
||||
sub post_email { &post_text('<'); } sub post_endemail { &post_text('>'); }
|
||||
|
||||
sub post_ftpon { } sub post_endftpon { }
|
||||
sub post_ftpin { } sub post_endftpin { }
|
||||
sub post_docref { } sub post_enddocref { }
|
||||
sub post_courier { } sub post_endcourier { }
|
||||
sub post_newsgroup { } sub post_endnewsgroup { }
|
||||
sub post_ftpsilent { $post_ignore++; }
|
||||
sub post_endftpsilent { $post_ignore--; }
|
||||
|
||||
sub post_text {
|
||||
return if $post_ignore;
|
||||
if ($post_status eq '') {
|
||||
$post_status= 'p';
|
||||
}
|
||||
$post_para .= $_[0];
|
||||
}
|
||||
|
||||
sub post_tab {
|
||||
local ($n) = $_[0]-length($post_para);
|
||||
$post_para .= ' 'x$n if $n>0;
|
||||
}
|
||||
|
||||
sub post_newline {
|
||||
return unless $post_status eq 'p';
|
||||
&post_writepara;
|
||||
}
|
||||
|
||||
sub post_writepara {
|
||||
local ($thisline, $thisword, $rest);
|
||||
for (;;) {
|
||||
last unless $post_para =~ m/\S/;
|
||||
$thisline= $post_indentstring;
|
||||
for (;;) {
|
||||
last unless $post_para =~ m/^(\s*\S+)/;
|
||||
unless (length($1) + length($thisline) < 75 ||
|
||||
length($thisline) == length($post_indentstring)) {
|
||||
last;
|
||||
}
|
||||
$thisline .= $1;
|
||||
$post_para= $';
|
||||
}
|
||||
$post_para =~ s/^\s*//;
|
||||
print POST $thisline,"\n";
|
||||
$post_indentstring= $post_nextindent;
|
||||
last unless length($post_para);
|
||||
}
|
||||
$post_status= ''; $post_para= '';
|
||||
}
|
||||
|
||||
sub post_endpara {
|
||||
return unless $post_status eq 'p';
|
||||
&post_writepara;
|
||||
print POST "\n";
|
||||
}
|
||||
|
||||
sub post_endheading {
|
||||
$post_para =~ s/\s*$//;
|
||||
print POST "$post_para\n\n";
|
||||
$post_status= '';
|
||||
$post_para= '';
|
||||
}
|
||||
|
||||
sub post_endmajorheading { &post_endheading(@_); }
|
||||
sub post_endminorheading { &post_endheading(@_); }
|
||||
|
||||
sub post_startverbatim {
|
||||
$post_vstatus= $post_status;
|
||||
&post_writepara;
|
||||
}
|
||||
|
||||
sub post_verbatim {
|
||||
print POST $_[0],"\n";
|
||||
}
|
||||
|
||||
sub post_endverbatim {
|
||||
$post_status= $post_vstatus;
|
||||
}
|
||||
|
||||
sub post_finish {
|
||||
close(POST);
|
||||
}
|
||||
|
||||
sub post_startindex { $post_status= ''; }
|
||||
sub post_endindex { $post_status= 'p'; }
|
||||
|
||||
sub post_endindexitem {
|
||||
printf POST " %-11s %-.66s\n",$post_left,$post_para;
|
||||
$post_status= 'p';
|
||||
$post_para= '';
|
||||
}
|
||||
|
||||
sub post_startindexitem {
|
||||
$post_left= $_[1];
|
||||
}
|
||||
|
||||
sub post_startindexmainitem {
|
||||
$post_left= $_[1];
|
||||
print POST "\n" if $post_status eq 'p';
|
||||
}
|
||||
|
||||
sub post_startindent {
|
||||
$post_istatus= $post_status;
|
||||
&post_writepara;
|
||||
$post_indentstring= " $post_indentstring";
|
||||
$post_nextindent= " $post_nextindent";
|
||||
}
|
||||
|
||||
sub post_endindent {
|
||||
$post_indentstring =~ s/^ //;
|
||||
$post_nextindent =~ s/^ //;
|
||||
$post_status= $post_istatus;
|
||||
}
|
||||
|
||||
sub post_startpackedlist { $post_plc=0; }
|
||||
sub post_endpackedlist { &post_newline if !$post_plc; }
|
||||
sub post_packeditem {
|
||||
&post_newline if !$post_plc;
|
||||
&post_tab($post_plc*40+5);
|
||||
$post_plc= !$post_plc;
|
||||
}
|
||||
|
||||
sub post_startlist {
|
||||
&post_endpara;
|
||||
$post_indentstring= " $post_indentstring";
|
||||
$post_nextindent= " $post_nextindent";
|
||||
}
|
||||
|
||||
sub post_endlist {
|
||||
&post_endpara;
|
||||
$post_indentstring =~ s/^ //;
|
||||
$post_nextindent =~ s/^ //;
|
||||
}
|
||||
|
||||
sub post_item {
|
||||
&post_newline;
|
||||
$post_indentstring =~ s/ $/* /;
|
||||
}
|
||||
|
||||
sub post_pageref {
|
||||
&post_text("Q$_[1] \`");
|
||||
}
|
||||
|
||||
sub post_endpageref {
|
||||
&post_text("'");
|
||||
}
|
||||
|
||||
1;
|
||||
37
fftw-3.3.10/doc/Makefile.am
Normal file
@@ -0,0 +1,37 @@
|
||||
SUBDIRS = FAQ
|
||||
|
||||
info_TEXINFOS = fftw3.texi
|
||||
fftw3_TEXINFOS = acknowledgements.texi cindex.texi fftw3.texi findex.texi install.texi intro.texi legacy-fortran.texi license.texi modern-fortran.texi mpi.texi other.texi reference.texi threads.texi tutorial.texi upgrading.texi version.texi rfftwnd.pdf rfftwnd.eps
|
||||
|
||||
DVIPS = dvips -Pwww
|
||||
|
||||
EQN_IMAGES = equation-dft.png equation-dht.png equation-idft.png \
|
||||
equation-redft00.png equation-redft01.png equation-redft10.png \
|
||||
equation-redft11.png equation-rodft00.png equation-rodft01.png \
|
||||
equation-rodft10.png equation-rodft11.png
|
||||
|
||||
EXTRA_DIST = f77_wisdom.f fftw3.pdf html rfftwnd.fig rfftwnd.eps \
|
||||
rfftwnd.pdf rfftwnd-for-html.png $(EQN_IMAGES)
|
||||
|
||||
html: $(fftw3_TEXINFOS) $(EQN_IMAGES) rfftwnd-for-html.png
|
||||
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
--html --number-sections -o html fftw3.texi
|
||||
for i in $(EQN_IMAGES); do cp -f ${srcdir}/$$i html; done
|
||||
cp -f ${srcdir}/rfftwnd-for-html.png html
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -rf html
|
||||
|
||||
if MAINTAINER_MODE
|
||||
# generate the figure for the manual and distribute the binaries, so that
|
||||
# people don't need to have fig2dev installed.
|
||||
rfftwnd.eps: rfftwnd.fig
|
||||
fig2dev -L eps -m .7 ${srcdir}/rfftwnd.fig rfftwnd.eps
|
||||
|
||||
rfftwnd-for-html.png: rfftwnd.fig
|
||||
fig2dev -L png -m 1 ${srcdir}/rfftwnd.fig rfftwnd-for-html.png
|
||||
|
||||
rfftwnd.pdf: rfftwnd.fig
|
||||
fig2dev -L pdf -m .7 ${srcdir}/rfftwnd.fig rfftwnd.pdf
|
||||
|
||||
endif
|
||||
1028
fftw-3.3.10/doc/Makefile.in
Normal file
89
fftw-3.3.10/doc/acknowledgements.texi
Normal file
@@ -0,0 +1,89 @@
|
||||
@node Acknowledgments, License and Copyright, Installation and Customization, Top
|
||||
@chapter Acknowledgments
|
||||
|
||||
Matteo Frigo was supported in part by the Special Research Program SFB
|
||||
F011 ``AURORA'' of the Austrian Science Fund FWF and by MIT Lincoln
|
||||
Laboratory. For previous versions of FFTW, he was supported in part by the
|
||||
Defense Advanced Research Projects Agency (DARPA), under Grants
|
||||
N00014-94-1-0985 and F30602-97-1-0270, and by a Digital Equipment
|
||||
Corporation Fellowship.
|
||||
|
||||
Steven G. Johnson was supported in part by a Dept.@ of Defense NDSEG
|
||||
Fellowship, an MIT Karl Taylor Compton Fellowship, and by the Materials
|
||||
Research Science and Engineering Center program of the National Science
|
||||
Foundation under award DMR-9400334.
|
||||
|
||||
Code for the Cell Broadband Engine was graciously donated to the FFTW
|
||||
project by the IBM Austin Research Lab and included in fftw-3.2. (This
|
||||
code was removed in fftw-3.3.)
|
||||
|
||||
Code for the MIPS paired-single SIMD support was graciously donated to
|
||||
the FFTW project by CodeSourcery, Inc.
|
||||
|
||||
We are grateful to Sun Microsystems Inc.@ for its donation of a
|
||||
cluster of 9 8-processor Ultra HPC 5000 SMPs (24 Gflops peak). These
|
||||
machines served as the primary platform for the development of early
|
||||
versions of FFTW.
|
||||
|
||||
We thank Intel Corporation for donating a four-processor Pentium Pro
|
||||
machine. We thank the GNU/Linux community for giving us a decent OS to
|
||||
run on that machine.
|
||||
|
||||
We are thankful to the AMD corporation for donating an AMD Athlon XP 1700+
|
||||
computer to the FFTW project.
|
||||
|
||||
We thank the Compaq/HP testdrive program and VA Software Corporation
|
||||
(SourceForge.net) for providing remote access to machines that were used
|
||||
to test FFTW.
|
||||
|
||||
The @code{genfft} suite of code generators was written using Objective
|
||||
Caml, a dialect of ML. Objective Caml is a small and elegant language
|
||||
developed by Xavier Leroy. The implementation is available from
|
||||
@uref{http://caml.inria.fr/, @code{http://caml.inria.fr/}}. In previous
|
||||
releases of FFTW, @code{genfft} was written in Caml Light, by the same
|
||||
authors. An even earlier implementation of @code{genfft} was written in
|
||||
Scheme, but Caml is definitely better for this kind of application.
|
||||
@cindex Caml
|
||||
@cindex LISP
|
||||
|
||||
|
||||
FFTW uses many tools from the GNU project, including @code{automake},
|
||||
@code{texinfo}, and @code{libtool}.
|
||||
|
||||
Prof.@ Charles E.@ Leiserson of MIT provided continuous support and
|
||||
encouragement. This program would not exist without him. Charles also
|
||||
proposed the name ``codelets'' for the basic FFT blocks.
|
||||
@cindex codelet
|
||||
|
||||
|
||||
Prof.@ John D.@ Joannopoulos of MIT demonstrated continuing tolerance of
|
||||
Steven's ``extra-curricular'' computer-science activities, as well as
|
||||
remarkable creativity in working them into his grant proposals.
|
||||
Steven's physics degree would not exist without him.
|
||||
|
||||
Franz Franchetti wrote SIMD extensions to FFTW 2, which eventually
|
||||
led to the SIMD support in FFTW 3.
|
||||
|
||||
Stefan Kral wrote most of the K7 code generator distributed with FFTW
|
||||
3.0.x and 3.1.x.
|
||||
|
||||
Andrew Sterian contributed the Windows timing code in FFTW 2.
|
||||
|
||||
Didier Miras reported a bug in the test procedure used in FFTW 1.2. We
|
||||
now use a completely different test algorithm by Funda Ergun that does
|
||||
not require a separate FFT program to compare against.
|
||||
|
||||
Wolfgang Reimer contributed the Pentium cycle counter and a few fixes
|
||||
that help portability.
|
||||
|
||||
Ming-Chang Liu uncovered a well-hidden bug in the complex transforms of
|
||||
FFTW 2.0 and supplied a patch to correct it.
|
||||
|
||||
The FFTW FAQ was written in @code{bfnn} (Bizarre Format With No Name)
|
||||
and formatted using the tools developed by Ian Jackson for the Linux
|
||||
FAQ.
|
||||
|
||||
@emph{We are especially thankful to all of our users for their
|
||||
continuing support, feedback, and interest during our development of
|
||||
FFTW.}
|
||||
|
||||
3
fftw-3.3.10/doc/cindex.texi
Normal file
@@ -0,0 +1,3 @@
|
||||
@node Concept Index, Library Index, License and Copyright, Top
|
||||
@chapter Concept Index
|
||||
@printindex cp
|
||||
BIN
fftw-3.3.10/doc/equation-dft.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
fftw-3.3.10/doc/equation-dht.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
fftw-3.3.10/doc/equation-idft.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
fftw-3.3.10/doc/equation-redft00.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
fftw-3.3.10/doc/equation-redft01.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
fftw-3.3.10/doc/equation-redft10.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
fftw-3.3.10/doc/equation-redft11.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
fftw-3.3.10/doc/equation-rodft00.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
fftw-3.3.10/doc/equation-rodft01.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
fftw-3.3.10/doc/equation-rodft10.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
fftw-3.3.10/doc/equation-rodft11.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
79
fftw-3.3.10/doc/f77_wisdom.f
Normal file
@@ -0,0 +1,79 @@
|
||||
c Copyright (c) 2003, 2007-14 Matteo Frigo
|
||||
c Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
|
||||
c
|
||||
c This program is free software; you can redistribute it and/or modify
|
||||
c it under the terms of the GNU General Public License as published by
|
||||
c the Free Software Foundation; either version 2 of the License, or
|
||||
c (at your option) any later version.
|
||||
c
|
||||
c This program is distributed in the hope that it will be useful,
|
||||
c but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
c GNU General Public License for more details.
|
||||
c
|
||||
c You should have received a copy of the GNU General Public License
|
||||
c along with this program; if not, write to the Free Software
|
||||
c Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
c
|
||||
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
|
||||
c
|
||||
c This is an example implementation of Fortran wisdom export/import
|
||||
c to/from a Fortran unit (file), exploiting the generic
|
||||
c dfftw_export_wisdom/dfftw_import_wisdom functions.
|
||||
c
|
||||
c We cannot compile this file into the FFTW library itself, lest all
|
||||
c FFTW-calling programs be required to link to the Fortran I/O
|
||||
c libraries.
|
||||
c
|
||||
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
|
||||
|
||||
c Strictly speaking, the '$' format specifier, which allows us to
|
||||
c write a character without a trailing newline, is not standard F77.
|
||||
c However, it seems to be a nearly universal extension.
|
||||
subroutine write_char(c, iunit)
|
||||
character c
|
||||
integer iunit
|
||||
write(iunit,321) c
|
||||
321 format(a,$)
|
||||
end
|
||||
|
||||
subroutine export_wisdom_to_file(iunit)
|
||||
integer iunit
|
||||
external write_char
|
||||
call dfftw_export_wisdom(write_char, iunit)
|
||||
end
|
||||
|
||||
c Fortran 77 does not have any portable way to read an arbitrary
|
||||
c file one character at a time. The best alternative seems to be to
|
||||
c read a whole line into a buffer, since for fftw-exported wisdom we
|
||||
c can bound the line length. (If the file contains longer lines,
|
||||
c then the lines will be truncated and the wisdom import should
|
||||
c simply fail.) Ugh.
|
||||
subroutine read_char(ic, iunit)
|
||||
integer ic
|
||||
integer iunit
|
||||
character*256 buf
|
||||
save buf
|
||||
integer ibuf
|
||||
data ibuf/257/
|
||||
save ibuf
|
||||
if (ibuf .lt. 257) then
|
||||
ic = ichar(buf(ibuf:ibuf))
|
||||
ibuf = ibuf + 1
|
||||
return
|
||||
endif
|
||||
read(iunit,123,end=666) buf
|
||||
ic = ichar(buf(1:1))
|
||||
ibuf = 2
|
||||
return
|
||||
666 ic = -1
|
||||
ibuf = 257
|
||||
123 format(a256)
|
||||
end
|
||||
|
||||
subroutine import_wisdom_from_file(isuccess, iunit)
|
||||
integer isuccess
|
||||
integer iunit
|
||||
external read_char
|
||||
call dfftw_import_wisdom(isuccess, read_char, iunit)
|
||||
end
|
||||
169
fftw-3.3.10/doc/fftw3.info
Normal file
@@ -0,0 +1,169 @@
|
||||
This is fftw3.info, produced by makeinfo version 6.7 from fftw3.texi.
|
||||
|
||||
This manual is for FFTW (version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
this manual provided the copyright notice and this permission
|
||||
notice are preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of
|
||||
this manual under the conditions for verbatim copying, provided
|
||||
that the entire resulting derived work is distributed under the
|
||||
terms of a permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this
|
||||
manual into another language, under the above conditions for
|
||||
modified versions, except that this permission notice may be stated
|
||||
in a translation approved by the Free Software Foundation.
|
||||
INFO-DIR-SECTION Development
|
||||
START-INFO-DIR-ENTRY
|
||||
* fftw3: (fftw3). FFTW User's Manual.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
Indirect:
|
||||
fftw3.info-1: 1058
|
||||
fftw3.info-2: 301112
|
||||
|
||||
Tag Table:
|
||||
(Indirect)
|
||||
Node: Top1058
|
||||
Node: Introduction1732
|
||||
Node: Tutorial8032
|
||||
Ref: Tutorial-Footnote-19274
|
||||
Node: Complex One-Dimensional DFTs9368
|
||||
Node: Complex Multi-Dimensional DFTs15102
|
||||
Ref: Complex Multi-Dimensional DFTs-Footnote-118528
|
||||
Node: One-Dimensional DFTs of Real Data18663
|
||||
Node: Multi-Dimensional DFTs of Real Data23103
|
||||
Node: More DFTs of Real Data27029
|
||||
Node: The Halfcomplex-format DFT30526
|
||||
Node: Real even/odd DFTs (cosine/sine transforms)33135
|
||||
Ref: Real even/odd DFTs (cosine/sine transforms)-Footnote-138724
|
||||
Ref: Real even/odd DFTs (cosine/sine transforms)-Footnote-238913
|
||||
Node: The Discrete Hartley Transform39847
|
||||
Ref: The Discrete Hartley Transform-Footnote-142029
|
||||
Node: Other Important Topics42279
|
||||
Node: SIMD alignment and fftw_malloc42572
|
||||
Node: Multi-dimensional Array Format44761
|
||||
Node: Row-major Format45381
|
||||
Node: Column-major Format47077
|
||||
Node: Fixed-size Arrays in C48158
|
||||
Node: Dynamic Arrays in C49594
|
||||
Node: Dynamic Arrays in C-The Wrong Way51228
|
||||
Node: Words of Wisdom-Saving Plans52976
|
||||
Node: Caveats in Using Wisdom55644
|
||||
Node: FFTW Reference57727
|
||||
Node: Data Types and Files58215
|
||||
Node: Complex numbers58647
|
||||
Node: Precision60385
|
||||
Node: Memory Allocation61945
|
||||
Node: Using Plans63510
|
||||
Node: Basic Interface67535
|
||||
Ref: Basic Interface-Footnote-168275
|
||||
Node: Complex DFTs68339
|
||||
Node: Planner Flags72304
|
||||
Node: Real-data DFTs77740
|
||||
Node: Real-data DFT Array Format82729
|
||||
Node: Real-to-Real Transforms84985
|
||||
Node: Real-to-Real Transform Kinds88948
|
||||
Node: Advanced Interface91413
|
||||
Node: Advanced Complex DFTs92153
|
||||
Node: Advanced Real-data DFTs96421
|
||||
Node: Advanced Real-to-real Transforms98749
|
||||
Node: Guru Interface99854
|
||||
Node: Interleaved and split arrays100778
|
||||
Node: Guru vector and transform sizes101817
|
||||
Node: Guru Complex DFTs104514
|
||||
Node: Guru Real-data DFTs107350
|
||||
Node: Guru Real-to-real Transforms110269
|
||||
Node: 64-bit Guru Interface111588
|
||||
Node: New-array Execute Functions113903
|
||||
Node: Wisdom118399
|
||||
Node: Wisdom Export118758
|
||||
Node: Wisdom Import120736
|
||||
Node: Forgetting Wisdom122763
|
||||
Node: Wisdom Utilities123136
|
||||
Node: What FFTW Really Computes124498
|
||||
Node: The 1d Discrete Fourier Transform (DFT)125323
|
||||
Node: The 1d Real-data DFT126681
|
||||
Node: 1d Real-even DFTs (DCTs)128345
|
||||
Node: 1d Real-odd DFTs (DSTs)131546
|
||||
Node: 1d Discrete Hartley Transforms (DHTs)134482
|
||||
Node: Multi-dimensional Transforms135158
|
||||
Node: Multi-threaded FFTW137762
|
||||
Node: Installation and Supported Hardware/Software139228
|
||||
Node: Usage of Multi-threaded FFTW141052
|
||||
Node: How Many Threads to Use?145843
|
||||
Node: Thread safety146865
|
||||
Node: Distributed-memory FFTW with MPI150165
|
||||
Node: FFTW MPI Installation152740
|
||||
Node: Linking and Initializing MPI FFTW154527
|
||||
Node: 2d MPI example155750
|
||||
Node: MPI Data Distribution159975
|
||||
Node: Basic and advanced distribution interfaces162849
|
||||
Node: Load balancing167270
|
||||
Node: Transposed distributions168955
|
||||
Node: One-dimensional distributions172722
|
||||
Node: Multi-dimensional MPI DFTs of Real Data175287
|
||||
Node: Other Multi-dimensional Real-data MPI Transforms179928
|
||||
Node: FFTW MPI Transposes182101
|
||||
Node: Basic distributed-transpose interface182941
|
||||
Node: Advanced distributed-transpose interface185114
|
||||
Node: An improved replacement for MPI_Alltoall186398
|
||||
Node: FFTW MPI Wisdom188367
|
||||
Ref: FFTW MPI Wisdom-Footnote-1191105
|
||||
Node: Avoiding MPI Deadlocks192019
|
||||
Node: FFTW MPI Performance Tips193044
|
||||
Node: Combining MPI and Threads194509
|
||||
Node: FFTW MPI Reference197972
|
||||
Node: MPI Files and Data Types198551
|
||||
Node: MPI Initialization199547
|
||||
Node: Using MPI Plans200646
|
||||
Node: MPI Data Distribution Functions202472
|
||||
Node: MPI Plan Creation207929
|
||||
Node: MPI Wisdom Communication218605
|
||||
Node: FFTW MPI Fortran Interface219531
|
||||
Ref: FFTW MPI Fortran Interface-Footnote-1225554
|
||||
Node: Calling FFTW from Modern Fortran225962
|
||||
Node: Overview of Fortran interface227312
|
||||
Node: Extended and quadruple precision in Fortran230767
|
||||
Node: Reversing array dimensions232147
|
||||
Node: FFTW Fortran type reference235678
|
||||
Node: Plan execution in Fortran240172
|
||||
Node: Allocating aligned memory in Fortran243055
|
||||
Node: Accessing the wisdom API from Fortran246417
|
||||
Node: Wisdom File Export/Import from Fortran247194
|
||||
Node: Wisdom String Export/Import from Fortran248856
|
||||
Node: Wisdom Generic Export/Import from Fortran250841
|
||||
Node: Defining an FFTW module253071
|
||||
Node: Calling FFTW from Legacy Fortran254142
|
||||
Node: Fortran-interface routines255699
|
||||
Ref: Fortran-interface routines-Footnote-1259354
|
||||
Ref: Fortran-interface routines-Footnote-2259557
|
||||
Node: FFTW Constants in Fortran259690
|
||||
Node: FFTW Execution in Fortran260844
|
||||
Node: Fortran Examples263590
|
||||
Node: Wisdom of Fortran?267163
|
||||
Node: Upgrading from FFTW version 2268842
|
||||
Ref: Upgrading from FFTW version 2-Footnote-1278565
|
||||
Node: Installation and Customization278748
|
||||
Node: Installation on Unix280389
|
||||
Node: Installation on non-Unix systems288466
|
||||
Node: Cycle Counters290683
|
||||
Node: Generating your own code292434
|
||||
Node: Acknowledgments294468
|
||||
Node: License and Copyright298184
|
||||
Node: Concept Index301112
|
||||
Node: Library Index338972
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Local Variables:
|
||||
coding: utf-8
|
||||
End:
|
||||
6304
fftw-3.3.10/doc/fftw3.info-1
Normal file
BIN
fftw-3.3.10/doc/fftw3.info-2
Normal file
BIN
fftw-3.3.10/doc/fftw3.pdf
Normal file
279
fftw-3.3.10/doc/fftw3.texi
Normal file
@@ -0,0 +1,279 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c Update by C-x C-e on: (texinfo-multiple-files-update "fftw3.texi" nil t)
|
||||
@setfilename fftw3.info
|
||||
@include version.texi
|
||||
@finalout
|
||||
@settitle FFTW @value{VERSION}
|
||||
@setchapternewpage odd
|
||||
@c define constant index (ct)
|
||||
@defcodeindex ct
|
||||
@syncodeindex ct fn
|
||||
@syncodeindex vr fn
|
||||
@syncodeindex pg fn
|
||||
@syncodeindex tp fn
|
||||
@c define foreign function index (ff)
|
||||
@defcodeindex ff
|
||||
@syncodeindex ff cp
|
||||
@c define foreign constant index (fc)
|
||||
@defcodeindex fc
|
||||
@syncodeindex fc cp
|
||||
@c define foreign program index (fp)
|
||||
@defcodeindex fp
|
||||
@syncodeindex fp cp
|
||||
@comment %**end of header
|
||||
|
||||
@iftex
|
||||
@paragraphindent 0
|
||||
@parskip=@medskipamount
|
||||
@end iftex
|
||||
|
||||
@c
|
||||
@c The following macros are coded in a weird way:
|
||||
|
||||
@c @macro FOO
|
||||
@c @noindent
|
||||
@c <STUFF>
|
||||
@c @refill
|
||||
@c @end macro
|
||||
|
||||
@c The @noindent/@refill stuff is not necessary in texinfo up to version
|
||||
@c 4, but it is a hack necessary to make texinfo-5 work.
|
||||
|
||||
@c Texinfo has been stable for the first 15 years of FFTW's history.
|
||||
@c Then some genius, with too much time in his hands and on a mission to
|
||||
@c deliver the world from the evil of the C language, decided to rewrite
|
||||
@c makeinfo in Perl, the old C version of makeinfo being, as I said,
|
||||
@c evil. The official excuse for the rewrite was that now I can have my
|
||||
@c manual in XML format, as if XML were a feature.
|
||||
|
||||
@c The result of this stroke of genius is that texinfo-5 has different
|
||||
@c rules for macro expansion than texinfo-4 does, specifically regarding
|
||||
@c whether or not spaces after a macro are ignored. Texinfo-4 had weird
|
||||
@c rules, but at least they were constant and internally more or less
|
||||
@c consistent. Texinfo-5 has different rules, and even worse the rules
|
||||
@c in texinfo-5 are inconsistent between the TeX and HTML output
|
||||
@c processors. This situation makes it almost impossible for us to
|
||||
@c produce a manual that works with both texinfo 4 and 5 in all modes
|
||||
@c (TeX, info, and html). The @noindent/@refill hack is my best shot at
|
||||
@c patching this situation.
|
||||
|
||||
@c "@noindent" has two effects: First, it makes texinfo-5 believe that
|
||||
@c the next "@ifinfo" is on a new line, otherwise texinfo-5 complains
|
||||
@c that it is not (even though it obviously is). Second, "@noindent" is
|
||||
@c a macro that eats extra space, and we want this effect because somehow
|
||||
@c macro expansion in texinfo-5 inserts extra spaces that were not there
|
||||
@c in texinfo-4.
|
||||
|
||||
@c "@refill" stops texinfo-5 from interpreting the rest of the line after
|
||||
@c a macro invocation as an argument to "@end tex". For example, in
|
||||
@c "FFTW uses @Onlogn algorithms", somehow texinfo-5 thinks that
|
||||
@c "algorithms" is an argument to "@end tex". "@noindent" would have the
|
||||
@c same effect (as would any other macro invocation, I think), but,
|
||||
@c unlike "@noindent", "@refill" does not eat spaces and does not scan
|
||||
@c the rest of the input file for macro arguments. However, "@refill" is
|
||||
@c deemed "obsolete" in the texinfo-5 source code, so expect this to
|
||||
@c break at some point.
|
||||
|
||||
@c This situation is wholly unsatisfactory, and the GNU project is
|
||||
@c obviously out of control. If this nonsense persists, we will abandon
|
||||
@c texinfo and produce a latex-only version of the manual.
|
||||
|
||||
|
||||
@macro Onlogn
|
||||
@noindent
|
||||
@ifinfo
|
||||
O(n log n)
|
||||
@end ifinfo
|
||||
@html
|
||||
<i>O</i>(<i>n</i> log <i>n</i>)
|
||||
@end html
|
||||
@tex
|
||||
$O(n \\log n)$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@macro ndims
|
||||
@noindent
|
||||
@ifinfo
|
||||
n[0] x n[1] x n[2] x ... x n[d-1]
|
||||
@end ifinfo
|
||||
@html
|
||||
n<sub>0</sub> × n<sub>1</sub> × n<sub>2</sub> × … × n<sub>d-1</sub>
|
||||
@end html
|
||||
@tex
|
||||
$n_0 \\times n_1 \\times n_2 \\times \\cdots \\times n_{d-1}$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@macro ndimshalf
|
||||
@noindent
|
||||
@ifinfo
|
||||
n[0] x n[1] x n[2] x ... x (n[d-1]/2 + 1)
|
||||
@end ifinfo
|
||||
@html
|
||||
n<sub>0</sub> × n<sub>1</sub> × n<sub>2</sub> × … × (n<sub>d-1</sub>/2 + 1)
|
||||
@end html
|
||||
@tex
|
||||
$n_0 \\times n_1 \\times n_2 \\times \\cdots \\times (n_{d-1}/2 + 1)$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@macro ndimspad
|
||||
@noindent
|
||||
@ifinfo
|
||||
n[0] x n[1] x n[2] x ... x [2 (n[d-1]/2 + 1)]
|
||||
@end ifinfo
|
||||
@html
|
||||
n<sub>0</sub> × n<sub>1</sub> × n<sub>2</sub> × … × [2 (n<sub>d-1</sub>/2 + 1)]
|
||||
@end html
|
||||
@tex
|
||||
$n_0 \\times n_1 \\times n_2 \\times \\cdots \\times [2(n_{d-1}/2 + 1)]$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@macro twodims{d1, d2}
|
||||
@noindent
|
||||
@ifinfo
|
||||
\d1\ x \d2\
|
||||
@end ifinfo
|
||||
@html
|
||||
\d1\ × \d2\
|
||||
@end html
|
||||
@tex
|
||||
$\d1\ \\times \d2\$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@macro threedims{d1, d2, d3}
|
||||
@noindent
|
||||
@ifinfo
|
||||
\d1\ x \d2\ x \d3\
|
||||
@end ifinfo
|
||||
@html
|
||||
\d1\ × \d2\ × \d3\
|
||||
@end html
|
||||
@tex
|
||||
$\d1\ \\times \d2\ \\times \d3\$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@macro dimk{k}
|
||||
@noindent
|
||||
@ifinfo
|
||||
n[\k\]
|
||||
@end ifinfo
|
||||
@html
|
||||
n<sub>\k\</sub>
|
||||
@end html
|
||||
@tex
|
||||
$n_\k\$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
|
||||
@macro ndimstrans
|
||||
@noindent
|
||||
@ifinfo
|
||||
n[1] x n[0] x n[2] x ... x n[d-1]
|
||||
@end ifinfo
|
||||
@html
|
||||
n<sub>1</sub> × n<sub>0</sub> × n<sub>2</sub> ×…× n<sub>d-1</sub>
|
||||
@end html
|
||||
@tex
|
||||
$n_1 \\times n_0 \\times n_2 \\times \\cdots \\times n_{d-1}$
|
||||
@end tex
|
||||
@refill
|
||||
@end macro
|
||||
|
||||
@copying
|
||||
This manual is for FFTW
|
||||
(version @value{VERSION}, @value{UPDATED}).
|
||||
|
||||
Copyright @copyright{} 2003 Matteo Frigo.
|
||||
|
||||
Copyright @copyright{} 2003 Massachusetts Institute of Technology.
|
||||
|
||||
@quotation
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation.
|
||||
@end quotation
|
||||
@end copying
|
||||
|
||||
@dircategory Development
|
||||
@direntry
|
||||
* fftw3: (fftw3). FFTW User's Manual.
|
||||
@end direntry
|
||||
|
||||
@titlepage
|
||||
@title FFTW
|
||||
@subtitle for version @value{VERSION}, @value{UPDATED}
|
||||
@author Matteo Frigo
|
||||
@author Steven G. Johnson
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@insertcopying
|
||||
@end titlepage
|
||||
|
||||
@contents
|
||||
|
||||
@ifnottex
|
||||
@node Top, Introduction, (dir), (dir)
|
||||
@top FFTW User Manual
|
||||
Welcome to FFTW, the Fastest Fourier Transform in the West. FFTW is a
|
||||
collection of fast C routines to compute the discrete Fourier transform.
|
||||
This manual documents FFTW version @value{VERSION}.
|
||||
@end ifnottex
|
||||
|
||||
@menu
|
||||
* Introduction::
|
||||
* Tutorial::
|
||||
* Other Important Topics::
|
||||
* FFTW Reference::
|
||||
* Multi-threaded FFTW::
|
||||
* Distributed-memory FFTW with MPI::
|
||||
* Calling FFTW from Modern Fortran::
|
||||
* Calling FFTW from Legacy Fortran::
|
||||
* Upgrading from FFTW version 2::
|
||||
* Installation and Customization::
|
||||
* Acknowledgments::
|
||||
* License and Copyright::
|
||||
* Concept Index::
|
||||
* Library Index::
|
||||
@end menu
|
||||
|
||||
@c ************************************************************
|
||||
@include intro.texi
|
||||
@include tutorial.texi
|
||||
@include other.texi
|
||||
@include reference.texi
|
||||
@include threads.texi
|
||||
@include mpi.texi
|
||||
@include modern-fortran.texi
|
||||
@include legacy-fortran.texi
|
||||
@include upgrading.texi
|
||||
@include install.texi
|
||||
@include acknowledgements.texi
|
||||
@include license.texi
|
||||
@include cindex.texi
|
||||
@include findex.texi
|
||||
@c ************************************************************
|
||||
|
||||
@bye
|
||||
3
fftw-3.3.10/doc/findex.texi
Normal file
@@ -0,0 +1,3 @@
|
||||
@node Library Index, , Concept Index, Top
|
||||
@chapter Library Index
|
||||
@printindex fn
|
||||
@@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>1d Discrete Hartley Transforms (DHTs) (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="1d Discrete Hartley Transforms (DHTs) (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="1d Discrete Hartley Transforms (DHTs) (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="What-FFTW-Really-Computes.html" rel="up" title="What FFTW Really Computes">
|
||||
<link href="Multi_002ddimensional-Transforms.html" rel="next" title="Multi-dimensional Transforms">
|
||||
<link href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html" rel="prev" title="1d Real-odd DFTs (DSTs)">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="g_t1d-Discrete-Hartley-Transforms-_0028DHTs_0029"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Multi_002ddimensional-Transforms.html" accesskey="n" rel="next">Multi-dimensional Transforms</a>, Previous: <a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html" accesskey="p" rel="prev">1d Real-odd DFTs (DSTs)</a>, Up: <a href="What-FFTW-Really-Computes.html" accesskey="u" rel="up">What FFTW Really Computes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="g_t1d-Discrete-Hartley-Transforms-_0028DHTs_0029-1"></span><h4 class="subsection">4.8.5 1d Discrete Hartley Transforms (DHTs)</h4>
|
||||
|
||||
<span id="index-discrete-Hartley-transform-2"></span>
|
||||
<span id="index-DHT-1"></span>
|
||||
<p>The discrete Hartley transform (DHT) of a 1d real array <em>X</em> of size
|
||||
<em>n</em> computes a real array <em>Y</em> of the same size, where:
|
||||
<center><img src="equation-dht.png" align="top">.</center>
|
||||
</p>
|
||||
<span id="index-normalization-12"></span>
|
||||
<p>FFTW computes an unnormalized transform, in that there is no coefficient
|
||||
in front of the summation in the DHT. In other words, applying the
|
||||
transform twice (the DHT is its own inverse) will multiply the input by
|
||||
<em>n</em>.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
155
fftw-3.3.10/doc/html/1d-Real_002deven-DFTs-_0028DCTs_0029.html
Normal file
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>1d Real-even DFTs (DCTs) (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="1d Real-even DFTs (DCTs) (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="1d Real-even DFTs (DCTs) (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="What-FFTW-Really-Computes.html" rel="up" title="What FFTW Really Computes">
|
||||
<link href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html" rel="next" title="1d Real-odd DFTs (DSTs)">
|
||||
<link href="The-1d-Real_002ddata-DFT.html" rel="prev" title="The 1d Real-data DFT">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="g_t1d-Real_002deven-DFTs-_0028DCTs_0029"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html" accesskey="n" rel="next">1d Real-odd DFTs (DSTs)</a>, Previous: <a href="The-1d-Real_002ddata-DFT.html" accesskey="p" rel="prev">The 1d Real-data DFT</a>, Up: <a href="What-FFTW-Really-Computes.html" accesskey="u" rel="up">What FFTW Really Computes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="g_t1d-Real_002deven-DFTs-_0028DCTs_0029-1"></span><h4 class="subsection">4.8.3 1d Real-even DFTs (DCTs)</h4>
|
||||
|
||||
<p>The Real-even symmetry DFTs in FFTW are exactly equivalent to the unnormalized
|
||||
forward (and backward) DFTs as defined above, where the input array
|
||||
<em>X</em> of length <em>N</em> is purely real and is also <em>even</em> symmetry. In
|
||||
this case, the output array is likewise real and even symmetry.
|
||||
<span id="index-real_002deven-DFT-1"></span>
|
||||
<span id="index-REDFT-1"></span>
|
||||
</p>
|
||||
|
||||
<span id="index-REDFT00"></span>
|
||||
<p>For the case of <code>REDFT00</code>, this even symmetry means that
|
||||
<i>X<sub>j</sub> = X<sub>N-j</sub></i>,
|
||||
where we take <em>X</em> to be periodic so that
|
||||
<i>X<sub>N</sub> = X</i><sub>0</sub>.
|
||||
Because of this redundancy, only the first <em>n</em> real numbers are
|
||||
actually stored, where <em>N = 2(n-1)</em>.
|
||||
</p>
|
||||
<p>The proper definition of even symmetry for <code>REDFT10</code>,
|
||||
<code>REDFT01</code>, and <code>REDFT11</code> transforms is somewhat more intricate
|
||||
because of the shifts by <em>1/2</em> of the input and/or output, although
|
||||
the corresponding boundary conditions are given in <a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a>. Because of the even symmetry, however,
|
||||
the sine terms in the DFT all cancel and the remaining cosine terms are
|
||||
written explicitly below. This formulation often leads people to call
|
||||
such a transform a <em>discrete cosine transform</em> (DCT), although it is
|
||||
really just a special case of the DFT.
|
||||
<span id="index-discrete-cosine-transform-2"></span>
|
||||
<span id="index-DCT-2"></span>
|
||||
</p>
|
||||
|
||||
<p>In each of the definitions below, we transform a real array <em>X</em> of
|
||||
length <em>n</em> to a real array <em>Y</em> of length <em>n</em>:
|
||||
</p>
|
||||
<span id="REDFT00-_0028DCT_002dI_0029"></span><h4 class="subsubheading">REDFT00 (DCT-I)</h4>
|
||||
<span id="index-REDFT00-1"></span>
|
||||
<p>An <code>REDFT00</code> transform (type-I DCT) in FFTW is defined by:
|
||||
<center><img src="equation-redft00.png" align="top">.</center>
|
||||
Note that this transform is not defined for <em>n=1</em>. For <em>n=2</em>,
|
||||
the summation term above is dropped as you might expect.
|
||||
</p>
|
||||
<span id="REDFT10-_0028DCT_002dII_0029"></span><h4 class="subsubheading">REDFT10 (DCT-II)</h4>
|
||||
<span id="index-REDFT10"></span>
|
||||
<p>An <code>REDFT10</code> transform (type-II DCT, sometimes called “the” DCT) in FFTW is defined by:
|
||||
<center><img src="equation-redft10.png" align="top">.</center>
|
||||
</p>
|
||||
<span id="REDFT01-_0028DCT_002dIII_0029"></span><h4 class="subsubheading">REDFT01 (DCT-III)</h4>
|
||||
<span id="index-REDFT01"></span>
|
||||
<p>An <code>REDFT01</code> transform (type-III DCT) in FFTW is defined by:
|
||||
<center><img src="equation-redft01.png" align="top">.</center>
|
||||
In the case of <em>n=1</em>, this reduces to
|
||||
<i>Y</i><sub>0</sub> = <i>X</i><sub>0</sub>.
|
||||
Up to a scale factor (see below), this is the inverse of <code>REDFT10</code> (“the” DCT), and so the <code>REDFT01</code> (DCT-III) is sometimes called the “IDCT”.
|
||||
<span id="index-IDCT-3"></span>
|
||||
</p>
|
||||
<span id="REDFT11-_0028DCT_002dIV_0029"></span><h4 class="subsubheading">REDFT11 (DCT-IV)</h4>
|
||||
<span id="index-REDFT11"></span>
|
||||
<p>An <code>REDFT11</code> transform (type-IV DCT) in FFTW is defined by:
|
||||
<center><img src="equation-redft11.png" align="top">.</center>
|
||||
</p>
|
||||
<span id="Inverses-and-Normalization"></span><h4 class="subsubheading">Inverses and Normalization</h4>
|
||||
|
||||
<p>These definitions correspond directly to the unnormalized DFTs used
|
||||
elsewhere in FFTW (hence the factors of <em>2</em> in front of the
|
||||
summations). The unnormalized inverse of <code>REDFT00</code> is
|
||||
<code>REDFT00</code>, of <code>REDFT10</code> is <code>REDFT01</code> and vice versa, and
|
||||
of <code>REDFT11</code> is <code>REDFT11</code>. Each unnormalized inverse results
|
||||
in the original array multiplied by <em>N</em>, where <em>N</em> is the
|
||||
<em>logical</em> DFT size. For <code>REDFT00</code>, <em>N=2(n-1)</em> (note that
|
||||
<em>n=1</em> is not defined); otherwise, <em>N=2n</em>.
|
||||
<span id="index-normalization-10"></span>
|
||||
</p>
|
||||
|
||||
<p>In defining the discrete cosine transform, some authors also include
|
||||
additional factors of
|
||||
√2
|
||||
(or its inverse) multiplying selected inputs and/or outputs. This is a
|
||||
mostly cosmetic change that makes the transform orthogonal, but
|
||||
sacrifices the direct equivalence to a symmetric DFT.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html" accesskey="n" rel="next">1d Real-odd DFTs (DSTs)</a>, Previous: <a href="The-1d-Real_002ddata-DFT.html" accesskey="p" rel="prev">The 1d Real-data DFT</a>, Up: <a href="What-FFTW-Really-Computes.html" accesskey="u" rel="up">What FFTW Really Computes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
152
fftw-3.3.10/doc/html/1d-Real_002dodd-DFTs-_0028DSTs_0029.html
Normal file
@@ -0,0 +1,152 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>1d Real-odd DFTs (DSTs) (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="1d Real-odd DFTs (DSTs) (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="1d Real-odd DFTs (DSTs) (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="What-FFTW-Really-Computes.html" rel="up" title="What FFTW Really Computes">
|
||||
<link href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html" rel="next" title="1d Discrete Hartley Transforms (DHTs)">
|
||||
<link href="1d-Real_002deven-DFTs-_0028DCTs_0029.html" rel="prev" title="1d Real-even DFTs (DCTs)">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="g_t1d-Real_002dodd-DFTs-_0028DSTs_0029"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html" accesskey="n" rel="next">1d Discrete Hartley Transforms (DHTs)</a>, Previous: <a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html" accesskey="p" rel="prev">1d Real-even DFTs (DCTs)</a>, Up: <a href="What-FFTW-Really-Computes.html" accesskey="u" rel="up">What FFTW Really Computes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="g_t1d-Real_002dodd-DFTs-_0028DSTs_0029-1"></span><h4 class="subsection">4.8.4 1d Real-odd DFTs (DSTs)</h4>
|
||||
|
||||
<p>The Real-odd symmetry DFTs in FFTW are exactly equivalent to the unnormalized
|
||||
forward (and backward) DFTs as defined above, where the input array
|
||||
<em>X</em> of length <em>N</em> is purely real and is also <em>odd</em> symmetry. In
|
||||
this case, the output is odd symmetry and purely imaginary.
|
||||
<span id="index-real_002dodd-DFT-1"></span>
|
||||
<span id="index-RODFT-1"></span>
|
||||
</p>
|
||||
|
||||
<span id="index-RODFT00"></span>
|
||||
<p>For the case of <code>RODFT00</code>, this odd symmetry means that
|
||||
<i>X<sub>j</sub> = -X<sub>N-j</sub></i>,
|
||||
where we take <em>X</em> to be periodic so that
|
||||
<i>X<sub>N</sub> = X</i><sub>0</sub>.
|
||||
Because of this redundancy, only the first <em>n</em> real numbers
|
||||
starting at <em>j=1</em> are actually stored (the <em>j=0</em> element is
|
||||
zero), where <em>N = 2(n+1)</em>.
|
||||
</p>
|
||||
<p>The proper definition of odd symmetry for <code>RODFT10</code>,
|
||||
<code>RODFT01</code>, and <code>RODFT11</code> transforms is somewhat more intricate
|
||||
because of the shifts by <em>1/2</em> of the input and/or output, although
|
||||
the corresponding boundary conditions are given in <a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a>. Because of the odd symmetry, however,
|
||||
the cosine terms in the DFT all cancel and the remaining sine terms are
|
||||
written explicitly below. This formulation often leads people to call
|
||||
such a transform a <em>discrete sine transform</em> (DST), although it is
|
||||
really just a special case of the DFT.
|
||||
<span id="index-discrete-sine-transform-2"></span>
|
||||
<span id="index-DST-2"></span>
|
||||
</p>
|
||||
|
||||
<p>In each of the definitions below, we transform a real array <em>X</em> of
|
||||
length <em>n</em> to a real array <em>Y</em> of length <em>n</em>:
|
||||
</p>
|
||||
<span id="RODFT00-_0028DST_002dI_0029"></span><h4 class="subsubheading">RODFT00 (DST-I)</h4>
|
||||
<span id="index-RODFT00-1"></span>
|
||||
<p>An <code>RODFT00</code> transform (type-I DST) in FFTW is defined by:
|
||||
<center><img src="equation-rodft00.png" align="top">.</center>
|
||||
</p>
|
||||
<span id="RODFT10-_0028DST_002dII_0029"></span><h4 class="subsubheading">RODFT10 (DST-II)</h4>
|
||||
<span id="index-RODFT10"></span>
|
||||
<p>An <code>RODFT10</code> transform (type-II DST) in FFTW is defined by:
|
||||
<center><img src="equation-rodft10.png" align="top">.</center>
|
||||
</p>
|
||||
<span id="RODFT01-_0028DST_002dIII_0029"></span><h4 class="subsubheading">RODFT01 (DST-III)</h4>
|
||||
<span id="index-RODFT01"></span>
|
||||
<p>An <code>RODFT01</code> transform (type-III DST) in FFTW is defined by:
|
||||
<center><img src="equation-rodft01.png" align="top">.</center>
|
||||
In the case of <em>n=1</em>, this reduces to
|
||||
<i>Y</i><sub>0</sub> = <i>X</i><sub>0</sub>.
|
||||
</p>
|
||||
<span id="RODFT11-_0028DST_002dIV_0029"></span><h4 class="subsubheading">RODFT11 (DST-IV)</h4>
|
||||
<span id="index-RODFT11"></span>
|
||||
<p>An <code>RODFT11</code> transform (type-IV DST) in FFTW is defined by:
|
||||
<center><img src="equation-rodft11.png" align="top">.</center>
|
||||
</p>
|
||||
<span id="Inverses-and-Normalization-1"></span><h4 class="subsubheading">Inverses and Normalization</h4>
|
||||
|
||||
<p>These definitions correspond directly to the unnormalized DFTs used
|
||||
elsewhere in FFTW (hence the factors of <em>2</em> in front of the
|
||||
summations). The unnormalized inverse of <code>RODFT00</code> is
|
||||
<code>RODFT00</code>, of <code>RODFT10</code> is <code>RODFT01</code> and vice versa, and
|
||||
of <code>RODFT11</code> is <code>RODFT11</code>. Each unnormalized inverse results
|
||||
in the original array multiplied by <em>N</em>, where <em>N</em> is the
|
||||
<em>logical</em> DFT size. For <code>RODFT00</code>, <em>N=2(n+1)</em>;
|
||||
otherwise, <em>N=2n</em>.
|
||||
<span id="index-normalization-11"></span>
|
||||
</p>
|
||||
|
||||
<p>In defining the discrete sine transform, some authors also include
|
||||
additional factors of
|
||||
√2
|
||||
(or its inverse) multiplying selected inputs and/or outputs. This is a
|
||||
mostly cosmetic change that makes the transform orthogonal, but
|
||||
sacrifices the direct equivalence to an antisymmetric DFT.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html" accesskey="n" rel="next">1d Discrete Hartley Transforms (DHTs)</a>, Previous: <a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html" accesskey="p" rel="prev">1d Real-even DFTs (DCTs)</a>, Up: <a href="What-FFTW-Really-Computes.html" accesskey="u" rel="up">What FFTW Really Computes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
183
fftw-3.3.10/doc/html/2d-MPI-example.html
Normal file
@@ -0,0 +1,183 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>2d MPI example (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="2d MPI example (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="2d MPI example (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="MPI-Data-Distribution.html" rel="next" title="MPI Data Distribution">
|
||||
<link href="Linking-and-Initializing-MPI-FFTW.html" rel="prev" title="Linking and Initializing MPI FFTW">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="g_t2d-MPI-example"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="MPI-Data-Distribution.html" accesskey="n" rel="next">MPI Data Distribution</a>, Previous: <a href="Linking-and-Initializing-MPI-FFTW.html" accesskey="p" rel="prev">Linking and Initializing MPI FFTW</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="g_t2d-MPI-example-1"></span><h3 class="section">6.3 2d MPI example</h3>
|
||||
|
||||
<p>Before we document the FFTW MPI interface in detail, we begin with a
|
||||
simple example outlining how one would perform a two-dimensional
|
||||
<code>N0</code> by <code>N1</code> complex DFT.
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">#include <fftw3-mpi.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const ptrdiff_t N0 = ..., N1 = ...;
|
||||
fftw_plan plan;
|
||||
fftw_complex *data;
|
||||
ptrdiff_t alloc_local, local_n0, local_0_start, i, j;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
fftw_mpi_init();
|
||||
|
||||
/* <span class="roman">get local data size and allocate</span> */
|
||||
alloc_local = fftw_mpi_local_size_2d(N0, N1, MPI_COMM_WORLD,
|
||||
&local_n0, &local_0_start);
|
||||
data = fftw_alloc_complex(alloc_local);
|
||||
|
||||
/* <span class="roman">create plan for in-place forward DFT</span> */
|
||||
plan = fftw_mpi_plan_dft_2d(N0, N1, data, data, MPI_COMM_WORLD,
|
||||
FFTW_FORWARD, FFTW_ESTIMATE);
|
||||
|
||||
/* <span class="roman">initialize data to some function</span> my_function(x,y) */
|
||||
for (i = 0; i < local_n0; ++i) for (j = 0; j < N1; ++j)
|
||||
data[i*N1 + j] = my_function(local_0_start + i, j);
|
||||
|
||||
/* <span class="roman">compute transforms, in-place, as many times as desired</span> */
|
||||
fftw_execute(plan);
|
||||
|
||||
fftw_destroy_plan(plan);
|
||||
|
||||
MPI_Finalize();
|
||||
}
|
||||
</pre></div>
|
||||
|
||||
<p>As can be seen above, the MPI interface follows the same basic style
|
||||
of allocate/plan/execute/destroy as the serial FFTW routines. All of
|
||||
the MPI-specific routines are prefixed with ‘<samp>fftw_mpi_</samp>’ instead
|
||||
of ‘<samp>fftw_</samp>’. There are a few important differences, however:
|
||||
</p>
|
||||
<p>First, we must call <code>fftw_mpi_init()</code> after calling
|
||||
<code>MPI_Init</code> (required in all MPI programs) and before calling any
|
||||
other ‘<samp>fftw_mpi_</samp>’ routine.
|
||||
<span id="index-MPI_005fInit"></span>
|
||||
<span id="index-fftw_005fmpi_005finit-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Second, when we create the plan with <code>fftw_mpi_plan_dft_2d</code>,
|
||||
analogous to <code>fftw_plan_dft_2d</code>, we pass an additional argument:
|
||||
the communicator, indicating which processes will participate in the
|
||||
transform (here <code>MPI_COMM_WORLD</code>, indicating all processes).
|
||||
Whenever you create, execute, or destroy a plan for an MPI transform,
|
||||
you must call the corresponding FFTW routine on <em>all</em> processes
|
||||
in the communicator for that transform. (That is, these are
|
||||
<em>collective</em> calls.) Note that the plan for the MPI transform
|
||||
uses the standard <code>fftw_execute</code> and <code>fftw_destroy</code> routines
|
||||
(on the other hand, there are MPI-specific new-array execute functions
|
||||
documented below).
|
||||
<span id="index-collective-function"></span>
|
||||
<span id="index-fftw_005fmpi_005fplan_005fdft_005f2d"></span>
|
||||
<span id="index-MPI_005fCOMM_005fWORLD-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Third, all of the FFTW MPI routines take <code>ptrdiff_t</code> arguments
|
||||
instead of <code>int</code> as for the serial FFTW. <code>ptrdiff_t</code> is a
|
||||
standard C integer type which is (at least) 32 bits wide on a 32-bit
|
||||
machine and 64 bits wide on a 64-bit machine. This is to make it easy
|
||||
to specify very large parallel transforms on a 64-bit machine. (You
|
||||
can specify 64-bit transform sizes in the serial FFTW, too, but only
|
||||
by using the ‘<samp>guru64</samp>’ planner interface. See <a href="64_002dbit-Guru-Interface.html">64-bit Guru Interface</a>.)
|
||||
<span id="index-ptrdiff_005ft-1"></span>
|
||||
<span id="index-64_002dbit-architecture-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Fourth, and most importantly, you don’t allocate the entire
|
||||
two-dimensional array on each process. Instead, you call
|
||||
<code>fftw_mpi_local_size_2d</code> to find out what <em>portion</em> of the
|
||||
array resides on each processor, and how much space to allocate.
|
||||
Here, the portion of the array on each process is a <code>local_n0</code> by
|
||||
<code>N1</code> slice of the total array, starting at index
|
||||
<code>local_0_start</code>. The total number of <code>fftw_complex</code> numbers
|
||||
to allocate is given by the <code>alloc_local</code> return value, which
|
||||
<em>may</em> be greater than <code>local_n0 * N1</code> (in case some
|
||||
intermediate calculations require additional storage). The data
|
||||
distribution in FFTW’s MPI interface is described in more detail by
|
||||
the next section.
|
||||
<span id="index-fftw_005fmpi_005flocal_005fsize_005f2d"></span>
|
||||
<span id="index-data-distribution-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Given the portion of the array that resides on the local process, it
|
||||
is straightforward to initialize the data (here to a function
|
||||
<code>myfunction</code>) and otherwise manipulate it. Of course, at the end
|
||||
of the program you may want to output the data somehow, but
|
||||
synchronizing this output is up to you and is beyond the scope of this
|
||||
manual. (One good way to output a large multi-dimensional distributed
|
||||
array in MPI to a portable binary file is to use the free HDF5
|
||||
library; see the <a href="http://www.hdfgroup.org/">HDF home page</a>.)
|
||||
<span id="index-HDF5"></span>
|
||||
<span id="index-MPI-I_002fO"></span>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="MPI-Data-Distribution.html" accesskey="n" rel="next">MPI Data Distribution</a>, Previous: <a href="Linking-and-Initializing-MPI-FFTW.html" accesskey="p" rel="prev">Linking and Initializing MPI FFTW</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
137
fftw-3.3.10/doc/html/64_002dbit-Guru-Interface.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>64-bit Guru Interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="64-bit Guru Interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="64-bit Guru Interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Guru-Interface.html" rel="up" title="Guru Interface">
|
||||
<link href="New_002darray-Execute-Functions.html" rel="next" title="New-array Execute Functions">
|
||||
<link href="Guru-Real_002dto_002dreal-Transforms.html" rel="prev" title="Guru Real-to-real Transforms">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="g_t64_002dbit-Guru-Interface"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Guru-Real_002dto_002dreal-Transforms.html" accesskey="p" rel="prev">Guru Real-to-real Transforms</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="g_t64_002dbit-Guru-Interface-1"></span><h4 class="subsection">4.5.6 64-bit Guru Interface</h4>
|
||||
<span id="index-64_002dbit-architecture"></span>
|
||||
|
||||
<p>When compiled in 64-bit mode on a 64-bit architecture (where addresses
|
||||
are 64 bits wide), FFTW uses 64-bit quantities internally for all
|
||||
transform sizes, strides, and so on—you don’t have to do anything
|
||||
special to exploit this. However, in the ordinary FFTW interfaces,
|
||||
you specify the transform size by an <code>int</code> quantity, which is
|
||||
normally only 32 bits wide. This means that, even though FFTW is
|
||||
using 64-bit sizes internally, you cannot specify a single transform
|
||||
dimension larger than
|
||||
2<sup><small>31</small></sup>−1
|
||||
numbers.
|
||||
</p>
|
||||
<p>We expect that few users will require transforms larger than this, but,
|
||||
for those who do, we provide a 64-bit version of the guru interface in
|
||||
which all sizes are specified as integers of type <code>ptrdiff_t</code>
|
||||
instead of <code>int</code>. (<code>ptrdiff_t</code> is a signed integer type
|
||||
defined by the C standard to be wide enough to represent address
|
||||
differences, and thus must be at least 64 bits wide on a 64-bit
|
||||
machine.) We stress that there is <em>no performance advantage</em> to
|
||||
using this interface—the same internal FFTW code is employed
|
||||
regardless—and it is only necessary if you want to specify very
|
||||
large transform sizes.
|
||||
<span id="index-ptrdiff_005ft"></span>
|
||||
</p>
|
||||
|
||||
<p>In particular, the 64-bit guru interface is a set of planner routines
|
||||
that are exactly the same as the guru planner routines, except that
|
||||
they are named with ‘<samp>guru64</samp>’ instead of ‘<samp>guru</samp>’ and they take
|
||||
arguments of type <code>fftw_iodim64</code> instead of <code>fftw_iodim</code>.
|
||||
For example, instead of <code>fftw_plan_guru_dft</code>, we have
|
||||
<code>fftw_plan_guru64_dft</code>.
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_guru64_dft(
|
||||
int rank, const fftw_iodim64 *dims,
|
||||
int howmany_rank, const fftw_iodim64 *howmany_dims,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fguru64_005fdft"></span>
|
||||
|
||||
<p>The <code>fftw_iodim64</code> type is similar to <code>fftw_iodim</code>, with the
|
||||
same interpretation, except that it uses type <code>ptrdiff_t</code> instead
|
||||
of type <code>int</code>.
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">typedef struct {
|
||||
ptrdiff_t n;
|
||||
ptrdiff_t is;
|
||||
ptrdiff_t os;
|
||||
} fftw_iodim64;
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fiodim64"></span>
|
||||
|
||||
<p>Every other ‘<samp>fftw_plan_guru</samp>’ function also has a
|
||||
‘<samp>fftw_plan_guru64</samp>’ equivalent, but we do not repeat their
|
||||
documentation here since they are identical to the 32-bit versions
|
||||
except as noted above.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Previous: <a href="Guru-Real_002dto_002dreal-Transforms.html" accesskey="p" rel="prev">Guru Real-to-real Transforms</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Accessing the wisdom API from Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Accessing the wisdom API from Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Accessing the wisdom API from Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Modern-Fortran.html" rel="up" title="Calling FFTW from Modern Fortran">
|
||||
<link href="Wisdom-File-Export_002fImport-from-Fortran.html" rel="next" title="Wisdom File Export/Import from Fortran">
|
||||
<link href="Allocating-aligned-memory-in-Fortran.html" rel="prev" title="Allocating aligned memory in Fortran">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Accessing-the-wisdom-API-from-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Defining-an-FFTW-module.html" accesskey="n" rel="next">Defining an FFTW module</a>, Previous: <a href="Allocating-aligned-memory-in-Fortran.html" accesskey="p" rel="prev">Allocating aligned memory in Fortran</a>, Up: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="u" rel="up">Calling FFTW from Modern Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Accessing-the-wisdom-API-from-Fortran-1"></span><h3 class="section">7.6 Accessing the wisdom API from Fortran</h3>
|
||||
<span id="index-wisdom-3"></span>
|
||||
<span id="index-saving-plans-to-disk-3"></span>
|
||||
|
||||
<p>As explained in <a href="Words-of-Wisdom_002dSaving-Plans.html">Words of Wisdom-Saving Plans</a>, FFTW provides a
|
||||
“wisdom” API for saving plans to disk so that they can be recreated
|
||||
quickly. The C API for exporting (see <a href="Wisdom-Export.html">Wisdom Export</a>) and
|
||||
importing (see <a href="Wisdom-Import.html">Wisdom Import</a>) wisdom is somewhat tricky to use
|
||||
from Fortran, however, because of differences in file I/O and string
|
||||
types between C and Fortran.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Wisdom-File-Export_002fImport-from-Fortran.html" accesskey="1">Wisdom File Export/Import from Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Wisdom-String-Export_002fImport-from-Fortran.html" accesskey="2">Wisdom String Export/Import from Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Wisdom-Generic-Export_002fImport-from-Fortran.html" accesskey="3">Wisdom Generic Export/Import from Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
164
fftw-3.3.10/doc/html/Acknowledgments.html
Normal file
@@ -0,0 +1,164 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Acknowledgments (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Acknowledgments (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Acknowledgments (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="License-and-Copyright.html" rel="next" title="License and Copyright">
|
||||
<link href="Generating-your-own-code.html" rel="prev" title="Generating your own code">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Acknowledgments"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="License-and-Copyright.html" accesskey="n" rel="next">License and Copyright</a>, Previous: <a href="Installation-and-Customization.html" accesskey="p" rel="prev">Installation and Customization</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Acknowledgments-1"></span><h2 class="chapter">11 Acknowledgments</h2>
|
||||
|
||||
<p>Matteo Frigo was supported in part by the Special Research Program SFB
|
||||
F011 “AURORA” of the Austrian Science Fund FWF and by MIT Lincoln
|
||||
Laboratory. For previous versions of FFTW, he was supported in part by the
|
||||
Defense Advanced Research Projects Agency (DARPA), under Grants
|
||||
N00014-94-1-0985 and F30602-97-1-0270, and by a Digital Equipment
|
||||
Corporation Fellowship.
|
||||
</p>
|
||||
<p>Steven G. Johnson was supported in part by a Dept. of Defense NDSEG
|
||||
Fellowship, an MIT Karl Taylor Compton Fellowship, and by the Materials
|
||||
Research Science and Engineering Center program of the National Science
|
||||
Foundation under award DMR-9400334.
|
||||
</p>
|
||||
<p>Code for the Cell Broadband Engine was graciously donated to the FFTW
|
||||
project by the IBM Austin Research Lab and included in fftw-3.2. (This
|
||||
code was removed in fftw-3.3.)
|
||||
</p>
|
||||
<p>Code for the MIPS paired-single SIMD support was graciously donated to
|
||||
the FFTW project by CodeSourcery, Inc.
|
||||
</p>
|
||||
<p>We are grateful to Sun Microsystems Inc. for its donation of a
|
||||
cluster of 9 8-processor Ultra HPC 5000 SMPs (24 Gflops peak). These
|
||||
machines served as the primary platform for the development of early
|
||||
versions of FFTW.
|
||||
</p>
|
||||
<p>We thank Intel Corporation for donating a four-processor Pentium Pro
|
||||
machine. We thank the GNU/Linux community for giving us a decent OS to
|
||||
run on that machine.
|
||||
</p>
|
||||
<p>We are thankful to the AMD corporation for donating an AMD Athlon XP 1700+
|
||||
computer to the FFTW project.
|
||||
</p>
|
||||
<p>We thank the Compaq/HP testdrive program and VA Software Corporation
|
||||
(SourceForge.net) for providing remote access to machines that were used
|
||||
to test FFTW.
|
||||
</p>
|
||||
<p>The <code>genfft</code> suite of code generators was written using Objective
|
||||
Caml, a dialect of ML. Objective Caml is a small and elegant language
|
||||
developed by Xavier Leroy. The implementation is available from
|
||||
<a href="http://caml.inria.fr/"><code>http://caml.inria.fr/</code></a>. In previous
|
||||
releases of FFTW, <code>genfft</code> was written in Caml Light, by the same
|
||||
authors. An even earlier implementation of <code>genfft</code> was written in
|
||||
Scheme, but Caml is definitely better for this kind of application.
|
||||
<span id="index-Caml-1"></span>
|
||||
<span id="index-LISP"></span>
|
||||
</p>
|
||||
|
||||
<p>FFTW uses many tools from the GNU project, including <code>automake</code>,
|
||||
<code>texinfo</code>, and <code>libtool</code>.
|
||||
</p>
|
||||
<p>Prof. Charles E. Leiserson of MIT provided continuous support and
|
||||
encouragement. This program would not exist without him. Charles also
|
||||
proposed the name “codelets” for the basic FFT blocks.
|
||||
<span id="index-codelet-3"></span>
|
||||
</p>
|
||||
|
||||
<p>Prof. John D. Joannopoulos of MIT demonstrated continuing tolerance of
|
||||
Steven’s “extra-curricular” computer-science activities, as well as
|
||||
remarkable creativity in working them into his grant proposals.
|
||||
Steven’s physics degree would not exist without him.
|
||||
</p>
|
||||
<p>Franz Franchetti wrote SIMD extensions to FFTW 2, which eventually
|
||||
led to the SIMD support in FFTW 3.
|
||||
</p>
|
||||
<p>Stefan Kral wrote most of the K7 code generator distributed with FFTW
|
||||
3.0.x and 3.1.x.
|
||||
</p>
|
||||
<p>Andrew Sterian contributed the Windows timing code in FFTW 2.
|
||||
</p>
|
||||
<p>Didier Miras reported a bug in the test procedure used in FFTW 1.2. We
|
||||
now use a completely different test algorithm by Funda Ergun that does
|
||||
not require a separate FFT program to compare against.
|
||||
</p>
|
||||
<p>Wolfgang Reimer contributed the Pentium cycle counter and a few fixes
|
||||
that help portability.
|
||||
</p>
|
||||
<p>Ming-Chang Liu uncovered a well-hidden bug in the complex transforms of
|
||||
FFTW 2.0 and supplied a patch to correct it.
|
||||
</p>
|
||||
<p>The FFTW FAQ was written in <code>bfnn</code> (Bizarre Format With No Name)
|
||||
and formatted using the tools developed by Ian Jackson for the Linux
|
||||
FAQ.
|
||||
</p>
|
||||
<p><em>We are especially thankful to all of our users for their
|
||||
continuing support, feedback, and interest during our development of
|
||||
FFTW.</em>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="License-and-Copyright.html" accesskey="n" rel="next">License and Copyright</a>, Previous: <a href="Installation-and-Customization.html" accesskey="p" rel="prev">Installation and Customization</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
177
fftw-3.3.10/doc/html/Advanced-Complex-DFTs.html
Normal file
@@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Advanced Complex DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Advanced Complex DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Advanced Complex DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Advanced-Interface.html" rel="up" title="Advanced Interface">
|
||||
<link href="Advanced-Real_002ddata-DFTs.html" rel="next" title="Advanced Real-data DFTs">
|
||||
<link href="Advanced-Interface.html" rel="prev" title="Advanced Interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Advanced-Complex-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-Real_002ddata-DFTs.html" accesskey="n" rel="next">Advanced Real-data DFTs</a>, Previous: <a href="Advanced-Interface.html" accesskey="p" rel="prev">Advanced Interface</a>, Up: <a href="Advanced-Interface.html" accesskey="u" rel="up">Advanced Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Advanced-Complex-DFTs-1"></span><h4 class="subsection">4.4.1 Advanced Complex DFTs</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_many_dft(int rank, const int *n, int howmany,
|
||||
fftw_complex *in, const int *inembed,
|
||||
int istride, int idist,
|
||||
fftw_complex *out, const int *onembed,
|
||||
int ostride, int odist,
|
||||
int sign, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fmany_005fdft"></span>
|
||||
|
||||
<p>This routine plans multiple multidimensional complex DFTs, and it
|
||||
extends the <code>fftw_plan_dft</code> routine (see <a href="Complex-DFTs.html">Complex DFTs</a>) to
|
||||
compute <code>howmany</code> transforms, each having rank <code>rank</code> and size
|
||||
<code>n</code>. In addition, the transform data need not be contiguous, but
|
||||
it may be laid out in memory with an arbitrary stride. To account for
|
||||
these possibilities, <code>fftw_plan_many_dft</code> adds the new parameters
|
||||
<code>howmany</code>, {<code>i</code>,<code>o</code>}<code>nembed</code>,
|
||||
{<code>i</code>,<code>o</code>}<code>stride</code>, and
|
||||
{<code>i</code>,<code>o</code>}<code>dist</code>. The FFTW basic interface
|
||||
(see <a href="Complex-DFTs.html">Complex DFTs</a>) provides routines specialized for ranks 1, 2,
|
||||
and 3, but the advanced interface handles only the general-rank
|
||||
case.
|
||||
</p>
|
||||
<p><code>howmany</code> is the (nonnegative) number of transforms to compute. The resulting
|
||||
plan computes <code>howmany</code> transforms, where the input of the
|
||||
<code>k</code>-th transform is at location <code>in+k*idist</code> (in C pointer
|
||||
arithmetic), and its output is at location <code>out+k*odist</code>. Plans
|
||||
obtained in this way can often be faster than calling FFTW multiple
|
||||
times for the individual transforms. The basic <code>fftw_plan_dft</code>
|
||||
interface corresponds to <code>howmany=1</code> (in which case the <code>dist</code>
|
||||
parameters are ignored).
|
||||
<span id="index-howmany-parameter"></span>
|
||||
<span id="index-dist"></span>
|
||||
</p>
|
||||
|
||||
<p>Each of the <code>howmany</code> transforms has rank <code>rank</code> and size
|
||||
<code>n</code>, as in the basic interface. In addition, the advanced
|
||||
interface allows the input and output arrays of each transform to be
|
||||
row-major subarrays of larger rank-<code>rank</code> arrays, described by
|
||||
<code>inembed</code> and <code>onembed</code> parameters, respectively.
|
||||
{<code>i</code>,<code>o</code>}<code>nembed</code> must be arrays of length <code>rank</code>,
|
||||
and <code>n</code> should be elementwise less than or equal to
|
||||
{<code>i</code>,<code>o</code>}<code>nembed</code>. Passing <code>NULL</code> for an
|
||||
<code>nembed</code> parameter is equivalent to passing <code>n</code> (i.e. same
|
||||
physical and logical dimensions, as in the basic interface.)
|
||||
</p>
|
||||
<p>The <code>stride</code> parameters indicate that the <code>j</code>-th element of
|
||||
the input or output arrays is located at <code>j*istride</code> or
|
||||
<code>j*ostride</code>, respectively. (For a multi-dimensional array,
|
||||
<code>j</code> is the ordinary row-major index.) When combined with the
|
||||
<code>k</code>-th transform in a <code>howmany</code> loop, from above, this means
|
||||
that the (<code>j</code>,<code>k</code>)-th element is at <code>j*stride+k*dist</code>.
|
||||
(The basic <code>fftw_plan_dft</code> interface corresponds to a stride of 1.)
|
||||
<span id="index-stride-1"></span>
|
||||
</p>
|
||||
|
||||
<p>For in-place transforms, the input and output <code>stride</code> and
|
||||
<code>dist</code> parameters should be the same; otherwise, the planner may
|
||||
return <code>NULL</code>.
|
||||
</p>
|
||||
<p>Arrays <code>n</code>, <code>inembed</code>, and <code>onembed</code> are not used after
|
||||
this function returns. You can safely free or reuse them.
|
||||
</p>
|
||||
<p><strong>Examples</strong>:
|
||||
One transform of one 5 by 6 array contiguous in memory:
|
||||
</p><div class="example">
|
||||
<pre class="example"> int rank = 2;
|
||||
int n[] = {5, 6};
|
||||
int howmany = 1;
|
||||
int idist = odist = 0; /* unused because howmany = 1 */
|
||||
int istride = ostride = 1; /* array is contiguous in memory */
|
||||
int *inembed = n, *onembed = n;
|
||||
</pre></div>
|
||||
|
||||
<p>Transform of three 5 by 6 arrays, each contiguous in memory,
|
||||
stored in memory one after another:
|
||||
</p><div class="example">
|
||||
<pre class="example"> int rank = 2;
|
||||
int n[] = {5, 6};
|
||||
int howmany = 3;
|
||||
int idist = odist = n[0]*n[1]; /* = 30, the distance in memory
|
||||
between the first element
|
||||
of the first array and the
|
||||
first element of the second array */
|
||||
int istride = ostride = 1; /* array is contiguous in memory */
|
||||
int *inembed = n, *onembed = n;
|
||||
</pre></div>
|
||||
|
||||
<p>Transform each column of a 2d array with 10 rows and 3 columns:
|
||||
</p><div class="example">
|
||||
<pre class="example"> int rank = 1; /* not 2: we are computing 1d transforms */
|
||||
int n[] = {10}; /* 1d transforms of length 10 */
|
||||
int howmany = 3;
|
||||
int idist = odist = 1;
|
||||
int istride = ostride = 3; /* distance between two elements in
|
||||
the same column */
|
||||
int *inembed = n, *onembed = n;
|
||||
</pre></div>
|
||||
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-Real_002ddata-DFTs.html" accesskey="n" rel="next">Advanced Real-data DFTs</a>, Previous: <a href="Advanced-Interface.html" accesskey="p" rel="prev">Advanced Interface</a>, Up: <a href="Advanced-Interface.html" accesskey="u" rel="up">Advanced Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
91
fftw-3.3.10/doc/html/Advanced-Interface.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Advanced Interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Advanced Interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Advanced Interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-Reference.html" rel="up" title="FFTW Reference">
|
||||
<link href="Advanced-Complex-DFTs.html" rel="next" title="Advanced Complex DFTs">
|
||||
<link href="Real_002dto_002dReal-Transform-Kinds.html" rel="prev" title="Real-to-Real Transform Kinds">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Advanced-Interface"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Interface.html" accesskey="n" rel="next">Guru Interface</a>, Previous: <a href="Basic-Interface.html" accesskey="p" rel="prev">Basic Interface</a>, Up: <a href="FFTW-Reference.html" accesskey="u" rel="up">FFTW Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Advanced-Interface-1"></span><h3 class="section">4.4 Advanced Interface</h3>
|
||||
<span id="index-advanced-interface-3"></span>
|
||||
|
||||
<p>FFTW’s “advanced” interface supplements the basic interface with four
|
||||
new planner routines, providing a new level of flexibility: you can plan
|
||||
a transform of multiple arrays simultaneously, operate on non-contiguous
|
||||
(strided) data, and transform a subset of a larger multi-dimensional
|
||||
array. Other than these additional features, the planner operates in
|
||||
the same fashion as in the basic interface, and the resulting
|
||||
<code>fftw_plan</code> is used in the same way (see <a href="Using-Plans.html">Using Plans</a>).
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Advanced-Complex-DFTs.html" accesskey="1">Advanced Complex DFTs</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Advanced-Real_002ddata-DFTs.html" accesskey="2">Advanced Real-data DFTs</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Advanced-Real_002dto_002dreal-Transforms.html" accesskey="3">Advanced Real-to-real Transforms</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
122
fftw-3.3.10/doc/html/Advanced-Real_002ddata-DFTs.html
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Advanced Real-data DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Advanced Real-data DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Advanced Real-data DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Advanced-Interface.html" rel="up" title="Advanced Interface">
|
||||
<link href="Advanced-Real_002dto_002dreal-Transforms.html" rel="next" title="Advanced Real-to-real Transforms">
|
||||
<link href="Advanced-Complex-DFTs.html" rel="prev" title="Advanced Complex DFTs">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Advanced-Real_002ddata-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-Real_002dto_002dreal-Transforms.html" accesskey="n" rel="next">Advanced Real-to-real Transforms</a>, Previous: <a href="Advanced-Complex-DFTs.html" accesskey="p" rel="prev">Advanced Complex DFTs</a>, Up: <a href="Advanced-Interface.html" accesskey="u" rel="up">Advanced Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Advanced-Real_002ddata-DFTs-1"></span><h4 class="subsection">4.4.2 Advanced Real-data DFTs</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_many_dft_r2c(int rank, const int *n, int howmany,
|
||||
double *in, const int *inembed,
|
||||
int istride, int idist,
|
||||
fftw_complex *out, const int *onembed,
|
||||
int ostride, int odist,
|
||||
unsigned flags);
|
||||
fftw_plan fftw_plan_many_dft_c2r(int rank, const int *n, int howmany,
|
||||
fftw_complex *in, const int *inembed,
|
||||
int istride, int idist,
|
||||
double *out, const int *onembed,
|
||||
int ostride, int odist,
|
||||
unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fmany_005fdft_005fr2c"></span>
|
||||
<span id="index-fftw_005fplan_005fmany_005fdft_005fc2r"></span>
|
||||
|
||||
<p>Like <code>fftw_plan_many_dft</code>, these two functions add <code>howmany</code>,
|
||||
<code>nembed</code>, <code>stride</code>, and <code>dist</code> parameters to the
|
||||
<code>fftw_plan_dft_r2c</code> and <code>fftw_plan_dft_c2r</code> functions, but
|
||||
otherwise behave the same as the basic interface.
|
||||
</p>
|
||||
<p>The interpretation of <code>howmany</code>, <code>stride</code>, and <code>dist</code> are
|
||||
the same as for <code>fftw_plan_many_dft</code>, above. Note that the
|
||||
<code>stride</code> and <code>dist</code> for the real array are in units of
|
||||
<code>double</code>, and for the complex array are in units of
|
||||
<code>fftw_complex</code>.
|
||||
</p>
|
||||
<p>If an <code>nembed</code> parameter is <code>NULL</code>, it is interpreted as what
|
||||
it would be in the basic interface, as described in <a href="Real_002ddata-DFT-Array-Format.html">Real-data DFT Array Format</a>. That is, for the complex array the size is assumed to be
|
||||
the same as <code>n</code>, but with the last dimension cut roughly in half.
|
||||
For the real array, the size is assumed to be <code>n</code> if the transform
|
||||
is out-of-place, or <code>n</code> with the last dimension “padded” if the
|
||||
transform is in-place.
|
||||
</p>
|
||||
<p>If an <code>nembed</code> parameter is non-<code>NULL</code>, it is interpreted as
|
||||
the physical size of the corresponding array, in row-major order, just
|
||||
as for <code>fftw_plan_many_dft</code>. In this case, each dimension of
|
||||
<code>nembed</code> should be <code>>=</code> what it would be in the basic
|
||||
interface (e.g. the halved or padded <code>n</code>).
|
||||
</p>
|
||||
<p>Arrays <code>n</code>, <code>inembed</code>, and <code>onembed</code> are not used after
|
||||
this function returns. You can safely free or reuse them.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-Real_002dto_002dreal-Transforms.html" accesskey="n" rel="next">Advanced Real-to-real Transforms</a>, Previous: <a href="Advanced-Complex-DFTs.html" accesskey="p" rel="prev">Advanced Complex DFTs</a>, Up: <a href="Advanced-Interface.html" accesskey="u" rel="up">Advanced Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Advanced Real-to-real Transforms (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Advanced Real-to-real Transforms (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Advanced Real-to-real Transforms (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Advanced-Interface.html" rel="up" title="Advanced Interface">
|
||||
<link href="Guru-Interface.html" rel="next" title="Guru Interface">
|
||||
<link href="Advanced-Real_002ddata-DFTs.html" rel="prev" title="Advanced Real-data DFTs">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Advanced-Real_002dto_002dreal-Transforms"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Advanced-Real_002ddata-DFTs.html" accesskey="p" rel="prev">Advanced Real-data DFTs</a>, Up: <a href="Advanced-Interface.html" accesskey="u" rel="up">Advanced Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Advanced-Real_002dto_002dreal-Transforms-1"></span><h4 class="subsection">4.4.3 Advanced Real-to-real Transforms</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_many_r2r(int rank, const int *n, int howmany,
|
||||
double *in, const int *inembed,
|
||||
int istride, int idist,
|
||||
double *out, const int *onembed,
|
||||
int ostride, int odist,
|
||||
const fftw_r2r_kind *kind, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fmany_005fr2r"></span>
|
||||
|
||||
<p>Like <code>fftw_plan_many_dft</code>, this functions adds <code>howmany</code>,
|
||||
<code>nembed</code>, <code>stride</code>, and <code>dist</code> parameters to the
|
||||
<code>fftw_plan_r2r</code> function, but otherwise behave the same as the
|
||||
basic interface. The interpretation of those additional parameters are
|
||||
the same as for <code>fftw_plan_many_dft</code>. (Of course, the
|
||||
<code>stride</code> and <code>dist</code> parameters are now in units of
|
||||
<code>double</code>, not <code>fftw_complex</code>.)
|
||||
</p>
|
||||
<p>Arrays <code>n</code>, <code>inembed</code>, <code>onembed</code>, and <code>kind</code> are not
|
||||
used after this function returns. You can safely free or reuse them.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Advanced distributed-transpose interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Advanced distributed-transpose interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Advanced distributed-transpose interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-MPI-Transposes.html" rel="up" title="FFTW MPI Transposes">
|
||||
<link href="An-improved-replacement-for-MPI_005fAlltoall.html" rel="next" title="An improved replacement for MPI_Alltoall">
|
||||
<link href="Basic-distributed_002dtranspose-interface.html" rel="prev" title="Basic distributed-transpose interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Advanced-distributed_002dtranspose-interface"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="An-improved-replacement-for-MPI_005fAlltoall.html" accesskey="n" rel="next">An improved replacement for MPI_Alltoall</a>, Previous: <a href="Basic-distributed_002dtranspose-interface.html" accesskey="p" rel="prev">Basic distributed-transpose interface</a>, Up: <a href="FFTW-MPI-Transposes.html" accesskey="u" rel="up">FFTW MPI Transposes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Advanced-distributed_002dtranspose-interface-1"></span><h4 class="subsection">6.7.2 Advanced distributed-transpose interface</h4>
|
||||
|
||||
<p>The above routines are for a transpose of a matrix of numbers (of type
|
||||
<code>double</code>), using FFTW’s default block sizes. More generally, one
|
||||
can perform transposes of <em>tuples</em> of numbers, with
|
||||
user-specified block sizes for the input and output:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_mpi_plan_many_transpose
|
||||
(ptrdiff_t n0, ptrdiff_t n1, ptrdiff_t howmany,
|
||||
ptrdiff_t block0, ptrdiff_t block1,
|
||||
double *in, double *out, MPI_Comm comm, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005fplan_005fmany_005ftranspose"></span>
|
||||
|
||||
<p>In this case, one is transposing an <code>n0</code> by <code>n1</code> matrix of
|
||||
<code>howmany</code>-tuples (e.g. <code>howmany = 2</code> for complex numbers).
|
||||
The input is distributed along the <code>n0</code> dimension with block size
|
||||
<code>block0</code>, and the <code>n1</code> by <code>n0</code> output is distributed
|
||||
along the <code>n1</code> dimension with block size <code>block1</code>. If
|
||||
<code>FFTW_MPI_DEFAULT_BLOCK</code> (0) is passed for a block size then FFTW
|
||||
uses its default block size. To get the local size of the data on
|
||||
each process, you should then call <code>fftw_mpi_local_size_many_transposed</code>.
|
||||
<span id="index-FFTW_005fMPI_005fDEFAULT_005fBLOCK-1"></span>
|
||||
<span id="index-fftw_005fmpi_005flocal_005fsize_005fmany_005ftransposed"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
157
fftw-3.3.10/doc/html/Allocating-aligned-memory-in-Fortran.html
Normal file
@@ -0,0 +1,157 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Allocating aligned memory in Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Allocating aligned memory in Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Allocating aligned memory in Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Modern-Fortran.html" rel="up" title="Calling FFTW from Modern Fortran">
|
||||
<link href="Accessing-the-wisdom-API-from-Fortran.html" rel="next" title="Accessing the wisdom API from Fortran">
|
||||
<link href="Plan-execution-in-Fortran.html" rel="prev" title="Plan execution in Fortran">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Allocating-aligned-memory-in-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Accessing-the-wisdom-API-from-Fortran.html" accesskey="n" rel="next">Accessing the wisdom API from Fortran</a>, Previous: <a href="Plan-execution-in-Fortran.html" accesskey="p" rel="prev">Plan execution in Fortran</a>, Up: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="u" rel="up">Calling FFTW from Modern Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Allocating-aligned-memory-in-Fortran-1"></span><h3 class="section">7.5 Allocating aligned memory in Fortran</h3>
|
||||
|
||||
<span id="index-alignment-5"></span>
|
||||
<span id="index-fftw_005falloc_005freal-5"></span>
|
||||
<span id="index-fftw_005falloc_005fcomplex-5"></span>
|
||||
<p>In order to obtain maximum performance in FFTW, you should store your
|
||||
data in arrays that have been specially aligned in memory (see <a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a>). Enforcing alignment also permits you to
|
||||
safely use the new-array execute functions (see <a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a>) to apply a given plan to more than one pair of in/out
|
||||
arrays. Unfortunately, standard Fortran arrays do <em>not</em> provide
|
||||
any alignment guarantees. The <em>only</em> way to allocate aligned
|
||||
memory in standard Fortran is to allocate it with an external C
|
||||
function, like the <code>fftw_alloc_real</code> and
|
||||
<code>fftw_alloc_complex</code> functions. Fortunately, Fortran 2003 provides
|
||||
a simple way to associate such allocated memory with a standard Fortran
|
||||
array pointer that you can then use normally.
|
||||
</p>
|
||||
<p>We therefore recommend allocating all your input/output arrays using
|
||||
the following technique:
|
||||
</p>
|
||||
<ol>
|
||||
<li> Declare a <code>pointer</code>, <code>arr</code>, to your array of the desired type
|
||||
and dimensions. For example, <code>real(C_DOUBLE), pointer :: a(:,:)</code>
|
||||
for a 2d real array, or <code>complex(C_DOUBLE_COMPLEX), pointer ::
|
||||
a(:,:,:)</code> for a 3d complex array.
|
||||
|
||||
</li><li> The number of elements to allocate must be an
|
||||
<code>integer(C_SIZE_T)</code>. You can either declare a variable of this
|
||||
type, e.g. <code>integer(C_SIZE_T) :: sz</code>, to store the number of
|
||||
elements to allocate, or you can use the <code>int(..., C_SIZE_T)</code>
|
||||
intrinsic function. e.g. set <code>sz = L * M * N</code> or use
|
||||
<code>int(L * M * N, C_SIZE_T)</code> for an L × M × N
|
||||
array.
|
||||
|
||||
</li><li> Declare a <code>type(C_PTR) :: p</code> to hold the return value from
|
||||
FFTW’s allocation routine. Set <code>p = fftw_alloc_real(sz)</code> for a real array, or <code>p = fftw_alloc_complex(sz)</code> for a complex array.
|
||||
|
||||
</li><li> <span id="index-c_005ff_005fpointer-2"></span>
|
||||
Associate your pointer <code>arr</code> with the allocated memory <code>p</code>
|
||||
using the standard <code>c_f_pointer</code> subroutine: <code>call
|
||||
c_f_pointer(p, arr, [...dimensions...])</code>, where
|
||||
<code>[...dimensions...])</code> are an array of the dimensions of the array
|
||||
(in the usual Fortran order). e.g. <code>call c_f_pointer(p, arr,
|
||||
[L,M,N])</code> for an L × M × N
|
||||
array. (Alternatively, you can
|
||||
omit the dimensions argument if you specified the shape explicitly
|
||||
when declaring <code>arr</code>.) You can now use <code>arr</code> as a usual
|
||||
multidimensional array.
|
||||
|
||||
</li><li> When you are done using the array, deallocate the memory by <code>call
|
||||
fftw_free(p)</code> on <code>p</code>.
|
||||
|
||||
</li></ol>
|
||||
|
||||
<p>For example, here is how we would allocate an L × M
|
||||
2d real array:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> real(C_DOUBLE), pointer :: arr(:,:)
|
||||
type(C_PTR) :: p
|
||||
p = fftw_alloc_real(int(L * M, C_SIZE_T))
|
||||
call c_f_pointer(p, arr, [L,M])
|
||||
<em>...use arr and arr(i,j) as usual...</em>
|
||||
call fftw_free(p)
|
||||
</pre></div>
|
||||
|
||||
<p>and here is an L × M × N
|
||||
3d complex array:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> complex(C_DOUBLE_COMPLEX), pointer :: arr(:,:,:)
|
||||
type(C_PTR) :: p
|
||||
p = fftw_alloc_complex(int(L * M * N, C_SIZE_T))
|
||||
call c_f_pointer(p, arr, [L,M,N])
|
||||
<em>...use arr and arr(i,j,k) as usual...</em>
|
||||
call fftw_free(p)
|
||||
</pre></div>
|
||||
|
||||
<p>See <a href="Reversing-array-dimensions.html">Reversing array dimensions</a> for an example allocating a
|
||||
single array and associating both real and complex array pointers with
|
||||
it, for in-place real-to-complex transforms.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Accessing-the-wisdom-API-from-Fortran.html" accesskey="n" rel="next">Accessing the wisdom API from Fortran</a>, Previous: <a href="Plan-execution-in-Fortran.html" accesskey="p" rel="prev">Plan execution in Fortran</a>, Up: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="u" rel="up">Calling FFTW from Modern Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>An improved replacement for MPI_Alltoall (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="An improved replacement for MPI_Alltoall (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="An improved replacement for MPI_Alltoall (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-MPI-Transposes.html" rel="up" title="FFTW MPI Transposes">
|
||||
<link href="FFTW-MPI-Wisdom.html" rel="next" title="FFTW MPI Wisdom">
|
||||
<link href="Advanced-distributed_002dtranspose-interface.html" rel="prev" title="Advanced distributed-transpose interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="An-improved-replacement-for-MPI_005fAlltoall"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Advanced-distributed_002dtranspose-interface.html" accesskey="p" rel="prev">Advanced distributed-transpose interface</a>, Up: <a href="FFTW-MPI-Transposes.html" accesskey="u" rel="up">FFTW MPI Transposes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="An-improved-replacement-for-MPI_005fAlltoall-1"></span><h4 class="subsection">6.7.3 An improved replacement for MPI_Alltoall</h4>
|
||||
|
||||
<p>We close this section by noting that FFTW’s MPI transpose routines can
|
||||
be thought of as a generalization for the <code>MPI_Alltoall</code> function
|
||||
(albeit only for floating-point types), and in some circumstances can
|
||||
function as an improved replacement.
|
||||
<span id="index-MPI_005fAlltoall"></span>
|
||||
</p>
|
||||
|
||||
<p><code>MPI_Alltoall</code> is defined by the MPI standard as:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">int MPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
void *recvbuf, int recvcnt, MPI_Datatype recvtype,
|
||||
MPI_Comm comm);
|
||||
</pre></div>
|
||||
|
||||
<p>In particular, for <code>double*</code> arrays <code>in</code> and <code>out</code>,
|
||||
consider the call:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">MPI_Alltoall(in, howmany, MPI_DOUBLE, out, howmany MPI_DOUBLE, comm);
|
||||
</pre></div>
|
||||
|
||||
<p>This is completely equivalent to:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">MPI_Comm_size(comm, &P);
|
||||
plan = fftw_mpi_plan_many_transpose(P, P, howmany, 1, 1, in, out, comm, FFTW_ESTIMATE);
|
||||
fftw_execute(plan);
|
||||
fftw_destroy_plan(plan);
|
||||
</pre></div>
|
||||
|
||||
<p>That is, computing a P × P
|
||||
transpose on <code>P</code> processes,
|
||||
with a block size of 1, is just a standard all-to-all communication.
|
||||
</p>
|
||||
<p>However, using the FFTW routine instead of <code>MPI_Alltoall</code> may
|
||||
have certain advantages. First of all, FFTW’s routine can operate
|
||||
in-place (<code>in == out</code>) whereas <code>MPI_Alltoall</code> can only
|
||||
operate out-of-place.
|
||||
<span id="index-in_002dplace-8"></span>
|
||||
</p>
|
||||
|
||||
<p>Second, even for out-of-place plans, FFTW’s routine may be faster,
|
||||
especially if you need to perform the all-to-all communication many
|
||||
times and can afford to use <code>FFTW_MEASURE</code> or
|
||||
<code>FFTW_PATIENT</code>. It should certainly be no slower, not including
|
||||
the time to create the plan, since one of the possible algorithms that
|
||||
FFTW uses for an out-of-place transpose <em>is</em> simply to call
|
||||
<code>MPI_Alltoall</code>. However, FFTW also considers several other
|
||||
possible algorithms that, depending on your MPI implementation and
|
||||
your hardware, may be faster.
|
||||
<span id="index-FFTW_005fMEASURE-3"></span>
|
||||
<span id="index-FFTW_005fPATIENT-4"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
96
fftw-3.3.10/doc/html/Avoiding-MPI-Deadlocks.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Avoiding MPI Deadlocks (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Avoiding MPI Deadlocks (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Avoiding MPI Deadlocks (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="FFTW-MPI-Performance-Tips.html" rel="next" title="FFTW MPI Performance Tips">
|
||||
<link href="FFTW-MPI-Wisdom.html" rel="prev" title="FFTW MPI Wisdom">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Avoiding-MPI-Deadlocks"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-MPI-Performance-Tips.html" accesskey="n" rel="next">FFTW MPI Performance Tips</a>, Previous: <a href="FFTW-MPI-Wisdom.html" accesskey="p" rel="prev">FFTW MPI Wisdom</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Avoiding-MPI-Deadlocks-1"></span><h3 class="section">6.9 Avoiding MPI Deadlocks</h3>
|
||||
<span id="index-deadlock"></span>
|
||||
|
||||
<p>An MPI program can <em>deadlock</em> if one process is waiting for a
|
||||
message from another process that never gets sent. To avoid deadlocks
|
||||
when using FFTW’s MPI routines, it is important to know which
|
||||
functions are <em>collective</em>: that is, which functions must
|
||||
<em>always</em> be called in the <em>same order</em> from <em>every</em>
|
||||
process in a given communicator. (For example, <code>MPI_Barrier</code> is
|
||||
the canonical example of a collective function in the MPI standard.)
|
||||
<span id="index-collective-function-2"></span>
|
||||
<span id="index-MPI_005fBarrier"></span>
|
||||
</p>
|
||||
|
||||
<p>The functions in FFTW that are <em>always</em> collective are: every
|
||||
function beginning with ‘<samp>fftw_mpi_plan</samp>’, as well as
|
||||
<code>fftw_mpi_broadcast_wisdom</code> and <code>fftw_mpi_gather_wisdom</code>.
|
||||
Also, the following functions from the ordinary FFTW interface are
|
||||
collective when they are applied to a plan created by an
|
||||
‘<samp>fftw_mpi_plan</samp>’ function: <code>fftw_execute</code>,
|
||||
<code>fftw_destroy_plan</code>, and <code>fftw_flops</code>.
|
||||
<span id="index-fftw_005fexecute-4"></span>
|
||||
<span id="index-fftw_005fdestroy_005fplan-2"></span>
|
||||
<span id="index-fftw_005fflops-1"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
104
fftw-3.3.10/doc/html/Basic-Interface.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Basic Interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Basic Interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Basic Interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-Reference.html" rel="up" title="FFTW Reference">
|
||||
<link href="Complex-DFTs.html" rel="next" title="Complex DFTs">
|
||||
<link href="Using-Plans.html" rel="prev" title="Using Plans">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Basic-Interface"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-Interface.html" accesskey="n" rel="next">Advanced Interface</a>, Previous: <a href="Using-Plans.html" accesskey="p" rel="prev">Using Plans</a>, Up: <a href="FFTW-Reference.html" accesskey="u" rel="up">FFTW Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Basic-Interface-1"></span><h3 class="section">4.3 Basic Interface</h3>
|
||||
<span id="index-basic-interface-2"></span>
|
||||
|
||||
<p>Recall that the FFTW API is divided into three parts<a id="DOCF6" href="#FOOT6"><sup>6</sup></a>: the <em>basic interface</em>
|
||||
computes a single transform of contiguous data, the <em>advanced
|
||||
interface</em> computes transforms of multiple or strided arrays, and the
|
||||
<em>guru interface</em> supports the most general data layouts,
|
||||
multiplicities, and strides. This section describes the basic
|
||||
interface, which we expect to satisfy the needs of most users.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Complex-DFTs.html" accesskey="1">Complex DFTs</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Planner-Flags.html" accesskey="2">Planner Flags</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Real_002ddata-DFTs.html" accesskey="3">Real-data DFTs</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Real_002ddata-DFT-Array-Format.html" accesskey="4">Real-data DFT Array Format</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Real_002dto_002dReal-Transforms.html" accesskey="5">Real-to-Real Transforms</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Real_002dto_002dReal-Transform-Kinds.html" accesskey="6">Real-to-Real Transform Kinds</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<div class="footnote">
|
||||
<hr>
|
||||
<h4 class="footnotes-heading">Footnotes</h4>
|
||||
|
||||
<h5><a id="FOOT6" href="#DOCF6">(6)</a></h3>
|
||||
<p><i>Gallia est
|
||||
omnis divisa in partes tres</i> (Julius Caesar).</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,177 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Basic and advanced distribution interfaces (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Basic and advanced distribution interfaces (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Basic and advanced distribution interfaces (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="MPI-Data-Distribution.html" rel="up" title="MPI Data Distribution">
|
||||
<link href="Load-balancing.html" rel="next" title="Load balancing">
|
||||
<link href="MPI-Data-Distribution.html" rel="prev" title="MPI Data Distribution">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Basic-and-advanced-distribution-interfaces"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Load-balancing.html" accesskey="n" rel="next">Load balancing</a>, Previous: <a href="MPI-Data-Distribution.html" accesskey="p" rel="prev">MPI Data Distribution</a>, Up: <a href="MPI-Data-Distribution.html" accesskey="u" rel="up">MPI Data Distribution</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Basic-and-advanced-distribution-interfaces-1"></span><h4 class="subsection">6.4.1 Basic and advanced distribution interfaces</h4>
|
||||
|
||||
<p>As with the planner interface, the ‘<samp>fftw_mpi_local_size</samp>’
|
||||
distribution interface is broken into basic and advanced
|
||||
(‘<samp>_many</samp>’) interfaces, where the latter allows you to specify the
|
||||
block size manually and also to request block sizes when computing
|
||||
multiple transforms simultaneously. These functions are documented
|
||||
more exhaustively by the FFTW MPI Reference, but we summarize the
|
||||
basic ideas here using a couple of two-dimensional examples.
|
||||
</p>
|
||||
<p>For the 100 × 200
|
||||
complex-DFT example, above, we would find
|
||||
the distribution by calling the following function in the basic
|
||||
interface:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">ptrdiff_t fftw_mpi_local_size_2d(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
|
||||
ptrdiff_t *local_n0, ptrdiff_t *local_0_start);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005flocal_005fsize_005f2d-1"></span>
|
||||
|
||||
<p>Given the total size of the data to be transformed (here, <code>n0 =
|
||||
100</code> and <code>n1 = 200</code>) and an MPI communicator (<code>comm</code>), this
|
||||
function provides three numbers.
|
||||
</p>
|
||||
<p>First, it describes the shape of the local data: the current process
|
||||
should store a <code>local_n0</code> by <code>n1</code> slice of the overall
|
||||
dataset, in row-major order (<code>n1</code> dimension contiguous), starting
|
||||
at index <code>local_0_start</code>. That is, if the total dataset is
|
||||
viewed as a <code>n0</code> by <code>n1</code> matrix, the current process should
|
||||
store the rows <code>local_0_start</code> to
|
||||
<code>local_0_start+local_n0-1</code>. Obviously, if you are running with
|
||||
only a single MPI process, that process will store the entire array:
|
||||
<code>local_0_start</code> will be zero and <code>local_n0</code> will be
|
||||
<code>n0</code>. See <a href="Row_002dmajor-Format.html">Row-major Format</a>.
|
||||
<span id="index-row_002dmajor-4"></span>
|
||||
</p>
|
||||
|
||||
<p>Second, the return value is the total number of data elements (e.g.,
|
||||
complex numbers for a complex DFT) that should be allocated for the
|
||||
input and output arrays on the current process (ideally with
|
||||
<code>fftw_malloc</code> or an ‘<samp>fftw_alloc</samp>’ function, to ensure optimal
|
||||
alignment). It might seem that this should always be equal to
|
||||
<code>local_n0 * n1</code>, but this is <em>not</em> the case. FFTW’s
|
||||
distributed FFT algorithms require data redistributions at
|
||||
intermediate stages of the transform, and in some circumstances this
|
||||
may require slightly larger local storage. This is discussed in more
|
||||
detail below, under <a href="Load-balancing.html">Load balancing</a>.
|
||||
<span id="index-fftw_005fmalloc-5"></span>
|
||||
<span id="index-fftw_005falloc_005fcomplex-3"></span>
|
||||
</p>
|
||||
|
||||
<span id="index-advanced-interface-4"></span>
|
||||
<p>The advanced-interface ‘<samp>local_size</samp>’ function for multidimensional
|
||||
transforms returns the same three things (<code>local_n0</code>,
|
||||
<code>local_0_start</code>, and the total number of elements to allocate),
|
||||
but takes more inputs:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">ptrdiff_t fftw_mpi_local_size_many(int rnk, const ptrdiff_t *n,
|
||||
ptrdiff_t howmany,
|
||||
ptrdiff_t block0,
|
||||
MPI_Comm comm,
|
||||
ptrdiff_t *local_n0,
|
||||
ptrdiff_t *local_0_start);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005flocal_005fsize_005fmany"></span>
|
||||
|
||||
<p>The two-dimensional case above corresponds to <code>rnk = 2</code> and an
|
||||
array <code>n</code> of length 2 with <code>n[0] = n0</code> and <code>n[1] = n1</code>.
|
||||
This routine is for any <code>rnk > 1</code>; one-dimensional transforms
|
||||
have their own interface because they work slightly differently, as
|
||||
discussed below.
|
||||
</p>
|
||||
<p>First, the advanced interface allows you to perform multiple
|
||||
transforms at once, of interleaved data, as specified by the
|
||||
<code>howmany</code> parameter. (<code>hoamany</code> is 1 for a single
|
||||
transform.)
|
||||
</p>
|
||||
<p>Second, here you can specify your desired block size in the <code>n0</code>
|
||||
dimension, <code>block0</code>. To use FFTW’s default block size, pass
|
||||
<code>FFTW_MPI_DEFAULT_BLOCK</code> (0) for <code>block0</code>. Otherwise, on
|
||||
<code>P</code> processes, FFTW will return <code>local_n0</code> equal to
|
||||
<code>block0</code> on the first <code>P / block0</code> processes (rounded down),
|
||||
return <code>local_n0</code> equal to <code>n0 - block0 * (P / block0)</code> on
|
||||
the next process, and <code>local_n0</code> equal to zero on any remaining
|
||||
processes. In general, we recommend using the default block size
|
||||
(which corresponds to <code>n0 / P</code>, rounded up).
|
||||
<span id="index-FFTW_005fMPI_005fDEFAULT_005fBLOCK"></span>
|
||||
<span id="index-block-distribution-1"></span>
|
||||
</p>
|
||||
|
||||
<p>For example, suppose you have <code>P = 4</code> processes and <code>n0 =
|
||||
21</code>. The default will be a block size of <code>6</code>, which will give
|
||||
<code>local_n0 = 6</code> on the first three processes and <code>local_n0 =
|
||||
3</code> on the last process. Instead, however, you could specify
|
||||
<code>block0 = 5</code> if you wanted, which would give <code>local_n0 = 5</code>
|
||||
on processes 0 to 2, <code>local_n0 = 6</code> on process 3. (This choice,
|
||||
while it may look superficially more “balanced,” has the same
|
||||
critical path as FFTW’s default but requires more communications.)
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Load-balancing.html" accesskey="n" rel="next">Load balancing</a>, Previous: <a href="MPI-Data-Distribution.html" accesskey="p" rel="prev">MPI Data Distribution</a>, Up: <a href="MPI-Data-Distribution.html" accesskey="u" rel="up">MPI Data Distribution</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Basic distributed-transpose interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Basic distributed-transpose interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Basic distributed-transpose interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-MPI-Transposes.html" rel="up" title="FFTW MPI Transposes">
|
||||
<link href="Advanced-distributed_002dtranspose-interface.html" rel="next" title="Advanced distributed-transpose interface">
|
||||
<link href="FFTW-MPI-Transposes.html" rel="prev" title="FFTW MPI Transposes">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Basic-distributed_002dtranspose-interface"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-distributed_002dtranspose-interface.html" accesskey="n" rel="next">Advanced distributed-transpose interface</a>, Previous: <a href="FFTW-MPI-Transposes.html" accesskey="p" rel="prev">FFTW MPI Transposes</a>, Up: <a href="FFTW-MPI-Transposes.html" accesskey="u" rel="up">FFTW MPI Transposes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Basic-distributed_002dtranspose-interface-1"></span><h4 class="subsection">6.7.1 Basic distributed-transpose interface</h4>
|
||||
|
||||
<p>In particular, suppose that we have an <code>n0</code> by <code>n1</code> array in
|
||||
row-major order, block-distributed across the <code>n0</code> dimension. To
|
||||
transpose this into an <code>n1</code> by <code>n0</code> array block-distributed
|
||||
across the <code>n1</code> dimension, we would create a plan by calling the
|
||||
following function:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_mpi_plan_transpose(ptrdiff_t n0, ptrdiff_t n1,
|
||||
double *in, double *out,
|
||||
MPI_Comm comm, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005fplan_005ftranspose"></span>
|
||||
|
||||
<p>The input and output arrays (<code>in</code> and <code>out</code>) can be the
|
||||
same. The transpose is actually executed by calling
|
||||
<code>fftw_execute</code> on the plan, as usual.
|
||||
<span id="index-fftw_005fexecute-3"></span>
|
||||
</p>
|
||||
|
||||
<p>The <code>flags</code> are the usual FFTW planner flags, but support
|
||||
two additional flags: <code>FFTW_MPI_TRANSPOSED_OUT</code> and/or
|
||||
<code>FFTW_MPI_TRANSPOSED_IN</code>. What these flags indicate, for
|
||||
transpose plans, is that the output and/or input, respectively, are
|
||||
<em>locally</em> transposed. That is, on each process input data is
|
||||
normally stored as a <code>local_n0</code> by <code>n1</code> array in row-major
|
||||
order, but for an <code>FFTW_MPI_TRANSPOSED_IN</code> plan the input data is
|
||||
stored as <code>n1</code> by <code>local_n0</code> in row-major order. Similarly,
|
||||
<code>FFTW_MPI_TRANSPOSED_OUT</code> means that the output is <code>n0</code> by
|
||||
<code>local_n1</code> instead of <code>local_n1</code> by <code>n0</code>.
|
||||
<span id="index-FFTW_005fMPI_005fTRANSPOSED_005fOUT-1"></span>
|
||||
<span id="index-FFTW_005fMPI_005fTRANSPOSED_005fIN-1"></span>
|
||||
</p>
|
||||
|
||||
<p>To determine the local size of the array on each process before and
|
||||
after the transpose, as well as the amount of storage that must be
|
||||
allocated, one should call <code>fftw_mpi_local_size_2d_transposed</code>,
|
||||
just as for a 2d DFT as described in the previous section:
|
||||
<span id="index-data-distribution-4"></span>
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">ptrdiff_t fftw_mpi_local_size_2d_transposed
|
||||
(ptrdiff_t n0, ptrdiff_t n1, MPI_Comm comm,
|
||||
ptrdiff_t *local_n0, ptrdiff_t *local_0_start,
|
||||
ptrdiff_t *local_n1, ptrdiff_t *local_1_start);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005flocal_005fsize_005f2d_005ftransposed"></span>
|
||||
|
||||
<p>Again, the return value is the local storage to allocate, which in
|
||||
this case is the number of <em>real</em> (<code>double</code>) values rather
|
||||
than complex numbers as in the previous examples.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Advanced-distributed_002dtranspose-interface.html" accesskey="n" rel="next">Advanced distributed-transpose interface</a>, Previous: <a href="FFTW-MPI-Transposes.html" accesskey="p" rel="prev">FFTW MPI Transposes</a>, Up: <a href="FFTW-MPI-Transposes.html" accesskey="u" rel="up">FFTW MPI Transposes</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
115
fftw-3.3.10/doc/html/Calling-FFTW-from-Legacy-Fortran.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Calling FFTW from Legacy Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Calling FFTW from Legacy Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Calling FFTW from Legacy Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="Fortran_002dinterface-routines.html" rel="next" title="Fortran-interface routines">
|
||||
<link href="Defining-an-FFTW-module.html" rel="prev" title="Defining an FFTW module">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Calling-FFTW-from-Legacy-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Upgrading-from-FFTW-version-2.html" accesskey="n" rel="next">Upgrading from FFTW version 2</a>, Previous: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="p" rel="prev">Calling FFTW from Modern Fortran</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Calling-FFTW-from-Legacy-Fortran-1"></span><h2 class="chapter">8 Calling FFTW from Legacy Fortran</h2>
|
||||
<span id="index-Fortran-interface-3"></span>
|
||||
|
||||
<p>This chapter describes the interface to FFTW callable by Fortran code
|
||||
in older compilers not supporting the Fortran 2003 C interoperability
|
||||
features (see <a href="Calling-FFTW-from-Modern-Fortran.html">Calling FFTW from Modern Fortran</a>). This interface
|
||||
has the major disadvantage that it is not type-checked, so if you
|
||||
mistake the argument types or ordering then your program will not have
|
||||
any compiler errors, and will likely crash at runtime. So, greater
|
||||
care is needed. Also, technically interfacing older Fortran versions
|
||||
to C is nonstandard, but in practice we have found that the techniques
|
||||
used in this chapter have worked with all known Fortran compilers for
|
||||
many years.
|
||||
</p>
|
||||
<p>The legacy Fortran interface differs from the C interface only in the
|
||||
prefix (‘<samp>dfftw_</samp>’ instead of ‘<samp>fftw_</samp>’ in double precision) and
|
||||
a few other minor details. This Fortran interface is included in the
|
||||
FFTW libraries by default, unless a Fortran compiler isn’t found on
|
||||
your system or <code>--disable-fortran</code> is included in the
|
||||
<code>configure</code> flags. We assume here that the reader is already
|
||||
familiar with the usage of FFTW in C, as described elsewhere in this
|
||||
manual.
|
||||
</p>
|
||||
<p>The MPI parallel interface to FFTW is <em>not</em> currently available
|
||||
to legacy Fortran.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Fortran_002dinterface-routines.html" accesskey="1">Fortran-interface routines</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-Constants-in-Fortran.html" accesskey="2">FFTW Constants in Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-Execution-in-Fortran.html" accesskey="3">FFTW Execution in Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Fortran-Examples.html" accesskey="4">Fortran Examples</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Wisdom-of-Fortran_003f.html" accesskey="5">Wisdom of Fortran?</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Upgrading-from-FFTW-version-2.html" accesskey="n" rel="next">Upgrading from FFTW version 2</a>, Previous: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="p" rel="prev">Calling FFTW from Modern Fortran</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
108
fftw-3.3.10/doc/html/Calling-FFTW-from-Modern-Fortran.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Calling FFTW from Modern Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Calling FFTW from Modern Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Calling FFTW from Modern Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="Overview-of-Fortran-interface.html" rel="next" title="Overview of Fortran interface">
|
||||
<link href="FFTW-MPI-Fortran-Interface.html" rel="prev" title="FFTW MPI Fortran Interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Calling-FFTW-from-Modern-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="n" rel="next">Calling FFTW from Legacy Fortran</a>, Previous: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="p" rel="prev">Distributed-memory FFTW with MPI</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Calling-FFTW-from-Modern-Fortran-1"></span><h2 class="chapter">7 Calling FFTW from Modern Fortran</h2>
|
||||
<span id="index-Fortran-interface-2"></span>
|
||||
|
||||
<p>Fortran 2003 standardized ways for Fortran code to call C libraries,
|
||||
and this allows us to support a direct translation of the FFTW C API
|
||||
into Fortran. Compared to the legacy Fortran 77 interface
|
||||
(see <a href="Calling-FFTW-from-Legacy-Fortran.html">Calling FFTW from Legacy Fortran</a>), this direct interface
|
||||
offers many advantages, especially compile-time type-checking and
|
||||
aligned memory allocation. As of this writing, support for these C
|
||||
interoperability features seems widespread, having been implemented in
|
||||
nearly all major Fortran compilers (e.g. GNU, Intel, IBM,
|
||||
Oracle/Solaris, Portland Group, NAG).
|
||||
<span id="index-portability-4"></span>
|
||||
</p>
|
||||
<p>This chapter documents that interface. For the most part, since this
|
||||
interface allows Fortran to call the C interface directly, the usage
|
||||
is identical to C translated to Fortran syntax. However, there are a
|
||||
few subtle points such as memory allocation, wisdom, and data types
|
||||
that deserve closer attention.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Overview-of-Fortran-interface.html" accesskey="1">Overview of Fortran interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Reversing-array-dimensions.html" accesskey="2">Reversing array dimensions</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-Fortran-type-reference.html" accesskey="3">FFTW Fortran type reference</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Plan-execution-in-Fortran.html" accesskey="4">Plan execution in Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Allocating-aligned-memory-in-Fortran.html" accesskey="5">Allocating aligned memory in Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Accessing-the-wisdom-API-from-Fortran.html" accesskey="6">Accessing the wisdom API from Fortran</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Defining-an-FFTW-module.html" accesskey="7">Defining an FFTW module</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
128
fftw-3.3.10/doc/html/Caveats-in-Using-Wisdom.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Caveats in Using Wisdom (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Caveats in Using Wisdom (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Caveats in Using Wisdom (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Other-Important-Topics.html" rel="up" title="Other Important Topics">
|
||||
<link href="FFTW-Reference.html" rel="next" title="FFTW Reference">
|
||||
<link href="Words-of-Wisdom_002dSaving-Plans.html" rel="prev" title="Words of Wisdom-Saving Plans">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Caveats-in-Using-Wisdom"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Words-of-Wisdom_002dSaving-Plans.html" accesskey="p" rel="prev">Words of Wisdom-Saving Plans</a>, Up: <a href="Other-Important-Topics.html" accesskey="u" rel="up">Other Important Topics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Caveats-in-Using-Wisdom-1"></span><h3 class="section">3.4 Caveats in Using Wisdom</h3>
|
||||
<span id="index-wisdom_002c-problems-with"></span>
|
||||
|
||||
<blockquote>
|
||||
<i>
|
||||
<p>For in much wisdom is much grief, and he that increaseth knowledge
|
||||
increaseth sorrow.
|
||||
</i>
|
||||
[Ecclesiastes 1:18]
|
||||
<span id="index-Ecclesiastes"></span>
|
||||
</p></blockquote>
|
||||
|
||||
<span id="index-portability-1"></span>
|
||||
<p>There are pitfalls to using wisdom, in that it can negate FFTW’s
|
||||
ability to adapt to changing hardware and other conditions. For
|
||||
example, it would be perfectly possible to export wisdom from a
|
||||
program running on one processor and import it into a program running
|
||||
on another processor. Doing so, however, would mean that the second
|
||||
program would use plans optimized for the first processor, instead of
|
||||
the one it is running on.
|
||||
</p>
|
||||
<p>It should be safe to reuse wisdom as long as the hardware and program
|
||||
binaries remain unchanged. (Actually, the optimal plan may change even
|
||||
between runs of the same binary on identical hardware, due to
|
||||
differences in the virtual memory environment, etcetera. Users
|
||||
seriously interested in performance should worry about this problem,
|
||||
too.) It is likely that, if the same wisdom is used for two
|
||||
different program binaries, even running on the same machine, the
|
||||
plans may be sub-optimal because of differing code alignments. It is
|
||||
therefore wise to recreate wisdom every time an application is
|
||||
recompiled. The more the underlying hardware and software changes
|
||||
between the creation of wisdom and its use, the greater grows
|
||||
the risk of sub-optimal plans.
|
||||
</p>
|
||||
<p>Nevertheless, if the choice is between using <code>FFTW_ESTIMATE</code> or
|
||||
using possibly-suboptimal wisdom (created on the same machine, but for a
|
||||
different binary), the wisdom is likely to be better. For this reason,
|
||||
we provide a function to import wisdom from a standard system-wide
|
||||
location (<code>/etc/fftw/wisdom</code> on Unix):
|
||||
<span id="index-wisdom_002c-system_002dwide"></span>
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">int fftw_import_system_wisdom(void);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fimport_005fsystem_005fwisdom"></span>
|
||||
|
||||
<p>FFTW also provides a standalone program, <code>fftw-wisdom</code> (described
|
||||
by its own <code>man</code> page on Unix) with which users can create wisdom,
|
||||
e.g. for a canonical set of sizes to store in the system wisdom file.
|
||||
See <a href="Wisdom-Utilities.html">Wisdom Utilities</a>.
|
||||
<span id="index-fftw_002dwisdom-utility"></span>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Previous: <a href="Words-of-Wisdom_002dSaving-Plans.html" accesskey="p" rel="prev">Words of Wisdom-Saving Plans</a>, Up: <a href="Other-Important-Topics.html" accesskey="u" rel="up">Other Important Topics</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
91
fftw-3.3.10/doc/html/Column_002dmajor-Format.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Column-major Format (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Column-major Format (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Column-major Format (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Multi_002ddimensional-Array-Format.html" rel="up" title="Multi-dimensional Array Format">
|
||||
<link href="Fixed_002dsize-Arrays-in-C.html" rel="next" title="Fixed-size Arrays in C">
|
||||
<link href="Row_002dmajor-Format.html" rel="prev" title="Row-major Format">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Column_002dmajor-Format"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Fixed_002dsize-Arrays-in-C.html" accesskey="n" rel="next">Fixed-size Arrays in C</a>, Previous: <a href="Row_002dmajor-Format.html" accesskey="p" rel="prev">Row-major Format</a>, Up: <a href="Multi_002ddimensional-Array-Format.html" accesskey="u" rel="up">Multi-dimensional Array Format</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Column_002dmajor-Format-1"></span><h4 class="subsection">3.2.2 Column-major Format</h4>
|
||||
<span id="index-column_002dmajor"></span>
|
||||
|
||||
<p>Readers from the Fortran world are used to arrays stored in
|
||||
<em>column-major</em> order (sometimes called “Fortran order”). This is
|
||||
essentially the exact opposite of row-major order in that, here, the
|
||||
<em>first</em> dimension’s index varies most quickly.
|
||||
</p>
|
||||
<p>If you have an array stored in column-major order and wish to
|
||||
transform it using FFTW, it is quite easy to do. When creating the
|
||||
plan, simply pass the dimensions of the array to the planner in
|
||||
<em>reverse order</em>. For example, if your array is a rank three
|
||||
<code>N x M x L</code> matrix in column-major order, you should pass the
|
||||
dimensions of the array as if it were an <code>L x M x N</code> matrix
|
||||
(which it is, from the perspective of FFTW). This is done for you
|
||||
<em>automatically</em> by the FFTW legacy-Fortran interface
|
||||
(see <a href="Calling-FFTW-from-Legacy-Fortran.html">Calling FFTW from Legacy Fortran</a>), but you must do it
|
||||
manually with the modern Fortran interface (see <a href="Reversing-array-dimensions.html">Reversing array dimensions</a>).
|
||||
<span id="index-Fortran-interface"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
158
fftw-3.3.10/doc/html/Combining-MPI-and-Threads.html
Normal file
@@ -0,0 +1,158 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Combining MPI and Threads (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Combining MPI and Threads (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Combining MPI and Threads (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="FFTW-MPI-Reference.html" rel="next" title="FFTW MPI Reference">
|
||||
<link href="FFTW-MPI-Performance-Tips.html" rel="prev" title="FFTW MPI Performance Tips">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Combining-MPI-and-Threads"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-MPI-Reference.html" accesskey="n" rel="next">FFTW MPI Reference</a>, Previous: <a href="FFTW-MPI-Performance-Tips.html" accesskey="p" rel="prev">FFTW MPI Performance Tips</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Combining-MPI-and-Threads-1"></span><h3 class="section">6.11 Combining MPI and Threads</h3>
|
||||
<span id="index-threads-2"></span>
|
||||
|
||||
<p>In certain cases, it may be advantageous to combine MPI
|
||||
(distributed-memory) and threads (shared-memory) parallelization.
|
||||
FFTW supports this, with certain caveats. For example, if you have a
|
||||
cluster of 4-processor shared-memory nodes, you may want to use
|
||||
threads within the nodes and MPI between the nodes, instead of MPI for
|
||||
all parallelization.
|
||||
</p>
|
||||
<p>In particular, it is possible to seamlessly combine the MPI FFTW
|
||||
routines with the multi-threaded FFTW routines (see <a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a>). However, some care must be taken in the initialization code,
|
||||
which should look something like this:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">int threads_ok;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int provided;
|
||||
MPI_Init_thread(&argc, &argv, MPI_THREAD_FUNNELED, &provided);
|
||||
threads_ok = provided >= MPI_THREAD_FUNNELED;
|
||||
|
||||
if (threads_ok) threads_ok = fftw_init_threads();
|
||||
fftw_mpi_init();
|
||||
|
||||
...
|
||||
if (threads_ok) fftw_plan_with_nthreads(...);
|
||||
...
|
||||
|
||||
MPI_Finalize();
|
||||
}
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005finit-3"></span>
|
||||
<span id="index-fftw_005finit_005fthreads-2"></span>
|
||||
<span id="index-fftw_005fplan_005fwith_005fnthreads-1"></span>
|
||||
|
||||
<p>First, note that instead of calling <code>MPI_Init</code>, you should call
|
||||
<code>MPI_Init_threads</code>, which is the initialization routine defined
|
||||
by the MPI-2 standard to indicate to MPI that your program will be
|
||||
multithreaded. We pass <code>MPI_THREAD_FUNNELED</code>, which indicates
|
||||
that we will only call MPI routines from the main thread. (FFTW will
|
||||
launch additional threads internally, but the extra threads will not
|
||||
call MPI code.) (You may also pass <code>MPI_THREAD_SERIALIZED</code> or
|
||||
<code>MPI_THREAD_MULTIPLE</code>, which requests additional multithreading
|
||||
support from the MPI implementation, but this is not required by
|
||||
FFTW.) The <code>provided</code> parameter returns what level of threads
|
||||
support is actually supported by your MPI implementation; this
|
||||
<em>must</em> be at least <code>MPI_THREAD_FUNNELED</code> if you want to call
|
||||
the FFTW threads routines, so we define a global variable
|
||||
<code>threads_ok</code> to record this. You should only call
|
||||
<code>fftw_init_threads</code> or <code>fftw_plan_with_nthreads</code> if
|
||||
<code>threads_ok</code> is true. For more information on thread safety in
|
||||
MPI, see the
|
||||
<a href="http://www.mpi-forum.org/docs/mpi-20-html/node162.htm">MPI and
|
||||
Threads</a> section of the MPI-2 standard.
|
||||
<span id="index-thread-safety-2"></span>
|
||||
</p>
|
||||
|
||||
<p>Second, we must call <code>fftw_init_threads</code> <em>before</em>
|
||||
<code>fftw_mpi_init</code>. This is critical for technical reasons having
|
||||
to do with how FFTW initializes its list of algorithms.
|
||||
</p>
|
||||
<p>Then, if you call <code>fftw_plan_with_nthreads(N)</code>, <em>every</em> MPI
|
||||
process will launch (up to) <code>N</code> threads to parallelize its transforms.
|
||||
</p>
|
||||
<p>For example, in the hypothetical cluster of 4-processor nodes, you
|
||||
might wish to launch only a single MPI process per node, and then call
|
||||
<code>fftw_plan_with_nthreads(4)</code> on each process to use all
|
||||
processors in the nodes.
|
||||
</p>
|
||||
<p>This may or may not be faster than simply using as many MPI processes
|
||||
as you have processors, however. On the one hand, using threads
|
||||
within a node eliminates the need for explicit message passing within
|
||||
the node. On the other hand, FFTW’s transpose routines are not
|
||||
multi-threaded, and this means that the communications that do take
|
||||
place will not benefit from parallelization within the node.
|
||||
Moreover, many MPI implementations already have optimizations to
|
||||
exploit shared memory when it is available, so adding the
|
||||
multithreaded FFTW on top of this may be superfluous.
|
||||
<span id="index-transpose-4"></span>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-MPI-Reference.html" accesskey="n" rel="next">FFTW MPI Reference</a>, Previous: <a href="FFTW-MPI-Performance-Tips.html" accesskey="p" rel="prev">FFTW MPI Performance Tips</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
170
fftw-3.3.10/doc/html/Complex-DFTs.html
Normal file
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Complex DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Complex DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Complex DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Basic-Interface.html" rel="up" title="Basic Interface">
|
||||
<link href="Planner-Flags.html" rel="next" title="Planner Flags">
|
||||
<link href="Basic-Interface.html" rel="prev" title="Basic Interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Complex-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Planner-Flags.html" accesskey="n" rel="next">Planner Flags</a>, Previous: <a href="Basic-Interface.html" accesskey="p" rel="prev">Basic Interface</a>, Up: <a href="Basic-Interface.html" accesskey="u" rel="up">Basic Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Complex-DFTs-1"></span><h4 class="subsection">4.3.1 Complex DFTs</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_dft_1d(int n0,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
fftw_plan fftw_plan_dft_2d(int n0, int n1,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
fftw_plan fftw_plan_dft_3d(int n0, int n1, int n2,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
fftw_plan fftw_plan_dft(int rank, const int *n,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fdft_005f1d-1"></span>
|
||||
<span id="index-fftw_005fplan_005fdft_005f2d-1"></span>
|
||||
<span id="index-fftw_005fplan_005fdft_005f3d-1"></span>
|
||||
<span id="index-fftw_005fplan_005fdft-1"></span>
|
||||
|
||||
<p>Plan a complex input/output discrete Fourier transform (DFT) in zero or
|
||||
more dimensions, returning an <code>fftw_plan</code> (see <a href="Using-Plans.html">Using Plans</a>).
|
||||
</p>
|
||||
<p>Once you have created a plan for a certain transform type and
|
||||
parameters, then creating another plan of the same type and parameters,
|
||||
but for different arrays, is fast and shares constant data with the
|
||||
first plan (if it still exists).
|
||||
</p>
|
||||
<p>The planner returns <code>NULL</code> if the plan cannot be created. In the
|
||||
standard FFTW distribution, the basic interface is guaranteed to return
|
||||
a non-<code>NULL</code> plan. A plan may be <code>NULL</code>, however, if you are
|
||||
using a customized FFTW configuration supporting a restricted set of
|
||||
transforms.
|
||||
</p>
|
||||
<span id="Arguments"></span><h4 class="subsubheading">Arguments</h4>
|
||||
<ul>
|
||||
<li> <code>rank</code> is the rank of the transform (it should be the size of the
|
||||
array <code>*n</code>), and can be any non-negative integer. (See <a href="Complex-Multi_002dDimensional-DFTs.html">Complex Multi-Dimensional DFTs</a>, for the definition of “rank”.) The
|
||||
‘<samp>_1d</samp>’, ‘<samp>_2d</samp>’, and ‘<samp>_3d</samp>’ planners correspond to a
|
||||
<code>rank</code> of <code>1</code>, <code>2</code>, and <code>3</code>, respectively. The rank
|
||||
may be zero, which is equivalent to a rank-1 transform of size 1, i.e. a
|
||||
copy of one number from input to output.
|
||||
|
||||
</li><li> <code>n0</code>, <code>n1</code>, <code>n2</code>, or <code>n[0..rank-1]</code> (as appropriate
|
||||
for each routine) specify the size of the transform dimensions. They
|
||||
can be any positive integer.
|
||||
|
||||
<ul class="no-bullet">
|
||||
<li>- <span id="index-row_002dmajor-1"></span>
|
||||
Multi-dimensional arrays are stored in row-major order with dimensions:
|
||||
<code>n0</code> x <code>n1</code>; or <code>n0</code> x <code>n1</code> x <code>n2</code>; or
|
||||
<code>n[0]</code> x <code>n[1]</code> x ... x <code>n[rank-1]</code>.
|
||||
See <a href="Multi_002ddimensional-Array-Format.html">Multi-dimensional Array Format</a>.
|
||||
</li><li>- FFTW is best at handling sizes of the form
|
||||
2<sup>a</sup> 3<sup>b</sup> 5<sup>c</sup> 7<sup>d</sup>
|
||||
11<sup>e</sup> 13<sup>f</sup>,
|
||||
where <em>e+f</em> is either <em>0</em> or <em>1</em>, and the other exponents
|
||||
are arbitrary. Other sizes are computed by means of a slow,
|
||||
general-purpose algorithm (which nevertheless retains <i>O</i>(<i>n</i> log <i>n</i>)
|
||||
performance even for prime sizes). It is possible to customize FFTW
|
||||
for different array sizes; see <a href="Installation-and-Customization.html">Installation and Customization</a>.
|
||||
Transforms whose sizes are powers of <em>2</em> are especially fast.
|
||||
</li></ul>
|
||||
|
||||
</li><li> <code>in</code> and <code>out</code> point to the input and output arrays of the
|
||||
transform, which may be the same (yielding an in-place transform).
|
||||
<span id="index-in_002dplace-2"></span>
|
||||
These arrays are overwritten during planning, unless
|
||||
<code>FFTW_ESTIMATE</code> is used in the flags. (The arrays need not be
|
||||
initialized, but they must be allocated.)
|
||||
|
||||
<p>If <code>in == out</code>, the transform is <em>in-place</em> and the input
|
||||
array is overwritten. If <code>in != out</code>, the two arrays must
|
||||
not overlap (but FFTW does not check for this condition).
|
||||
</p>
|
||||
</li><li> <span id="index-FFTW_005fFORWARD-2"></span>
|
||||
<span id="index-FFTW_005fBACKWARD-2"></span>
|
||||
<code>sign</code> is the sign of the exponent in the formula that defines the
|
||||
Fourier transform. It can be <em>-1</em> (= <code>FFTW_FORWARD</code>) or
|
||||
<em>+1</em> (= <code>FFTW_BACKWARD</code>).
|
||||
|
||||
</li><li> <span id="index-flags-2"></span>
|
||||
<code>flags</code> is a bitwise OR (‘<samp>|</samp>’) of zero or more planner flags,
|
||||
as defined in <a href="Planner-Flags.html">Planner Flags</a>.
|
||||
|
||||
</li></ul>
|
||||
|
||||
<p>FFTW computes an unnormalized transform: computing a forward followed by
|
||||
a backward transform (or vice versa) will result in the original data
|
||||
multiplied by the size of the transform (the product of the dimensions).
|
||||
<span id="index-normalization-5"></span>
|
||||
For more information, see <a href="What-FFTW-Really-Computes.html">What FFTW Really Computes</a>.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Planner-Flags.html" accesskey="n" rel="next">Planner Flags</a>, Previous: <a href="Basic-Interface.html" accesskey="p" rel="prev">Basic Interface</a>, Up: <a href="Basic-Interface.html" accesskey="u" rel="up">Basic Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
166
fftw-3.3.10/doc/html/Complex-Multi_002dDimensional-DFTs.html
Normal file
@@ -0,0 +1,166 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Complex Multi-Dimensional DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Complex Multi-Dimensional DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Complex Multi-Dimensional DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Tutorial.html" rel="up" title="Tutorial">
|
||||
<link href="One_002dDimensional-DFTs-of-Real-Data.html" rel="next" title="One-Dimensional DFTs of Real Data">
|
||||
<link href="Complex-One_002dDimensional-DFTs.html" rel="prev" title="Complex One-Dimensional DFTs">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Complex-Multi_002dDimensional-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="One_002dDimensional-DFTs-of-Real-Data.html" accesskey="n" rel="next">One-Dimensional DFTs of Real Data</a>, Previous: <a href="Complex-One_002dDimensional-DFTs.html" accesskey="p" rel="prev">Complex One-Dimensional DFTs</a>, Up: <a href="Tutorial.html" accesskey="u" rel="up">Tutorial</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Complex-Multi_002dDimensional-DFTs-1"></span><h3 class="section">2.2 Complex Multi-Dimensional DFTs</h3>
|
||||
|
||||
<p>Multi-dimensional transforms work much the same way as one-dimensional
|
||||
transforms: you allocate arrays of <code>fftw_complex</code> (preferably
|
||||
using <code>fftw_malloc</code>), create an <code>fftw_plan</code>, execute it as
|
||||
many times as you want with <code>fftw_execute(plan)</code>, and clean up
|
||||
with <code>fftw_destroy_plan(plan)</code> (and <code>fftw_free</code>).
|
||||
</p>
|
||||
<p>FFTW provides two routines for creating plans for 2d and 3d transforms,
|
||||
and one routine for creating plans of arbitrary dimensionality.
|
||||
The 2d and 3d routines have the following signature:
|
||||
</p><div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_dft_2d(int n0, int n1,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
fftw_plan fftw_plan_dft_3d(int n0, int n1, int n2,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fdft_005f2d"></span>
|
||||
<span id="index-fftw_005fplan_005fdft_005f3d"></span>
|
||||
|
||||
<p>These routines create plans for <code>n0</code> by <code>n1</code> two-dimensional
|
||||
(2d) transforms and <code>n0</code> by <code>n1</code> by <code>n2</code> 3d transforms,
|
||||
respectively. All of these transforms operate on contiguous arrays in
|
||||
the C-standard <em>row-major</em> order, so that the last dimension has the
|
||||
fastest-varying index in the array. This layout is described further in
|
||||
<a href="Multi_002ddimensional-Array-Format.html">Multi-dimensional Array Format</a>.
|
||||
</p>
|
||||
<p>FFTW can also compute transforms of higher dimensionality. In order to
|
||||
avoid confusion between the various meanings of the the word
|
||||
“dimension”, we use the term <em>rank</em>
|
||||
<span id="index-rank"></span>
|
||||
to denote the number of independent indices in an array.<a id="DOCF2" href="#FOOT2"><sup>2</sup></a> For
|
||||
example, we say that a 2d transform has rank 2, a 3d transform has
|
||||
rank 3, and so on. You can plan transforms of arbitrary rank by
|
||||
means of the following function:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_dft(int rank, const int *n,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fdft"></span>
|
||||
|
||||
<p>Here, <code>n</code> is a pointer to an array <code>n[rank]</code> denoting an
|
||||
<code>n[0]</code> by <code>n[1]</code> by … by <code>n[rank-1]</code> transform.
|
||||
Thus, for example, the call
|
||||
</p><div class="example">
|
||||
<pre class="example">fftw_plan_dft_2d(n0, n1, in, out, sign, flags);
|
||||
</pre></div>
|
||||
<p>is equivalent to the following code fragment:
|
||||
</p><div class="example">
|
||||
<pre class="example">int n[2];
|
||||
n[0] = n0;
|
||||
n[1] = n1;
|
||||
fftw_plan_dft(2, n, in, out, sign, flags);
|
||||
</pre></div>
|
||||
<p><code>fftw_plan_dft</code> is not restricted to 2d and 3d transforms,
|
||||
however, but it can plan transforms of arbitrary rank.
|
||||
</p>
|
||||
<p>You may have noticed that all the planner routines described so far
|
||||
have overlapping functionality. For example, you can plan a 1d or 2d
|
||||
transform by using <code>fftw_plan_dft</code> with a <code>rank</code> of <code>1</code>
|
||||
or <code>2</code>, or even by calling <code>fftw_plan_dft_3d</code> with <code>n0</code>
|
||||
and/or <code>n1</code> equal to <code>1</code> (with no loss in efficiency). This
|
||||
pattern continues, and FFTW’s planning routines in general form a
|
||||
“partial order,” sequences of
|
||||
<span id="index-partial-order"></span>
|
||||
interfaces with strictly increasing generality but correspondingly
|
||||
greater complexity.
|
||||
</p>
|
||||
<p><code>fftw_plan_dft</code> is the most general complex-DFT routine that we
|
||||
describe in this tutorial, but there are also the advanced and guru interfaces,
|
||||
<span id="index-advanced-interface-1"></span>
|
||||
<span id="index-guru-interface-1"></span>
|
||||
which allow one to efficiently combine multiple/strided transforms
|
||||
into a single FFTW plan, transform a subset of a larger
|
||||
multi-dimensional array, and/or to handle more general complex-number
|
||||
formats. For more information, see <a href="FFTW-Reference.html">FFTW Reference</a>.
|
||||
</p>
|
||||
<div class="footnote">
|
||||
<hr>
|
||||
<h4 class="footnotes-heading">Footnotes</h4>
|
||||
|
||||
<h5><a id="FOOT2" href="#DOCF2">(2)</a></h3>
|
||||
<p>The
|
||||
term “rank” is commonly used in the APL, FORTRAN, and Common Lisp
|
||||
traditions, although it is not so common in the C world.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="One_002dDimensional-DFTs-of-Real-Data.html" accesskey="n" rel="next">One-Dimensional DFTs of Real Data</a>, Previous: <a href="Complex-One_002dDimensional-DFTs.html" accesskey="p" rel="prev">Complex One-Dimensional DFTs</a>, Up: <a href="Tutorial.html" accesskey="u" rel="up">Tutorial</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
239
fftw-3.3.10/doc/html/Complex-One_002dDimensional-DFTs.html
Normal file
@@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Complex One-Dimensional DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Complex One-Dimensional DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Complex One-Dimensional DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Tutorial.html" rel="up" title="Tutorial">
|
||||
<link href="Complex-Multi_002dDimensional-DFTs.html" rel="next" title="Complex Multi-Dimensional DFTs">
|
||||
<link href="Tutorial.html" rel="prev" title="Tutorial">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Complex-One_002dDimensional-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Complex-Multi_002dDimensional-DFTs.html" accesskey="n" rel="next">Complex Multi-Dimensional DFTs</a>, Previous: <a href="Tutorial.html" accesskey="p" rel="prev">Tutorial</a>, Up: <a href="Tutorial.html" accesskey="u" rel="up">Tutorial</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Complex-One_002dDimensional-DFTs-1"></span><h3 class="section">2.1 Complex One-Dimensional DFTs</h3>
|
||||
|
||||
<blockquote>
|
||||
<p>Plan: To bother about the best method of accomplishing an accidental result.
|
||||
[Ambrose Bierce, <cite>The Enlarged Devil’s Dictionary</cite>.]
|
||||
<span id="index-Devil"></span>
|
||||
</p></blockquote>
|
||||
|
||||
|
||||
<p>The basic usage of FFTW to compute a one-dimensional DFT of size
|
||||
<code>N</code> is simple, and it typically looks something like this code:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">#include <fftw3.h>
|
||||
...
|
||||
{
|
||||
fftw_complex *in, *out;
|
||||
fftw_plan p;
|
||||
...
|
||||
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); /* <span class="roman">repeat as needed</span> */
|
||||
...
|
||||
fftw_destroy_plan(p);
|
||||
fftw_free(in); fftw_free(out);
|
||||
}
|
||||
</pre></div>
|
||||
|
||||
<p>You must link this code with the <code>fftw3</code> library. On Unix systems,
|
||||
link with <code>-lfftw3 -lm</code>.
|
||||
</p>
|
||||
<p>The example code first allocates the input and output arrays. You can
|
||||
allocate them in any way that you like, but we recommend using
|
||||
<code>fftw_malloc</code>, which behaves like
|
||||
<span id="index-fftw_005fmalloc"></span>
|
||||
<code>malloc</code> except that it properly aligns the array when SIMD
|
||||
instructions (such as SSE and Altivec) are available (see <a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a>). [Alternatively, we provide a convenient wrapper function <code>fftw_alloc_complex(N)</code> which has the same effect.]
|
||||
<span id="index-fftw_005falloc_005fcomplex"></span>
|
||||
<span id="index-SIMD"></span>
|
||||
</p>
|
||||
|
||||
<p>The data is an array of type <code>fftw_complex</code>, which is by default a
|
||||
<code>double[2]</code> composed of the real (<code>in[i][0]</code>) and imaginary
|
||||
(<code>in[i][1]</code>) parts of a complex number.
|
||||
<span id="index-fftw_005fcomplex"></span>
|
||||
</p>
|
||||
<p>The next step is to create a <em>plan</em>, which is an object
|
||||
<span id="index-plan-1"></span>
|
||||
that contains all the data that FFTW needs to compute the FFT.
|
||||
This function creates the plan:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_dft_1d(int n, fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fdft_005f1d"></span>
|
||||
<span id="index-fftw_005fplan"></span>
|
||||
|
||||
<p>The first argument, <code>n</code>, is the size of the transform you are
|
||||
trying to compute. The size <code>n</code> can be any positive integer, but
|
||||
sizes that are products of small factors are transformed most
|
||||
efficiently (although prime sizes still use an <i>O</i>(<i>n</i> log <i>n</i>)
|
||||
algorithm).
|
||||
</p>
|
||||
<p>The next two arguments are pointers to the input and output arrays of
|
||||
the transform. These pointers can be equal, indicating an
|
||||
<em>in-place</em> transform.
|
||||
<span id="index-in_002dplace"></span>
|
||||
</p>
|
||||
|
||||
<p>The fourth argument, <code>sign</code>, can be either <code>FFTW_FORWARD</code>
|
||||
(<code>-1</code>) or <code>FFTW_BACKWARD</code> (<code>+1</code>),
|
||||
<span id="index-FFTW_005fFORWARD"></span>
|
||||
<span id="index-FFTW_005fBACKWARD"></span>
|
||||
and indicates the direction of the transform you are interested in;
|
||||
technically, it is the sign of the exponent in the transform.
|
||||
</p>
|
||||
<p>The <code>flags</code> argument is usually either <code>FFTW_MEASURE</code> or
|
||||
<span id="index-flags"></span>
|
||||
<code>FFTW_ESTIMATE</code>. <code>FFTW_MEASURE</code> instructs FFTW to run
|
||||
<span id="index-FFTW_005fMEASURE"></span>
|
||||
and measure the execution time of several FFTs in order to find the
|
||||
best way to compute the transform of size <code>n</code>. This process takes
|
||||
some time (usually a few seconds), depending on your machine and on
|
||||
the size of the transform. <code>FFTW_ESTIMATE</code>, on the contrary,
|
||||
does not run any computation and just builds a
|
||||
<span id="index-FFTW_005fESTIMATE"></span>
|
||||
reasonable plan that is probably sub-optimal. In short, if your
|
||||
program performs many transforms of the same size and initialization
|
||||
time is not important, use <code>FFTW_MEASURE</code>; otherwise use the
|
||||
estimate.
|
||||
</p>
|
||||
<p><em>You must create the plan before initializing the input</em>, because
|
||||
<code>FFTW_MEASURE</code> overwrites the <code>in</code>/<code>out</code> arrays.
|
||||
(Technically, <code>FFTW_ESTIMATE</code> does not touch your arrays, but you
|
||||
should always create plans first just to be sure.)
|
||||
</p>
|
||||
<p>Once the plan has been created, you can use it as many times as you
|
||||
like for transforms on the specified <code>in</code>/<code>out</code> arrays,
|
||||
computing the actual transforms via <code>fftw_execute(plan)</code>:
|
||||
</p><div class="example">
|
||||
<pre class="example">void fftw_execute(const fftw_plan plan);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fexecute"></span>
|
||||
|
||||
<p>The DFT results are stored in-order in the array <code>out</code>, with the
|
||||
zero-frequency (DC) component in <code>out[0]</code>.
|
||||
<span id="index-frequency"></span>
|
||||
If <code>in != out</code>, the transform is <em>out-of-place</em> and the input
|
||||
array <code>in</code> is not modified. Otherwise, the input array is
|
||||
overwritten with the transform.
|
||||
</p>
|
||||
<span id="index-execute-1"></span>
|
||||
<p>If you want to transform a <em>different</em> array of the same size, you
|
||||
can create a new plan with <code>fftw_plan_dft_1d</code> and FFTW
|
||||
automatically reuses the information from the previous plan, if
|
||||
possible. Alternatively, with the “guru” interface you can apply a
|
||||
given plan to a different array, if you are careful.
|
||||
See <a href="FFTW-Reference.html">FFTW Reference</a>.
|
||||
</p>
|
||||
<p>When you are done with the plan, you deallocate it by calling
|
||||
<code>fftw_destroy_plan(plan)</code>:
|
||||
</p><div class="example">
|
||||
<pre class="example">void fftw_destroy_plan(fftw_plan plan);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fdestroy_005fplan"></span>
|
||||
<p>If you allocate an array with <code>fftw_malloc()</code> you must deallocate
|
||||
it with <code>fftw_free()</code>. Do not use <code>free()</code> or, heaven
|
||||
forbid, <code>delete</code>.
|
||||
<span id="index-fftw_005ffree"></span>
|
||||
</p>
|
||||
<p>FFTW computes an <em>unnormalized</em> DFT. Thus, computing a forward
|
||||
followed by a backward transform (or vice versa) results in the original
|
||||
array scaled by <code>n</code>. For the definition of the DFT, see <a href="What-FFTW-Really-Computes.html">What FFTW Really Computes</a>.
|
||||
<span id="index-DFT-1"></span>
|
||||
<span id="index-normalization"></span>
|
||||
</p>
|
||||
|
||||
<p>If you have a C compiler, such as <code>gcc</code>, that supports the
|
||||
C99 standard, and you <code>#include <complex.h></code> <em>before</em>
|
||||
<code><fftw3.h></code>, then <code>fftw_complex</code> is the native
|
||||
double-precision complex type and you can manipulate it with ordinary
|
||||
arithmetic. Otherwise, FFTW defines its own complex type, which is
|
||||
bit-compatible with the C99 complex type. See <a href="Complex-numbers.html">Complex numbers</a>.
|
||||
(The C++ <code><complex></code> template class may also be usable via a
|
||||
typecast.)
|
||||
<span id="index-C_002b_002b"></span>
|
||||
</p>
|
||||
<p>To use single or long-double precision versions of FFTW, replace the
|
||||
<code>fftw_</code> prefix by <code>fftwf_</code> or <code>fftwl_</code> and link with
|
||||
<code>-lfftw3f</code> or <code>-lfftw3l</code>, but use the <em>same</em>
|
||||
<code><fftw3.h></code> header file.
|
||||
<span id="index-precision"></span>
|
||||
</p>
|
||||
|
||||
<p>Many more flags exist besides <code>FFTW_MEASURE</code> and
|
||||
<code>FFTW_ESTIMATE</code>. For example, use <code>FFTW_PATIENT</code> if you’re
|
||||
willing to wait even longer for a possibly even faster plan (see <a href="FFTW-Reference.html">FFTW Reference</a>).
|
||||
<span id="index-FFTW_005fPATIENT"></span>
|
||||
You can also save plans for future use, as described by <a href="Words-of-Wisdom_002dSaving-Plans.html">Words of Wisdom-Saving Plans</a>.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Complex-Multi_002dDimensional-DFTs.html" accesskey="n" rel="next">Complex Multi-Dimensional DFTs</a>, Previous: <a href="Tutorial.html" accesskey="p" rel="prev">Tutorial</a>, Up: <a href="Tutorial.html" accesskey="u" rel="up">Tutorial</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
114
fftw-3.3.10/doc/html/Complex-numbers.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Complex numbers (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Complex numbers (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Complex numbers (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Data-Types-and-Files.html" rel="up" title="Data Types and Files">
|
||||
<link href="Precision.html" rel="next" title="Precision">
|
||||
<link href="Data-Types-and-Files.html" rel="prev" title="Data Types and Files">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Complex-numbers"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Precision.html" accesskey="n" rel="next">Precision</a>, Previous: <a href="Data-Types-and-Files.html" accesskey="p" rel="prev">Data Types and Files</a>, Up: <a href="Data-Types-and-Files.html" accesskey="u" rel="up">Data Types and Files</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Complex-numbers-1"></span><h4 class="subsection">4.1.1 Complex numbers</h4>
|
||||
|
||||
<p>The default FFTW interface uses <code>double</code> precision for all
|
||||
floating-point numbers, and defines a <code>fftw_complex</code> type to hold
|
||||
complex numbers as:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">typedef double fftw_complex[2];
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fcomplex-1"></span>
|
||||
|
||||
<p>Here, the <code>[0]</code> element holds the real part and the <code>[1]</code>
|
||||
element holds the imaginary part.
|
||||
</p>
|
||||
<p>Alternatively, if you have a C compiler (such as <code>gcc</code>) that
|
||||
supports the C99 revision of the ANSI C standard, you can use C’s new
|
||||
native complex type (which is binary-compatible with the typedef above).
|
||||
In particular, if you <code>#include <complex.h></code> <em>before</em>
|
||||
<code><fftw3.h></code>, then <code>fftw_complex</code> is defined to be the native
|
||||
complex type and you can manipulate it with ordinary arithmetic
|
||||
(e.g. <code>x = y * (3+4*I)</code>, where <code>x</code> and <code>y</code> are
|
||||
<code>fftw_complex</code> and <code>I</code> is the standard symbol for the
|
||||
imaginary unit);
|
||||
<span id="index-C99-1"></span>
|
||||
</p>
|
||||
|
||||
<p>C++ has its own <code>complex<T></code> template class, defined in the
|
||||
standard <code><complex></code> header file. Reportedly, the C++ standards
|
||||
committee has recently agreed to mandate that the storage format used
|
||||
for this type be binary-compatible with the C99 type, i.e. an array
|
||||
<code>T[2]</code> with consecutive real <code>[0]</code> and imaginary <code>[1]</code>
|
||||
parts. (See report
|
||||
<a href="http://www.open-std.org/jtc1/sc22/WG21/docs/papers/2002/n1388.pdf
|
||||
WG21/N1388">http://www.open-std.org/jtc1/sc22/WG21/docs/papers/2002/n1388.pdf
|
||||
WG21/N1388</a>.) Although not part of the official standard as of this
|
||||
writing, the proposal stated that: “This solution has been tested with
|
||||
all current major implementations of the standard library and shown to
|
||||
be working.” To the extent that this is true, if you have a variable
|
||||
<code>complex<double> *x</code>, you can pass it directly to FFTW via
|
||||
<code>reinterpret_cast<fftw_complex*>(x)</code>.
|
||||
<span id="index-C_002b_002b-3"></span>
|
||||
<span id="index-portability-2"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
517
fftw-3.3.10/doc/html/Concept-Index.html
Normal file
@@ -0,0 +1,517 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Concept Index (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Concept Index (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Concept Index (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="#Concept-Index" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="Library-Index.html" rel="next" title="Library Index">
|
||||
<link href="License-and-Copyright.html" rel="prev" title="License and Copyright">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Concept-Index"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Library-Index.html" accesskey="n" rel="next">Library Index</a>, Previous: <a href="License-and-Copyright.html" accesskey="p" rel="prev">License and Copyright</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Concept-Index-1"></span><h2 class="chapter">13 Concept Index</h2>
|
||||
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Concept-Index_cp_symbol-1"><b>6</b></a>
|
||||
|
||||
<br>
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-A"><b>A</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-B"><b>B</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-C"><b>C</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-D"><b>D</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-E"><b>E</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-F"><b>F</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-G"><b>G</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-H"><b>H</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-I"><b>I</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-K"><b>K</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-L"><b>L</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-M"><b>M</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-N"><b>N</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-O"><b>O</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-P"><b>P</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-R"><b>R</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-S"><b>S</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-T"><b>T</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-V"><b>V</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-W"><b>W</b></a>
|
||||
|
||||
</td></tr></table>
|
||||
<table class="index-cp" border="0">
|
||||
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_symbol-1">6</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="64_002dbit-Guru-Interface.html#index-64_002dbit-architecture">64-bit architecture</a>:</td><td> </td><td valign="top"><a href="64_002dbit-Guru-Interface.html">64-bit Guru Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="2d-MPI-example.html#index-64_002dbit-architecture-1">64-bit architecture</a>:</td><td> </td><td valign="top"><a href="2d-MPI-example.html">2d MPI example</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-Fortran-type-reference.html#index-64_002dbit-architecture-2">64-bit architecture</a>:</td><td> </td><td valign="top"><a href="FFTW-Fortran-type-reference.html">FFTW Fortran type reference</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-A">A</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-advanced-interface">advanced interface</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html#index-advanced-interface-1">advanced interface</a>:</td><td> </td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html">Complex Multi-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Row_002dmajor-Format.html#index-advanced-interface-2">advanced interface</a>:</td><td> </td><td valign="top"><a href="Row_002dmajor-Format.html">Row-major Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Advanced-Interface.html#index-advanced-interface-3">advanced interface</a>:</td><td> </td><td valign="top"><a href="Advanced-Interface.html">Advanced Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Basic-and-advanced-distribution-interfaces.html#index-advanced-interface-4">advanced interface</a>:</td><td> </td><td valign="top"><a href="Basic-and-advanced-distribution-interfaces.html">Basic and advanced distribution interfaces</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Data-Distribution-Functions.html#index-advanced-interface-5">advanced interface</a>:</td><td> </td><td valign="top"><a href="MPI-Data-Distribution-Functions.html">MPI Data Distribution Functions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-advanced-interface-6">advanced interface</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-algorithm">algorithm</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Memory-Allocation.html#index-alignment">alignment</a>:</td><td> </td><td valign="top"><a href="Memory-Allocation.html">Memory Allocation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Planner-Flags.html#index-alignment-1">alignment</a>:</td><td> </td><td valign="top"><a href="Planner-Flags.html">Planner Flags</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="New_002darray-Execute-Functions.html#index-alignment-2">alignment</a>:</td><td> </td><td valign="top"><a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Using-MPI-Plans.html#index-alignment-3">alignment</a>:</td><td> </td><td valign="top"><a href="Using-MPI-Plans.html">Using MPI Plans</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Overview-of-Fortran-interface.html#index-alignment-4">alignment</a>:</td><td> </td><td valign="top"><a href="Overview-of-Fortran-interface.html">Overview of Fortran interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Allocating-aligned-memory-in-Fortran.html#index-alignment-5">alignment</a>:</td><td> </td><td valign="top"><a href="Allocating-aligned-memory-in-Fortran.html">Allocating aligned memory in Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-AltiVec">AltiVec</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-AVX">AVX</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-AVX2">AVX2</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-AVX512">AVX512</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-B">B</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-basic-interface">basic interface</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Tutorial.html#index-basic-interface-1">basic interface</a>:</td><td> </td><td valign="top"><a href="Tutorial.html">Tutorial</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Basic-Interface.html#index-basic-interface-2">basic interface</a>:</td><td> </td><td valign="top"><a href="Basic-Interface.html">Basic Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Data-Distribution.html#index-block-distribution">block distribution</a>:</td><td> </td><td valign="top"><a href="MPI-Data-Distribution.html">MPI Data Distribution</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Basic-and-advanced-distribution-interfaces.html#index-block-distribution-1">block distribution</a>:</td><td> </td><td valign="top"><a href="Basic-and-advanced-distribution-interfaces.html">Basic and advanced distribution interfaces</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Performance-Tips.html#index-block-distribution-2">block distribution</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Performance-Tips.html">FFTW MPI Performance Tips</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-C">C</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fixed_002dsize-Arrays-in-C.html#index-C-multi_002ddimensional-arrays">C multi-dimensional arrays</a>:</td><td> </td><td valign="top"><a href="Fixed_002dsize-Arrays-in-C.html">Fixed-size Arrays in C</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-C_002b_002b">C++</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-C_002b_002b-1">C++</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Dynamic-Arrays-in-C.html#index-C_002b_002b-2">C++</a>:</td><td> </td><td valign="top"><a href="Dynamic-Arrays-in-C.html">Dynamic Arrays in C</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-numbers.html#index-C_002b_002b-3">C++</a>:</td><td> </td><td valign="top"><a href="Complex-numbers.html">Complex numbers</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Memory-Allocation.html#index-C_002b_002b-4">C++</a>:</td><td> </td><td valign="top"><a href="Memory-Allocation.html">Memory Allocation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-c2r">c2r</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Planner-Flags.html#index-c2r-1">c2r</a>:</td><td> </td><td valign="top"><a href="Planner-Flags.html">Planner Flags</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFTs.html#index-c2r-2">c2r</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFTs.html">Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Dynamic-Arrays-in-C.html#index-C99">C99</a>:</td><td> </td><td valign="top"><a href="Dynamic-Arrays-in-C.html">Dynamic Arrays in C</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-numbers.html#index-C99-1">C99</a>:</td><td> </td><td valign="top"><a href="Complex-numbers.html">Complex numbers</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Precision.html#index-C99-2">C99</a>:</td><td> </td><td valign="top"><a href="Precision.html">Precision</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Generating-your-own-code.html#index-Caml">Caml</a>:</td><td> </td><td valign="top"><a href="Generating-your-own-code.html">Generating your own code</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Acknowledgments.html#index-Caml-1">Caml</a>:</td><td> </td><td valign="top"><a href="Acknowledgments.html">Acknowledgments</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-code-generator">code generator</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Generating-your-own-code.html#index-code-generator-1">code generator</a>:</td><td> </td><td valign="top"><a href="Generating-your-own-code.html">Generating your own code</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-codelet">codelet</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Customization.html#index-codelet-1">codelet</a>:</td><td> </td><td valign="top"><a href="Installation-and-Customization.html">Installation and Customization</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Generating-your-own-code.html#index-codelet-2">codelet</a>:</td><td> </td><td valign="top"><a href="Generating-your-own-code.html">Generating your own code</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Acknowledgments.html#index-codelet-3">codelet</a>:</td><td> </td><td valign="top"><a href="Acknowledgments.html">Acknowledgments</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="2d-MPI-example.html#index-collective-function">collective function</a>:</td><td> </td><td valign="top"><a href="2d-MPI-example.html">2d MPI example</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Wisdom.html#index-collective-function-1">collective function</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Wisdom.html">FFTW MPI Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Avoiding-MPI-Deadlocks.html#index-collective-function-2">collective function</a>:</td><td> </td><td valign="top"><a href="Avoiding-MPI-Deadlocks.html">Avoiding MPI Deadlocks</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Using-MPI-Plans.html#index-collective-function-3">collective function</a>:</td><td> </td><td valign="top"><a href="Using-MPI-Plans.html">Using MPI Plans</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-collective-function-4">collective function</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Column_002dmajor-Format.html#index-column_002dmajor">column-major</a>:</td><td> </td><td valign="top"><a href="Column_002dmajor-Format.html">Column-major Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Reversing-array-dimensions.html#index-column_002dmajor-1">column-major</a>:</td><td> </td><td valign="top"><a href="Reversing-array-dimensions.html">Reversing array dimensions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fortran_002dinterface-routines.html#index-column_002dmajor-2">column-major</a>:</td><td> </td><td valign="top"><a href="Fortran_002dinterface-routines.html">Fortran-interface routines</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fortran-Examples.html#index-column_002dmajor-3">column-major</a>:</td><td> </td><td valign="top"><a href="Fortran-Examples.html">Fortran Examples</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-compiler">compiler</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Customization.html#index-compiler-1">compiler</a>:</td><td> </td><td valign="top"><a href="Installation-and-Customization.html">Installation and Customization</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-compiler-2">compiler</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Cycle-Counters.html#index-compiler-3">compiler</a>:</td><td> </td><td valign="top"><a href="Cycle-Counters.html">Cycle Counters</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-compiler-flags">compiler flags</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-compiler-flags-1">compiler flags</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom-Utilities.html#index-configuration-routines">configuration routines</a>:</td><td> </td><td valign="top"><a href="Wisdom-Utilities.html">Wisdom Utilities</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Supported-Hardware_002fSoftware.html#index-configure"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="Installation-and-Supported-Hardware_002fSoftware.html">Installation and Supported Hardware/Software</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Installation.html#index-configure-1"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Installation.html">FFTW MPI Installation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-configure-2"><code>configure</code></a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Customization.html#index-cycle-counter">cycle counter</a>:</td><td> </td><td valign="top"><a href="Installation-and-Customization.html">Installation and Customization</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Cycle-Counters.html#index-cycle-counter-1">cycle counter</a>:</td><td> </td><td valign="top"><a href="Cycle-Counters.html">Cycle Counters</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-D">D</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html#index-data-distribution">data distribution</a>:</td><td> </td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html">Distributed-memory FFTW with MPI</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="2d-MPI-example.html#index-data-distribution-1">data distribution</a>:</td><td> </td><td valign="top"><a href="2d-MPI-example.html">2d MPI example</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Data-Distribution.html#index-data-distribution-2">data distribution</a>:</td><td> </td><td valign="top"><a href="MPI-Data-Distribution.html">MPI Data Distribution</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html#index-data-distribution-3">data distribution</a>:</td><td> </td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html">Multi-dimensional MPI DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Basic-distributed_002dtranspose-interface.html#index-data-distribution-4">data distribution</a>:</td><td> </td><td valign="top"><a href="Basic-distributed_002dtranspose-interface.html">Basic distributed-transpose interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Data-Distribution-Functions.html#index-data-distribution-5">data distribution</a>:</td><td> </td><td valign="top"><a href="MPI-Data-Distribution-Functions.html">MPI Data Distribution Functions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-DCT">DCT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-DCT-1">DCT</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html#index-DCT-2">DCT</a>:</td><td> </td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html">1d Real-even DFTs (DCTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Avoiding-MPI-Deadlocks.html#index-deadlock">deadlock</a>:</td><td> </td><td valign="top"><a href="Avoiding-MPI-Deadlocks.html">Avoiding MPI Deadlocks</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-Devil">Devil</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-DFT">DFT</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-DFT-1">DFT</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#index-DFT-2">DFT</a>:</td><td> </td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html">The 1d Discrete Fourier Transform (DFT)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Discrete-Hartley-Transform.html#index-DHT">DHT</a>:</td><td> </td><td valign="top"><a href="The-Discrete-Hartley-Transform.html">The Discrete Hartley Transform</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html#index-DHT-1">DHT</a>:</td><td> </td><td valign="top"><a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html">1d Discrete Hartley Transforms (DHTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-discrete-cosine-transform">discrete cosine transform</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-discrete-cosine-transform-1">discrete cosine transform</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html#index-discrete-cosine-transform-2">discrete cosine transform</a>:</td><td> </td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html">1d Real-even DFTs (DCTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-discrete-Fourier-transform">discrete Fourier transform</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#index-discrete-Fourier-transform-1">discrete Fourier transform</a>:</td><td> </td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html">The 1d Discrete Fourier Transform (DFT)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Discrete-Hartley-Transform.html#index-discrete-Hartley-transform">discrete Hartley transform</a>:</td><td> </td><td valign="top"><a href="The-Discrete-Hartley-Transform.html">The Discrete Hartley Transform</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-discrete-Hartley-transform-1">discrete Hartley transform</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html#index-discrete-Hartley-transform-2">discrete Hartley transform</a>:</td><td> </td><td valign="top"><a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html">1d Discrete Hartley Transforms (DHTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-discrete-sine-transform">discrete sine transform</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-discrete-sine-transform-1">discrete sine transform</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html#index-discrete-sine-transform-2">discrete sine transform</a>:</td><td> </td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html">1d Real-odd DFTs (DSTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Advanced-Complex-DFTs.html#index-dist">dist</a>:</td><td> </td><td valign="top"><a href="Advanced-Complex-DFTs.html">Advanced Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-vector-and-transform-sizes.html#index-dist-1">dist</a>:</td><td> </td><td valign="top"><a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-DST">DST</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-DST-1">DST</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html#index-DST-2">DST</a>:</td><td> </td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html">1d Real-odd DFTs (DSTs)</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-E">E</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Caveats-in-Using-Wisdom.html#index-Ecclesiastes">Ecclesiastes</a>:</td><td> </td><td valign="top"><a href="Caveats-in-Using-Wisdom.html">Caveats in Using Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-execute">execute</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-execute-1">execute</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="New_002darray-Execute-Functions.html#index-execute-2">execute</a>:</td><td> </td><td valign="top"><a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-F">F</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-FFTW">FFTW</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Caveats-in-Using-Wisdom.html#index-fftw_002dwisdom-utility">fftw-wisdom utility</a>:</td><td> </td><td valign="top"><a href="Caveats-in-Using-Wisdom.html">Caveats in Using Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom-Utilities.html#index-fftw_002dwisdom-utility-1">fftw-wisdom utility</a>:</td><td> </td><td valign="top"><a href="Wisdom-Utilities.html">Wisdom Utilities</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom-Utilities.html#index-fftw_002dwisdom_002dto_002dconf-utility">fftw-wisdom-to-conf utility</a>:</td><td> </td><td valign="top"><a href="Wisdom-Utilities.html">Wisdom Utilities</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-flags">flags</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-flags-1">flags</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-DFTs.html#index-flags-2">flags</a>:</td><td> </td><td valign="top"><a href="Complex-DFTs.html">Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFTs.html#index-flags-3">flags</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFTs.html">Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html#index-flags-4">flags</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html">Real-to-Real Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Complex-DFTs.html#index-flags-5">flags</a>:</td><td> </td><td valign="top"><a href="Guru-Complex-DFTs.html">Guru Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Real_002ddata-DFTs.html#index-flags-6">flags</a>:</td><td> </td><td valign="top"><a href="Guru-Real_002ddata-DFTs.html">Guru Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Real_002dto_002dreal-Transforms.html#index-flags-7">flags</a>:</td><td> </td><td valign="top"><a href="Guru-Real_002dto_002dreal-Transforms.html">Guru Real-to-real Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Overview-of-Fortran-interface.html#index-flags-8">flags</a>:</td><td> </td><td valign="top"><a href="Overview-of-Fortran-interface.html">Overview of Fortran interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-Constants-in-Fortran.html#index-flags-9">flags</a>:</td><td> </td><td valign="top"><a href="FFTW-Constants-in-Fortran.html">FFTW Constants in Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Column_002dmajor-Format.html#index-Fortran-interface">Fortran interface</a>:</td><td> </td><td valign="top"><a href="Column_002dmajor-Format.html">Column-major Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html#index-Fortran-interface-1">Fortran interface</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html">FFTW MPI Fortran Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Calling-FFTW-from-Modern-Fortran.html#index-Fortran-interface-2">Fortran interface</a>:</td><td> </td><td valign="top"><a href="Calling-FFTW-from-Modern-Fortran.html">Calling FFTW from Modern Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Calling-FFTW-from-Legacy-Fortran.html#index-Fortran-interface-3">Fortran interface</a>:</td><td> </td><td valign="top"><a href="Calling-FFTW-from-Legacy-Fortran.html">Calling FFTW from Legacy Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-Fortran_002dcallable-wrappers">Fortran-callable wrappers</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-frequency">frequency</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#index-frequency-1">frequency</a>:</td><td> </td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html">The 1d Discrete Fourier Transform (DFT)</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-G">G</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-g77"><code>g77</code></a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-guru-interface">guru interface</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html#index-guru-interface-1">guru interface</a>:</td><td> </td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html">Complex Multi-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Interface.html#index-guru-interface-2">guru interface</a>:</td><td> </td><td valign="top"><a href="Guru-Interface.html">Guru Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-Fortran-type-reference.html#index-guru-interface-3">guru interface</a>:</td><td> </td><td valign="top"><a href="FFTW-Fortran-type-reference.html">FFTW Fortran type reference</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fortran_002dinterface-routines.html#index-guru-interface-4">guru interface</a>:</td><td> </td><td valign="top"><a href="Fortran_002dinterface-routines.html">Fortran-interface routines</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-H">H</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-halfcomplex-format">halfcomplex format</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html#index-halfcomplex-format-1">halfcomplex format</a>:</td><td> </td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html">The Halfcomplex-format DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html#index-halfcomplex-format-2">halfcomplex format</a>:</td><td> </td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html">The 1d Real-data DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html#index-hc2r">hc2r</a>:</td><td> </td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html">The Halfcomplex-format DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Planner-Flags.html#index-hc2r-1">hc2r</a>:</td><td> </td><td valign="top"><a href="Planner-Flags.html">Planner Flags</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="2d-MPI-example.html#index-HDF5">HDF5</a>:</td><td> </td><td valign="top"><a href="2d-MPI-example.html">2d MPI example</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-Hermitian">Hermitian</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html#index-Hermitian-1">Hermitian</a>:</td><td> </td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html">The 1d Real-data DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-vector-and-transform-sizes.html#index-howmany-loop">howmany loop</a>:</td><td> </td><td valign="top"><a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Advanced-Complex-DFTs.html#index-howmany-parameter">howmany parameter</a>:</td><td> </td><td valign="top"><a href="Advanced-Complex-DFTs.html">Advanced Complex DFTs</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-I">I</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-IDCT">IDCT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-IDCT-1">IDCT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-IDCT-2">IDCT</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html#index-IDCT-3">IDCT</a>:</td><td> </td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html">1d Real-even DFTs (DCTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-in_002dplace">in-place</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-in_002dplace-1">in-place</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-DFTs.html#index-in_002dplace-2">in-place</a>:</td><td> </td><td valign="top"><a href="Complex-DFTs.html">Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFTs.html#index-in_002dplace-3">in-place</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFTs.html">Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html#index-in_002dplace-4">in-place</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html">Real-data DFT Array Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html#index-in_002dplace-5">in-place</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html">Real-to-Real Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Real_002ddata-DFTs.html#index-in_002dplace-6">in-place</a>:</td><td> </td><td valign="top"><a href="Guru-Real_002ddata-DFTs.html">Guru Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Real_002ddata-DFTs.html#index-in_002dplace-7">in-place</a>:</td><td> </td><td valign="top"><a href="Guru-Real_002ddata-DFTs.html">Guru Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="An-improved-replacement-for-MPI_005fAlltoall.html#index-in_002dplace-8">in-place</a>:</td><td> </td><td valign="top"><a href="An-improved-replacement-for-MPI_005fAlltoall.html">An improved replacement for MPI_Alltoall</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Reversing-array-dimensions.html#index-in_002dplace-9">in-place</a>:</td><td> </td><td valign="top"><a href="Reversing-array-dimensions.html">Reversing array dimensions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-Fortran-type-reference.html#index-in_002dplace-10">in-place</a>:</td><td> </td><td valign="top"><a href="FFTW-Fortran-type-reference.html">FFTW Fortran type reference</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Customization.html#index-installation">installation</a>:</td><td> </td><td valign="top"><a href="Installation-and-Customization.html">Installation and Customization</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Interleaved-and-split-arrays.html#index-interleaved-format">interleaved format</a>:</td><td> </td><td valign="top"><a href="Interleaved-and-split-arrays.html">Interleaved and split arrays</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html#index-iso_005fc_005fbinding">iso_c_binding</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html">FFTW MPI Fortran Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Overview-of-Fortran-interface.html#index-iso_005fc_005fbinding-1">iso_c_binding</a>:</td><td> </td><td valign="top"><a href="Overview-of-Fortran-interface.html">Overview of Fortran interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Extended-and-quadruple-precision-in-Fortran.html#index-iso_005fc_005fbinding-2">iso_c_binding</a>:</td><td> </td><td valign="top"><a href="Extended-and-quadruple-precision-in-Fortran.html">Extended and quadruple precision in Fortran</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-K">K</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="More-DFTs-of-Real-Data.html#index-kind-_0028r2r_0029">kind (r2r)</a>:</td><td> </td><td valign="top"><a href="More-DFTs-of-Real-Data.html">More DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-kind-_0028r2r_0029-1">kind (r2r)</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-L">L</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html#index-linking-on-Unix">linking on Unix</a>:</td><td> </td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html">Usage of Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Linking-and-Initializing-MPI-FFTW.html#index-linking-on-Unix-1">linking on Unix</a>:</td><td> </td><td valign="top"><a href="Linking-and-Initializing-MPI-FFTW.html">Linking and Initializing MPI FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Acknowledgments.html#index-LISP">LISP</a>:</td><td> </td><td valign="top"><a href="Acknowledgments.html">Acknowledgments</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Load-balancing.html#index-load-balancing">load balancing</a>:</td><td> </td><td valign="top"><a href="Load-balancing.html">Load balancing</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Performance-Tips.html#index-load-balancing-1">load balancing</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Performance-Tips.html">FFTW MPI Performance Tips</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-M">M</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Generating-your-own-code.html#index-monadic-programming">monadic programming</a>:</td><td> </td><td valign="top"><a href="Generating-your-own-code.html">Generating your own code</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html#index-MPI">MPI</a>:</td><td> </td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html">Distributed-memory FFTW with MPI</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-MPI-1">MPI</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html#index-MPI-communicator">MPI communicator</a>:</td><td> </td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html">Distributed-memory FFTW with MPI</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Using-MPI-Plans.html#index-MPI-communicator-1">MPI communicator</a>:</td><td> </td><td valign="top"><a href="Using-MPI-Plans.html">Using MPI Plans</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-MPI-communicator-2">MPI communicator</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html#index-MPI-communicator-3">MPI communicator</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html">FFTW MPI Fortran Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="2d-MPI-example.html#index-MPI-I_002fO">MPI I/O</a>:</td><td> </td><td valign="top"><a href="2d-MPI-example.html">2d MPI example</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Wisdom.html#index-MPI-I_002fO-1">MPI I/O</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Wisdom.html">FFTW MPI Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Installation.html#index-mpicc"><code>mpicc</code></a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Installation.html">FFTW MPI Installation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Linking-and-Initializing-MPI-FFTW.html#index-mpicc-1"><code>mpicc</code></a>:</td><td> </td><td valign="top"><a href="Linking-and-Initializing-MPI-FFTW.html">Linking and Initializing MPI FFTW</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-N">N</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="New_002darray-Execute-Functions.html#index-new_002darray-execution">new-array execution</a>:</td><td> </td><td valign="top"><a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Using-MPI-Plans.html#index-new_002darray-execution-1">new-array execution</a>:</td><td> </td><td valign="top"><a href="Using-MPI-Plans.html">Using MPI Plans</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-new_002darray-execution-2">new-array execution</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html#index-new_002darray-execution-3">new-array execution</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Fortran-Interface.html">FFTW MPI Fortran Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-normalization">normalization</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002dDimensional-DFTs-of-Real-Data.html#index-normalization-1">normalization</a>:</td><td> </td><td valign="top"><a href="Multi_002dDimensional-DFTs-of-Real-Data.html">Multi-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html#index-normalization-2">normalization</a>:</td><td> </td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html">The Halfcomplex-format DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-normalization-3">normalization</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Discrete-Hartley-Transform.html#index-normalization-4">normalization</a>:</td><td> </td><td valign="top"><a href="The-Discrete-Hartley-Transform.html">The Discrete Hartley Transform</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-DFTs.html#index-normalization-5">normalization</a>:</td><td> </td><td valign="top"><a href="Complex-DFTs.html">Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFTs.html#index-normalization-6">normalization</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFTs.html">Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html#index-normalization-7">normalization</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#index-normalization-8">normalization</a>:</td><td> </td><td valign="top"><a href="The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html">The 1d Discrete Fourier Transform (DFT)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html#index-normalization-9">normalization</a>:</td><td> </td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html">The 1d Real-data DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html#index-normalization-10">normalization</a>:</td><td> </td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html">1d Real-even DFTs (DCTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html#index-normalization-11">normalization</a>:</td><td> </td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html">1d Real-odd DFTs (DSTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html#index-normalization-12">normalization</a>:</td><td> </td><td valign="top"><a href="1d-Discrete-Hartley-Transforms-_0028DHTs_0029.html">1d Discrete Hartley Transforms (DHTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="How-Many-Threads-to-Use_003f.html#index-number-of-threads">number of threads</a>:</td><td> </td><td valign="top"><a href="How-Many-Threads-to-Use_003f.html">How Many Threads to Use?</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-O">O</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Supported-Hardware_002fSoftware.html#index-OpenMP">OpenMP</a>:</td><td> </td><td valign="top"><a href="Installation-and-Supported-Hardware_002fSoftware.html">Installation and Supported Hardware/Software</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html#index-OpenMP-1">OpenMP</a>:</td><td> </td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html">Usage of Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html#index-OpenMP-2">OpenMP</a>:</td><td> </td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html">Usage of Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Thread-safety.html#index-OpenMP-3">OpenMP</a>:</td><td> </td><td valign="top"><a href="Thread-safety.html">Thread safety</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Planner-Flags.html#index-out_002dof_002dplace">out-of-place</a>:</td><td> </td><td valign="top"><a href="Planner-Flags.html">Planner Flags</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html#index-out_002dof_002dplace-1">out-of-place</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html">Real-data DFT Array Format</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-P">P</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-padding">padding</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002dDimensional-DFTs-of-Real-Data.html#index-padding-1">padding</a>:</td><td> </td><td valign="top"><a href="Multi_002dDimensional-DFTs-of-Real-Data.html">Multi-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFTs.html#index-padding-2">padding</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFTs.html">Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html#index-padding-3">padding</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html">Real-data DFT Array Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html#index-padding-4">padding</a>:</td><td> </td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html">Multi-dimensional MPI DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Reversing-array-dimensions.html#index-padding-5">padding</a>:</td><td> </td><td valign="top"><a href="Reversing-array-dimensions.html">Reversing array dimensions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002dthreaded-FFTW.html#index-parallel-transform">parallel transform</a>:</td><td> </td><td valign="top"><a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html#index-parallel-transform-1">parallel transform</a>:</td><td> </td><td valign="top"><a href="Distributed_002dmemory-FFTW-with-MPI.html">Distributed-memory FFTW with MPI</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html#index-partial-order">partial order</a>:</td><td> </td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html">Complex Multi-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-plan">plan</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-plan-1">plan</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Introduction.html#index-planner">planner</a>:</td><td> </td><td valign="top"><a href="Introduction.html">Introduction</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-portability">portability</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Caveats-in-Using-Wisdom.html#index-portability-1">portability</a>:</td><td> </td><td valign="top"><a href="Caveats-in-Using-Wisdom.html">Caveats in Using Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-numbers.html#index-portability-2">portability</a>:</td><td> </td><td valign="top"><a href="Complex-numbers.html">Complex numbers</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Supported-Hardware_002fSoftware.html#index-portability-3">portability</a>:</td><td> </td><td valign="top"><a href="Installation-and-Supported-Hardware_002fSoftware.html">Installation and Supported Hardware/Software</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Calling-FFTW-from-Modern-Fortran.html#index-portability-4">portability</a>:</td><td> </td><td valign="top"><a href="Calling-FFTW-from-Modern-Fortran.html">Calling FFTW from Modern Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-Fortran-type-reference.html#index-portability-5">portability</a>:</td><td> </td><td valign="top"><a href="FFTW-Fortran-type-reference.html">FFTW Fortran type reference</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fortran_002dinterface-routines.html#index-portability-6">portability</a>:</td><td> </td><td valign="top"><a href="Fortran_002dinterface-routines.html">Fortran-interface routines</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fortran_002dinterface-routines.html#index-portability-7">portability</a>:</td><td> </td><td valign="top"><a href="Fortran_002dinterface-routines.html">Fortran-interface routines</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom-of-Fortran_003f.html#index-portability-8">portability</a>:</td><td> </td><td valign="top"><a href="Wisdom-of-Fortran_003f.html">Wisdom of Fortran?</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-and-Customization.html#index-portability-9">portability</a>:</td><td> </td><td valign="top"><a href="Installation-and-Customization.html">Installation and Customization</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-precision">precision</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-precision-1">precision</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-precision-2">precision</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Precision.html#index-precision-3">precision</a>:</td><td> </td><td valign="top"><a href="Precision.html">Precision</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Memory-Allocation.html#index-precision-4">precision</a>:</td><td> </td><td valign="top"><a href="Memory-Allocation.html">Memory Allocation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Linking-and-Initializing-MPI-FFTW.html#index-precision-5">precision</a>:</td><td> </td><td valign="top"><a href="Linking-and-Initializing-MPI-FFTW.html">Linking and Initializing MPI FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Files-and-Data-Types.html#index-precision-6">precision</a>:</td><td> </td><td valign="top"><a href="MPI-Files-and-Data-Types.html">MPI Files and Data Types</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Extended-and-quadruple-precision-in-Fortran.html#index-precision-7">precision</a>:</td><td> </td><td valign="top"><a href="Extended-and-quadruple-precision-in-Fortran.html">Extended and quadruple precision in Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-Fortran-type-reference.html#index-precision-8">precision</a>:</td><td> </td><td valign="top"><a href="FFTW-Fortran-type-reference.html">FFTW Fortran type reference</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-precision-9">precision</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-precision-10">precision</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-precision-11">precision</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-R">R</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html#index-r2c">r2c</a>:</td><td> </td><td valign="top"><a href="One_002dDimensional-DFTs-of-Real-Data.html">One-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html#index-r2c-1">r2c</a>:</td><td> </td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html">The Halfcomplex-format DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFTs.html#index-r2c-2">r2c</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFTs.html">Real-data DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002ddimensional-Transforms.html#index-r2c-3">r2c</a>:</td><td> </td><td valign="top"><a href="Multi_002ddimensional-Transforms.html">Multi-dimensional Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-r2c-4">r2c</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002dDimensional-DFTs-of-Real-Data.html#index-r2c_002fc2r-multi_002ddimensional-array-format">r2c/c2r multi-dimensional array format</a>:</td><td> </td><td valign="top"><a href="Multi_002dDimensional-DFTs-of-Real-Data.html">Multi-Dimensional DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html#index-r2c_002fc2r-multi_002ddimensional-array-format-1">r2c/c2r multi-dimensional array format</a>:</td><td> </td><td valign="top"><a href="Real_002ddata-DFT-Array-Format.html">Real-data DFT Array Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Reversing-array-dimensions.html#index-r2c_002fc2r-multi_002ddimensional-array-format-2">r2c/c2r multi-dimensional array format</a>:</td><td> </td><td valign="top"><a href="Reversing-array-dimensions.html">Reversing array dimensions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Fortran-Examples.html#index-r2c_002fc2r-multi_002ddimensional-array-format-3">r2c/c2r multi-dimensional array format</a>:</td><td> </td><td valign="top"><a href="Fortran-Examples.html">Fortran Examples</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html#index-r2hc">r2hc</a>:</td><td> </td><td valign="top"><a href="The-Halfcomplex_002dformat-DFT.html">The Halfcomplex-format DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="More-DFTs-of-Real-Data.html#index-r2r">r2r</a>:</td><td> </td><td valign="top"><a href="More-DFTs-of-Real-Data.html">More DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html#index-r2r-1">r2r</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html">Real-to-Real Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html#index-r2r-2">r2r</a>:</td><td> </td><td valign="top"><a href="The-1d-Real_002ddata-DFT.html">The 1d Real-data DFT</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html#index-r2r-3">r2r</a>:</td><td> </td><td valign="top"><a href="Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html">Other Multi-dimensional Real-data MPI Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-r2r-4">r2r</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html#index-rank">rank</a>:</td><td> </td><td valign="top"><a href="Complex-Multi_002dDimensional-DFTs.html">Complex Multi-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-real_002deven-DFT">real-even DFT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html#index-real_002deven-DFT-1">real-even DFT</a>:</td><td> </td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html">1d Real-even DFTs (DCTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-real_002dodd-DFT">real-odd DFT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html#index-real_002dodd-DFT-1">real-odd DFT</a>:</td><td> </td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html">1d Real-odd DFTs (DSTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-REDFT">REDFT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html#index-REDFT-1">REDFT</a>:</td><td> </td><td valign="top"><a href="1d-Real_002deven-DFTs-_0028DCTs_0029.html">1d Real-even DFTs (DCTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Generating-your-own-code.html#index-REDFT-2">REDFT</a>:</td><td> </td><td valign="top"><a href="Generating-your-own-code.html">Generating your own code</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#index-RODFT">RODFT</a>:</td><td> </td><td valign="top"><a href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html">Real even/odd DFTs (cosine/sine transforms)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html#index-RODFT-1">RODFT</a>:</td><td> </td><td valign="top"><a href="1d-Real_002dodd-DFTs-_0028DSTs_0029.html">1d Real-odd DFTs (DSTs)</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Row_002dmajor-Format.html#index-row_002dmajor">row-major</a>:</td><td> </td><td valign="top"><a href="Row_002dmajor-Format.html">Row-major Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-DFTs.html#index-row_002dmajor-1">row-major</a>:</td><td> </td><td valign="top"><a href="Complex-DFTs.html">Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html#index-row_002dmajor-2">row-major</a>:</td><td> </td><td valign="top"><a href="Real_002dto_002dReal-Transforms.html">Real-to-Real Transforms</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-vector-and-transform-sizes.html#index-row_002dmajor-3">row-major</a>:</td><td> </td><td valign="top"><a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Basic-and-advanced-distribution-interfaces.html#index-row_002dmajor-4">row-major</a>:</td><td> </td><td valign="top"><a href="Basic-and-advanced-distribution-interfaces.html">Basic and advanced distribution interfaces</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html#index-row_002dmajor-5">row-major</a>:</td><td> </td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html">Multi-dimensional MPI DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Reversing-array-dimensions.html#index-row_002dmajor-6">row-major</a>:</td><td> </td><td valign="top"><a href="Reversing-array-dimensions.html">Reversing array dimensions</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-S">S</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Words-of-Wisdom_002dSaving-Plans.html#index-saving-plans-to-disk">saving plans to disk</a>:</td><td> </td><td valign="top"><a href="Words-of-Wisdom_002dSaving-Plans.html">Words of Wisdom-Saving Plans</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom.html#index-saving-plans-to-disk-1">saving plans to disk</a>:</td><td> </td><td valign="top"><a href="Wisdom.html">Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Wisdom.html#index-saving-plans-to-disk-2">saving plans to disk</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Wisdom.html">FFTW MPI Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Accessing-the-wisdom-API-from-Fortran.html#index-saving-plans-to-disk-3">saving plans to disk</a>:</td><td> </td><td valign="top"><a href="Accessing-the-wisdom-API-from-Fortran.html">Accessing the wisdom API from Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002dthreaded-FFTW.html#index-shared_002dmemory">shared-memory</a>:</td><td> </td><td valign="top"><a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html#index-SIMD">SIMD</a>:</td><td> </td><td valign="top"><a href="Complex-One_002dDimensional-DFTs.html">Complex One-Dimensional DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-SIMD-1">SIMD</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Overview-of-Fortran-interface.html#index-SIMD-2">SIMD</a>:</td><td> </td><td valign="top"><a href="Overview-of-Fortran-interface.html">Overview of Fortran interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Interleaved-and-split-arrays.html#index-split-format">split format</a>:</td><td> </td><td valign="top"><a href="Interleaved-and-split-arrays.html">Interleaved and split arrays</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-SSE">SSE</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-SSE2">SSE2</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Row_002dmajor-Format.html#index-stride">stride</a>:</td><td> </td><td valign="top"><a href="Row_002dmajor-Format.html">Row-major Format</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Advanced-Complex-DFTs.html#index-stride-1">stride</a>:</td><td> </td><td valign="top"><a href="Advanced-Complex-DFTs.html">Advanced Complex DFTs</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-vector-and-transform-sizes.html#index-stride-2">stride</a>:</td><td> </td><td valign="top"><a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-stride-3">stride</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-T">T</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html#index-thread-safety">thread safety</a>:</td><td> </td><td valign="top"><a href="Usage-of-Multi_002dthreaded-FFTW.html">Usage of Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Thread-safety.html#index-thread-safety-1">thread safety</a>:</td><td> </td><td valign="top"><a href="Thread-safety.html">Thread safety</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Combining-MPI-and-Threads.html#index-thread-safety-2">thread safety</a>:</td><td> </td><td valign="top"><a href="Combining-MPI-and-Threads.html">Combining MPI and Threads</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002dthreaded-FFTW.html#index-threads">threads</a>:</td><td> </td><td valign="top"><a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Thread-safety.html#index-threads-1">threads</a>:</td><td> </td><td valign="top"><a href="Thread-safety.html">Thread safety</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Combining-MPI-and-Threads.html#index-threads-2">threads</a>:</td><td> </td><td valign="top"><a href="Combining-MPI-and-Threads.html">Combining MPI and Threads</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Installation-on-Unix.html#index-threads-3">threads</a>:</td><td> </td><td valign="top"><a href="Installation-on-Unix.html">Installation on Unix</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Transposed-distributions.html#index-transpose">transpose</a>:</td><td> </td><td valign="top"><a href="Transposed-distributions.html">Transposed distributions</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html#index-transpose-1">transpose</a>:</td><td> </td><td valign="top"><a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html">Multi-dimensional MPI DFTs of Real Data</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Transposes.html#index-transpose-2">transpose</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Transposes.html">FFTW MPI Transposes</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Performance-Tips.html#index-transpose-3">transpose</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Performance-Tips.html">FFTW MPI Performance Tips</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Combining-MPI-and-Threads.html#index-transpose-4">transpose</a>:</td><td> </td><td valign="top"><a href="Combining-MPI-and-Threads.html">Combining MPI and Threads</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="MPI-Plan-Creation.html#index-transpose-5">transpose</a>:</td><td> </td><td valign="top"><a href="MPI-Plan-Creation.html">MPI Plan Creation</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-V">V</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Guru-Interface.html#index-vector">vector</a>:</td><td> </td><td valign="top"><a href="Guru-Interface.html">Guru Interface</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html#index-VSX">VSX</a>:</td><td> </td><td valign="top"><a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
<tr><th id="Concept-Index_cp_letter-W">W</th><td></td><td></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Words-of-Wisdom_002dSaving-Plans.html#index-wisdom">wisdom</a>:</td><td> </td><td valign="top"><a href="Words-of-Wisdom_002dSaving-Plans.html">Words of Wisdom-Saving Plans</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom.html#index-wisdom-1">wisdom</a>:</td><td> </td><td valign="top"><a href="Wisdom.html">Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="FFTW-MPI-Wisdom.html#index-wisdom-2">wisdom</a>:</td><td> </td><td valign="top"><a href="FFTW-MPI-Wisdom.html">FFTW MPI Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Accessing-the-wisdom-API-from-Fortran.html#index-wisdom-3">wisdom</a>:</td><td> </td><td valign="top"><a href="Accessing-the-wisdom-API-from-Fortran.html">Accessing the wisdom API from Fortran</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Caveats-in-Using-Wisdom.html#index-wisdom_002c-problems-with">wisdom, problems with</a>:</td><td> </td><td valign="top"><a href="Caveats-in-Using-Wisdom.html">Caveats in Using Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Caveats-in-Using-Wisdom.html#index-wisdom_002c-system_002dwide">wisdom, system-wide</a>:</td><td> </td><td valign="top"><a href="Caveats-in-Using-Wisdom.html">Caveats in Using Wisdom</a></td></tr>
|
||||
<tr><td></td><td valign="top"><a href="Wisdom-Import.html#index-wisdom_002c-system_002dwide-1">wisdom, system-wide</a>:</td><td> </td><td valign="top"><a href="Wisdom-Import.html">Wisdom Import</a></td></tr>
|
||||
<tr><td colspan="4"> <hr></td></tr>
|
||||
</table>
|
||||
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Concept-Index_cp_symbol-1"><b>6</b></a>
|
||||
|
||||
<br>
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-A"><b>A</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-B"><b>B</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-C"><b>C</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-D"><b>D</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-E"><b>E</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-F"><b>F</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-G"><b>G</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-H"><b>H</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-I"><b>I</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-K"><b>K</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-L"><b>L</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-M"><b>M</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-N"><b>N</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-O"><b>O</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-P"><b>P</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-R"><b>R</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-S"><b>S</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-T"><b>T</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-V"><b>V</b></a>
|
||||
|
||||
<a class="summary-letter" href="#Concept-Index_cp_letter-W"><b>W</b></a>
|
||||
|
||||
</td></tr></table>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Library-Index.html" accesskey="n" rel="next">Library Index</a>, Previous: <a href="License-and-Copyright.html" accesskey="p" rel="prev">License and Copyright</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Concept-Index" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
109
fftw-3.3.10/doc/html/Cycle-Counters.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Cycle Counters (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Cycle Counters (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Cycle Counters (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Installation-and-Customization.html" rel="up" title="Installation and Customization">
|
||||
<link href="Generating-your-own-code.html" rel="next" title="Generating your own code">
|
||||
<link href="Installation-on-non_002dUnix-systems.html" rel="prev" title="Installation on non-Unix systems">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Cycle-Counters"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Generating-your-own-code.html" accesskey="n" rel="next">Generating your own code</a>, Previous: <a href="Installation-on-non_002dUnix-systems.html" accesskey="p" rel="prev">Installation on non-Unix systems</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Cycle-Counters-1"></span><h3 class="section">10.3 Cycle Counters</h3>
|
||||
<span id="index-cycle-counter-1"></span>
|
||||
|
||||
<p>FFTW’s planner actually executes and times different possible FFT
|
||||
algorithms in order to pick the fastest plan for a given <em>n</em>. In
|
||||
order to do this in as short a time as possible, however, the timer must
|
||||
have a very high resolution, and to accomplish this we employ the
|
||||
hardware <em>cycle counters</em> that are available on most CPUs.
|
||||
Currently, FFTW supports the cycle counters on x86, PowerPC/POWER, Alpha,
|
||||
UltraSPARC (SPARC v9), IA64, PA-RISC, and MIPS processors.
|
||||
</p>
|
||||
<span id="index-compiler-3"></span>
|
||||
<p>Access to the cycle counters, unfortunately, is a compiler and/or
|
||||
operating-system dependent task, often requiring inline assembly
|
||||
language, and it may be that your compiler is not supported. If you are
|
||||
<em>not</em> supported, FFTW will by default fall back on its estimator
|
||||
(effectively using <code>FFTW_ESTIMATE</code> for all plans).
|
||||
<span id="index-FFTW_005fESTIMATE-3"></span>
|
||||
</p>
|
||||
<p>You can add support by editing the file <code>kernel/cycle.h</code>; normally,
|
||||
this will involve adapting one of the examples already present in order
|
||||
to use the inline-assembler syntax for your C compiler, and will only
|
||||
require a couple of lines of code. Anyone adding support for a new
|
||||
system to <code>cycle.h</code> is encouraged to email us at <a href="mailto:fftw@fftw.org">fftw@fftw.org</a>.
|
||||
</p>
|
||||
<p>If a cycle counter is not available on your system (e.g. some embedded
|
||||
processor), and you don’t want to use estimated plans, as a last resort
|
||||
you can use the <code>--with-slow-timer</code> option to <code>configure</code> (on
|
||||
Unix) or <code>#define WITH_SLOW_TIMER</code> in <code>config.h</code> (elsewhere).
|
||||
This will use the much lower-resolution <code>gettimeofday</code> function, or even
|
||||
<code>clock</code> if the former is unavailable, and planning will be
|
||||
extremely slow.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Generating-your-own-code.html" accesskey="n" rel="next">Generating your own code</a>, Previous: <a href="Installation-on-non_002dUnix-systems.html" accesskey="p" rel="prev">Installation on non-Unix systems</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
91
fftw-3.3.10/doc/html/Data-Types-and-Files.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Data Types and Files (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Data Types and Files (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Data Types and Files (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-Reference.html" rel="up" title="FFTW Reference">
|
||||
<link href="Complex-numbers.html" rel="next" title="Complex numbers">
|
||||
<link href="FFTW-Reference.html" rel="prev" title="FFTW Reference">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Data-Types-and-Files"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Using-Plans.html" accesskey="n" rel="next">Using Plans</a>, Previous: <a href="FFTW-Reference.html" accesskey="p" rel="prev">FFTW Reference</a>, Up: <a href="FFTW-Reference.html" accesskey="u" rel="up">FFTW Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Data-Types-and-Files-1"></span><h3 class="section">4.1 Data Types and Files</h3>
|
||||
|
||||
<p>All programs using FFTW should include its header file:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">#include <fftw3.h>
|
||||
</pre></div>
|
||||
|
||||
<p>You must also link to the FFTW library. On Unix, this
|
||||
means adding <code>-lfftw3 -lm</code> at the <em>end</em> of the link command.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Complex-numbers.html" accesskey="1">Complex numbers</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Precision.html" accesskey="2">Precision</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Memory-Allocation.html" accesskey="3">Memory Allocation</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
99
fftw-3.3.10/doc/html/Defining-an-FFTW-module.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Defining an FFTW module (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Defining an FFTW module (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Defining an FFTW module (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Modern-Fortran.html" rel="up" title="Calling FFTW from Modern Fortran">
|
||||
<link href="Calling-FFTW-from-Legacy-Fortran.html" rel="next" title="Calling FFTW from Legacy Fortran">
|
||||
<link href="Wisdom-Generic-Export_002fImport-from-Fortran.html" rel="prev" title="Wisdom Generic Export/Import from Fortran">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Defining-an-FFTW-module"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Accessing-the-wisdom-API-from-Fortran.html" accesskey="p" rel="prev">Accessing the wisdom API from Fortran</a>, Up: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="u" rel="up">Calling FFTW from Modern Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Defining-an-FFTW-module-1"></span><h3 class="section">7.7 Defining an FFTW module</h3>
|
||||
|
||||
<p>Rather than using the <code>include</code> statement to include the
|
||||
<code>fftw3.f03</code> interface file in any subroutine where you want to
|
||||
use FFTW, you might prefer to define an FFTW Fortran module. FFTW
|
||||
does not install itself as a module, primarily because
|
||||
<code>fftw3.f03</code> can be shared between different Fortran compilers while
|
||||
modules (in general) cannot. However, it is trivial to define your
|
||||
own FFTW module if you want. Just create a file containing:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> module FFTW3
|
||||
use, intrinsic :: iso_c_binding
|
||||
include 'fftw3.f03'
|
||||
end module
|
||||
</pre></div>
|
||||
|
||||
<p>Compile this file into a module as usual for your compiler (e.g. with
|
||||
<code>gfortran -c</code> you will get a file <code>fftw3.mod</code>). Now,
|
||||
instead of <code>include 'fftw3.f03'</code>, whenever you want to use FFTW
|
||||
routines you can just do:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> use FFTW3
|
||||
</pre></div>
|
||||
|
||||
<p>as usual for Fortran modules. (You still need to link to the FFTW
|
||||
library, of course.)
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
150
fftw-3.3.10/doc/html/Distributed_002dmemory-FFTW-with-MPI.html
Normal file
@@ -0,0 +1,150 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Distributed-memory FFTW with MPI (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Distributed-memory FFTW with MPI (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Distributed-memory FFTW with MPI (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="FFTW-MPI-Installation.html" rel="next" title="FFTW MPI Installation">
|
||||
<link href="Thread-safety.html" rel="prev" title="Thread safety">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Distributed_002dmemory-FFTW-with-MPI"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="n" rel="next">Calling FFTW from Modern Fortran</a>, Previous: <a href="Multi_002dthreaded-FFTW.html" accesskey="p" rel="prev">Multi-threaded FFTW</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Distributed_002dmemory-FFTW-with-MPI-1"></span><h2 class="chapter">6 Distributed-memory FFTW with MPI</h2>
|
||||
<span id="index-MPI"></span>
|
||||
|
||||
<span id="index-parallel-transform-1"></span>
|
||||
<p>In this chapter we document the parallel FFTW routines for parallel
|
||||
systems supporting the MPI message-passing interface. Unlike the
|
||||
shared-memory threads described in the previous chapter, MPI allows
|
||||
you to use <em>distributed-memory</em> parallelism, where each CPU has
|
||||
its own separate memory, and which can scale up to clusters of many
|
||||
thousands of processors. This capability comes at a price, however:
|
||||
each process only stores a <em>portion</em> of the data to be
|
||||
transformed, which means that the data structures and
|
||||
programming-interface are quite different from the serial or threads
|
||||
versions of FFTW.
|
||||
<span id="index-data-distribution"></span>
|
||||
</p>
|
||||
|
||||
<p>Distributed-memory parallelism is especially useful when you are
|
||||
transforming arrays so large that they do not fit into the memory of a
|
||||
single processor. The storage per-process required by FFTW’s MPI
|
||||
routines is proportional to the total array size divided by the number
|
||||
of processes. Conversely, distributed-memory parallelism can easily
|
||||
pose an unacceptably high communications overhead for small problems;
|
||||
the threshold problem size for which parallelism becomes advantageous
|
||||
will depend on the precise problem you are interested in, your
|
||||
hardware, and your MPI implementation.
|
||||
</p>
|
||||
<p>A note on terminology: in MPI, you divide the data among a set of
|
||||
“processes” which each run in their own memory address space.
|
||||
Generally, each process runs on a different physical processor, but
|
||||
this is not required. A set of processes in MPI is described by an
|
||||
opaque data structure called a “communicator,” the most common of
|
||||
which is the predefined communicator <code>MPI_COMM_WORLD</code> which
|
||||
refers to <em>all</em> processes. For more information on these and
|
||||
other concepts common to all MPI programs, we refer the reader to the
|
||||
documentation at <a href="http://www.mcs.anl.gov/research/projects/mpi/">the MPI home
|
||||
page</a>.
|
||||
<span id="index-MPI-communicator"></span>
|
||||
<span id="index-MPI_005fCOMM_005fWORLD"></span>
|
||||
</p>
|
||||
|
||||
<p>We assume in this chapter that the reader is familiar with the usage
|
||||
of the serial (uniprocessor) FFTW, and focus only on the concepts new
|
||||
to the MPI interface.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-MPI-Installation.html" accesskey="1">FFTW MPI Installation</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Linking-and-Initializing-MPI-FFTW.html" accesskey="2">Linking and Initializing MPI FFTW</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="2d-MPI-example.html" accesskey="3">2d MPI example</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="MPI-Data-Distribution.html" accesskey="4">MPI Data Distribution</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Multi_002ddimensional-MPI-DFTs-of-Real-Data.html" accesskey="5">Multi-dimensional MPI DFTs of Real Data</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html" accesskey="6">Other Multi-dimensional Real-data MPI Transforms</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-MPI-Transposes.html" accesskey="7">FFTW MPI Transposes</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-MPI-Wisdom.html" accesskey="8">FFTW MPI Wisdom</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Avoiding-MPI-Deadlocks.html" accesskey="9">Avoiding MPI Deadlocks</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-MPI-Performance-Tips.html">FFTW MPI Performance Tips</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Combining-MPI-and-Threads.html">Combining MPI and Threads</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-MPI-Reference.html">FFTW MPI Reference</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="FFTW-MPI-Fortran-Interface.html">FFTW MPI Fortran Interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="n" rel="next">Calling FFTW from Modern Fortran</a>, Previous: <a href="Multi_002dthreaded-FFTW.html" accesskey="p" rel="prev">Multi-threaded FFTW</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
108
fftw-3.3.10/doc/html/Dynamic-Arrays-in-C.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Dynamic Arrays in C (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Dynamic Arrays in C (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Dynamic Arrays in C (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Multi_002ddimensional-Array-Format.html" rel="up" title="Multi-dimensional Array Format">
|
||||
<link href="Dynamic-Arrays-in-C_002dThe-Wrong-Way.html" rel="next" title="Dynamic Arrays in C-The Wrong Way">
|
||||
<link href="Fixed_002dsize-Arrays-in-C.html" rel="prev" title="Fixed-size Arrays in C">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Dynamic-Arrays-in-C"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Dynamic-Arrays-in-C_002dThe-Wrong-Way.html" accesskey="n" rel="next">Dynamic Arrays in C-The Wrong Way</a>, Previous: <a href="Fixed_002dsize-Arrays-in-C.html" accesskey="p" rel="prev">Fixed-size Arrays in C</a>, Up: <a href="Multi_002ddimensional-Array-Format.html" accesskey="u" rel="up">Multi-dimensional Array Format</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Dynamic-Arrays-in-C-1"></span><h4 class="subsection">3.2.4 Dynamic Arrays in C</h4>
|
||||
|
||||
<p>We recommend allocating most arrays dynamically, with
|
||||
<code>fftw_malloc</code>. This isn’t too hard to do, although it is not as
|
||||
straightforward for multi-dimensional arrays as it is for
|
||||
one-dimensional arrays.
|
||||
</p>
|
||||
<p>Creating the array is simple: using a dynamic-allocation routine like
|
||||
<code>fftw_malloc</code>, allocate an array big enough to store N
|
||||
<code>fftw_complex</code> values (for a complex DFT), where N is the product
|
||||
of the sizes of the array dimensions (i.e. the total number of complex
|
||||
values in the array). For example, here is code to allocate a
|
||||
5 × 12 × 27
|
||||
rank-3 array:
|
||||
<span id="index-fftw_005fmalloc-2"></span>
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">fftw_complex *an_array;
|
||||
an_array = (fftw_complex*) fftw_malloc(5*12*27 * sizeof(fftw_complex));
|
||||
</pre></div>
|
||||
|
||||
<p>Accessing the array elements, however, is more tricky—you can’t
|
||||
simply use multiple applications of the ‘<samp>[]</samp>’ operator like you
|
||||
could for fixed-size arrays. Instead, you have to explicitly compute
|
||||
the offset into the array using the formula given earlier for
|
||||
row-major arrays. For example, to reference the <em>(i,j,k)</em>-th
|
||||
element of the array allocated above, you would use the expression
|
||||
<code>an_array[k + 27 * (j + 12 * i)]</code>.
|
||||
</p>
|
||||
<p>This pain can be alleviated somewhat by defining appropriate macros,
|
||||
or, in C++, creating a class and overloading the ‘<samp>()</samp>’ operator.
|
||||
The recent C99 standard provides a way to reinterpret the dynamic
|
||||
array as a “variable-length” multi-dimensional array amenable to
|
||||
‘<samp>[]</samp>’, but this feature is not yet widely supported by compilers.
|
||||
<span id="index-C99"></span>
|
||||
<span id="index-C_002b_002b-2"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
108
fftw-3.3.10/doc/html/Dynamic-Arrays-in-C_002dThe-Wrong-Way.html
Normal file
@@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Dynamic Arrays in C-The Wrong Way (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Dynamic Arrays in C-The Wrong Way (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Dynamic Arrays in C-The Wrong Way (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Multi_002ddimensional-Array-Format.html" rel="up" title="Multi-dimensional Array Format">
|
||||
<link href="Words-of-Wisdom_002dSaving-Plans.html" rel="next" title="Words of Wisdom-Saving Plans">
|
||||
<link href="Dynamic-Arrays-in-C.html" rel="prev" title="Dynamic Arrays in C">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Dynamic-Arrays-in-C_002dThe-Wrong-Way"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Dynamic-Arrays-in-C.html" accesskey="p" rel="prev">Dynamic Arrays in C</a>, Up: <a href="Multi_002ddimensional-Array-Format.html" accesskey="u" rel="up">Multi-dimensional Array Format</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Dynamic-Arrays-in-C_002d_002d_002dThe-Wrong-Way"></span><h4 class="subsection">3.2.5 Dynamic Arrays in C—The Wrong Way</h4>
|
||||
|
||||
<p>A different method for allocating multi-dimensional arrays in C is
|
||||
often suggested that is incompatible with FFTW: <em>using it will
|
||||
cause FFTW to die a painful death</em>. We discuss the technique here,
|
||||
however, because it is so commonly known and used. This method is to
|
||||
create arrays of pointers of arrays of pointers of …etcetera.
|
||||
For example, the analogue in this method to the example above is:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">int i,j;
|
||||
fftw_complex ***a_bad_array; /* <span class="roman">another way to make a 5x12x27 array</span> */
|
||||
|
||||
a_bad_array = (fftw_complex ***) malloc(5 * sizeof(fftw_complex **));
|
||||
for (i = 0; i < 5; ++i) {
|
||||
a_bad_array[i] =
|
||||
(fftw_complex **) malloc(12 * sizeof(fftw_complex *));
|
||||
for (j = 0; j < 12; ++j)
|
||||
a_bad_array[i][j] =
|
||||
(fftw_complex *) malloc(27 * sizeof(fftw_complex));
|
||||
}
|
||||
</pre></div>
|
||||
|
||||
<p>As you can see, this sort of array is inconvenient to allocate (and
|
||||
deallocate). On the other hand, it has the advantage that the
|
||||
<em>(i,j,k)</em>-th element can be referenced simply by
|
||||
<code>a_bad_array[i][j][k]</code>.
|
||||
</p>
|
||||
<p>If you like this technique and want to maximize convenience in accessing
|
||||
the array, but still want to pass the array to FFTW, you can use a
|
||||
hybrid method. Allocate the array as one contiguous block, but also
|
||||
declare an array of arrays of pointers that point to appropriate places
|
||||
in the block. That sort of trick is beyond the scope of this
|
||||
documentation; for more information on multi-dimensional arrays in C,
|
||||
see the <code>comp.lang.c</code>
|
||||
<a href="http://c-faq.com/aryptr/dynmuldimary.html">FAQ</a>.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Extended and quadruple precision in Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Extended and quadruple precision in Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Extended and quadruple precision in Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Overview-of-Fortran-interface.html" rel="up" title="Overview of Fortran interface">
|
||||
<link href="Reversing-array-dimensions.html" rel="next" title="Reversing array dimensions">
|
||||
<link href="Overview-of-Fortran-interface.html" rel="prev" title="Overview of Fortran interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Extended-and-quadruple-precision-in-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Overview-of-Fortran-interface.html" accesskey="p" rel="prev">Overview of Fortran interface</a>, Up: <a href="Overview-of-Fortran-interface.html" accesskey="u" rel="up">Overview of Fortran interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Extended-and-quadruple-precision-in-Fortran-1"></span><h4 class="subsection">7.1.1 Extended and quadruple precision in Fortran</h4>
|
||||
<span id="index-precision-7"></span>
|
||||
|
||||
<p>If FFTW is compiled in <code>long double</code> (extended) precision
|
||||
(see <a href="Installation-and-Customization.html">Installation and Customization</a>), you may be able to call the
|
||||
resulting <code>fftwl_</code> routines (see <a href="Precision.html">Precision</a>) from Fortran if
|
||||
your compiler supports the <code>C_LONG_DOUBLE_COMPLEX</code> type code.
|
||||
</p>
|
||||
<p>Because some Fortran compilers do not support
|
||||
<code>C_LONG_DOUBLE_COMPLEX</code>, the <code>fftwl_</code> declarations are
|
||||
segregated into a separate interface file <code>fftw3l.f03</code>, which you
|
||||
should include <em>in addition</em> to <code>fftw3.f03</code> (which declares
|
||||
precision-independent ‘<samp>FFTW_</samp>’ constants):
|
||||
</p>
|
||||
<span id="index-iso_005fc_005fbinding-2"></span>
|
||||
<div class="example">
|
||||
<pre class="example"> use, intrinsic :: iso_c_binding
|
||||
include 'fftw3.f03'
|
||||
include 'fftw3l.f03'
|
||||
</pre></div>
|
||||
|
||||
<p>We also support using the nonstandard <code>__float128</code>
|
||||
quadruple-precision type provided by recent versions of <code>gcc</code> on
|
||||
32- and 64-bit x86 hardware (see <a href="Installation-and-Customization.html">Installation and Customization</a>),
|
||||
using the corresponding <code>real(16)</code> and <code>complex(16)</code> types
|
||||
supported by <code>gfortran</code>. The quadruple-precision ‘<samp>fftwq_</samp>’
|
||||
functions (see <a href="Precision.html">Precision</a>) are declared in a <code>fftw3q.f03</code>
|
||||
interface file, which should be included in addition to
|
||||
<code>fftw3.f03</code>, as above. You should also link with
|
||||
<code>-lfftw3q -lquadmath -lm</code> as in C.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
93
fftw-3.3.10/doc/html/FFTW-Constants-in-Fortran.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW Constants in Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW Constants in Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW Constants in Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Legacy-Fortran.html" rel="up" title="Calling FFTW from Legacy Fortran">
|
||||
<link href="FFTW-Execution-in-Fortran.html" rel="next" title="FFTW Execution in Fortran">
|
||||
<link href="Fortran_002dinterface-routines.html" rel="prev" title="Fortran-interface routines">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-Constants-in-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-Execution-in-Fortran.html" accesskey="n" rel="next">FFTW Execution in Fortran</a>, Previous: <a href="Fortran_002dinterface-routines.html" accesskey="p" rel="prev">Fortran-interface routines</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-Constants-in-Fortran-1"></span><h3 class="section">8.2 FFTW Constants in Fortran</h3>
|
||||
|
||||
<p>When creating plans in FFTW, a number of constants are used to specify
|
||||
options, such as <code>FFTW_MEASURE</code> or <code>FFTW_ESTIMATE</code>. The
|
||||
same constants must be used with the wrapper routines, but of course the
|
||||
C header files where the constants are defined can’t be incorporated
|
||||
directly into Fortran code.
|
||||
</p>
|
||||
<p>Instead, we have placed Fortran equivalents of the FFTW constant
|
||||
definitions in the file <code>fftw3.f</code>, which can be found in the same
|
||||
directory as <code>fftw3.h</code>. If your Fortran compiler supports a
|
||||
preprocessor of some sort, you should be able to <code>include</code> or
|
||||
<code>#include</code> this file; otherwise, you can paste it directly into
|
||||
your code.
|
||||
</p>
|
||||
<span id="index-flags-9"></span>
|
||||
<p>In C, you combine different flags (like <code>FFTW_PRESERVE_INPUT</code> and
|
||||
<code>FFTW_MEASURE</code>) using the ‘<samp><code>|</code></samp>’ operator; in Fortran
|
||||
you should just use ‘<samp><code>+</code></samp>’. (Take care not to add in the
|
||||
same flag more than once, though. Alternatively, you can use the
|
||||
<code>ior</code> intrinsic function standardized in Fortran 95.)
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
134
fftw-3.3.10/doc/html/FFTW-Execution-in-Fortran.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW Execution in Fortran (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW Execution in Fortran (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW Execution in Fortran (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Legacy-Fortran.html" rel="up" title="Calling FFTW from Legacy Fortran">
|
||||
<link href="Fortran-Examples.html" rel="next" title="Fortran Examples">
|
||||
<link href="FFTW-Constants-in-Fortran.html" rel="prev" title="FFTW Constants in Fortran">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-Execution-in-Fortran"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Fortran-Examples.html" accesskey="n" rel="next">Fortran Examples</a>, Previous: <a href="FFTW-Constants-in-Fortran.html" accesskey="p" rel="prev">FFTW Constants in Fortran</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-Execution-in-Fortran-1"></span><h3 class="section">8.3 FFTW Execution in Fortran</h3>
|
||||
|
||||
<p>In C, in order to use a plan, one normally calls <code>fftw_execute</code>,
|
||||
which executes the plan to perform the transform on the input/output
|
||||
arrays passed when the plan was created (see <a href="Using-Plans.html">Using Plans</a>). The
|
||||
corresponding subroutine call in legacy Fortran is:
|
||||
</p><div class="example">
|
||||
<pre class="example"> call dfftw_execute(plan)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fexecute"></span>
|
||||
|
||||
<p>However, we have had reports that this causes problems with some
|
||||
recent optimizing Fortran compilers. The problem is, because the
|
||||
input/output arrays are not passed as explicit arguments to
|
||||
<code>dfftw_execute</code>, the semantics of Fortran (unlike C) allow the
|
||||
compiler to assume that the input/output arrays are not changed by
|
||||
<code>dfftw_execute</code>. As a consequence, certain compilers end up
|
||||
optimizing out or repositioning the call to <code>dfftw_execute</code>,
|
||||
assuming incorrectly that it does nothing.
|
||||
</p>
|
||||
<p>There are various workarounds to this, but the safest and simplest
|
||||
thing is to not use <code>dfftw_execute</code> in Fortran. Instead, use the
|
||||
functions described in <a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a>, which take
|
||||
the input/output arrays as explicit arguments. For example, if the
|
||||
plan is for a complex-data DFT and was created for the arrays
|
||||
<code>in</code> and <code>out</code>, you would do:
|
||||
</p><div class="example">
|
||||
<pre class="example"> call dfftw_execute_dft(plan, in, out)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fexecute_005fdft"></span>
|
||||
|
||||
<p>There are a few things to be careful of, however:
|
||||
</p>
|
||||
<ul>
|
||||
<li> You must use the correct type of execute function, matching the way
|
||||
the plan was created. Complex DFT plans should use
|
||||
<code>dfftw_execute_dft</code>, Real-input (r2c) DFT plans should use use
|
||||
<code>dfftw_execute_dft_r2c</code>, and real-output (c2r) DFT plans should
|
||||
use <code>dfftw_execute_dft_c2r</code>. The various r2r plans should use
|
||||
<code>dfftw_execute_r2r</code>.
|
||||
|
||||
</li><li> You should normally pass the same input/output arrays that were used when
|
||||
creating the plan. This is always safe.
|
||||
|
||||
</li><li> <em>If</em> you pass <em>different</em> input/output arrays compared to
|
||||
those used when creating the plan, you must abide by all the
|
||||
restrictions of the new-array execute functions (see <a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a>). The most difficult of these, in Fortran, is the
|
||||
requirement that the new arrays have the same alignment as the
|
||||
original arrays, because there seems to be no way in legacy Fortran to obtain
|
||||
guaranteed-aligned arrays (analogous to <code>fftw_malloc</code> in C). You
|
||||
can, of course, use the <code>FFTW_UNALIGNED</code> flag when creating the
|
||||
plan, in which case the plan does not depend on the alignment, but
|
||||
this may sacrifice substantial performance on architectures (like x86)
|
||||
with SIMD instructions (see <a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a>).
|
||||
<span id="index-FFTW_005fUNALIGNED-3"></span>
|
||||
|
||||
</li></ul>
|
||||
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Fortran-Examples.html" accesskey="n" rel="next">Fortran Examples</a>, Previous: <a href="FFTW-Constants-in-Fortran.html" accesskey="p" rel="prev">FFTW Constants in Fortran</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
173
fftw-3.3.10/doc/html/FFTW-Fortran-type-reference.html
Normal file
@@ -0,0 +1,173 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW Fortran type reference (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW Fortran type reference (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW Fortran type reference (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Modern-Fortran.html" rel="up" title="Calling FFTW from Modern Fortran">
|
||||
<link href="Plan-execution-in-Fortran.html" rel="next" title="Plan execution in Fortran">
|
||||
<link href="Reversing-array-dimensions.html" rel="prev" title="Reversing array dimensions">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-Fortran-type-reference"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Plan-execution-in-Fortran.html" accesskey="n" rel="next">Plan execution in Fortran</a>, Previous: <a href="Reversing-array-dimensions.html" accesskey="p" rel="prev">Reversing array dimensions</a>, Up: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="u" rel="up">Calling FFTW from Modern Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-Fortran-type-reference-1"></span><h3 class="section">7.3 FFTW Fortran type reference</h3>
|
||||
|
||||
<p>The following are the most important type correspondences between the
|
||||
C interface and Fortran:
|
||||
</p>
|
||||
<ul>
|
||||
<li> <span id="index-fftw_005fplan-2"></span>
|
||||
Plans (<code>fftw_plan</code> and variants) are <code>type(C_PTR)</code> (i.e. an
|
||||
opaque pointer).
|
||||
|
||||
</li><li> <span id="index-fftw_005fcomplex-3"></span>
|
||||
<span id="index-precision-8"></span>
|
||||
<span id="index-C_005fDOUBLE-1"></span>
|
||||
<span id="index-C_005fFLOAT"></span>
|
||||
<span id="index-C_005fLONG_005fDOUBLE"></span>
|
||||
<span id="index-C_005fDOUBLE_005fCOMPLEX-1"></span>
|
||||
<span id="index-C_005fFLOAT_005fCOMPLEX"></span>
|
||||
<span id="index-C_005fLONG_005fDOUBLE_005fCOMPLEX"></span>
|
||||
The C floating-point types <code>double</code>, <code>float</code>, and <code>long
|
||||
double</code> correspond to <code>real(C_DOUBLE)</code>, <code>real(C_FLOAT)</code>, and
|
||||
<code>real(C_LONG_DOUBLE)</code>, respectively. The C complex types
|
||||
<code>fftw_complex</code>, <code>fftwf_complex</code>, and <code>fftwl_complex</code>
|
||||
correspond in Fortran to <code>complex(C_DOUBLE_COMPLEX)</code>,
|
||||
<code>complex(C_FLOAT_COMPLEX)</code>, and
|
||||
<code>complex(C_LONG_DOUBLE_COMPLEX)</code>, respectively.
|
||||
Just as in C
|
||||
(see <a href="Precision.html">Precision</a>), the FFTW subroutines and types are prefixed with
|
||||
‘<samp>fftw_</samp>’, <code>fftwf_</code>, and <code>fftwl_</code> for the different precisions, and link to different libraries (<code>-lfftw3</code>, <code>-lfftw3f</code>, and <code>-lfftw3l</code> on Unix), but use the <em>same</em> include file <code>fftw3.f03</code> and the <em>same</em> constants (all of which begin with ‘<samp>FFTW_</samp>’). The exception is <code>long double</code> precision, for which you should <em>also</em> include <code>fftw3l.f03</code> (see <a href="Extended-and-quadruple-precision-in-Fortran.html">Extended and quadruple precision in Fortran</a>).
|
||||
|
||||
</li><li> <span id="index-ptrdiff_005ft-2"></span>
|
||||
<span id="index-C_005fINT-1"></span>
|
||||
<span id="index-C_005fINTPTR_005fT"></span>
|
||||
<span id="index-C_005fSIZE_005fT"></span>
|
||||
<span id="index-fftw_005fmalloc-7"></span>
|
||||
The C integer types <code>int</code> and <code>unsigned</code> (used for planner
|
||||
flags) become <code>integer(C_INT)</code>. The C integer type <code>ptrdiff_t</code> (e.g. in the <a href="64_002dbit-Guru-Interface.html">64-bit Guru Interface</a>) becomes <code>integer(C_INTPTR_T)</code>, and <code>size_t</code> (in <code>fftw_malloc</code> etc.) becomes <code>integer(C_SIZE_T)</code>.
|
||||
|
||||
</li><li> <span id="index-fftw_005fr2r_005fkind-2"></span>
|
||||
<span id="index-C_005fFFTW_005fR2R_005fKIND"></span>
|
||||
The <code>fftw_r2r_kind</code> type (see <a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a>)
|
||||
becomes <code>integer(C_FFTW_R2R_KIND)</code>. The various constant values
|
||||
of the C enumerated type (<code>FFTW_R2HC</code> etc.) become simply integer
|
||||
constants of the same names in Fortran.
|
||||
|
||||
</li><li> <span id="index-FFTW_005fDESTROY_005fINPUT-2"></span>
|
||||
<span id="index-in_002dplace-10"></span>
|
||||
<span id="index-fftw_005fflops-2"></span>
|
||||
Numeric array pointer arguments (e.g. <code>double *</code>)
|
||||
become <code>dimension(*), intent(out)</code> arrays of the same type, or
|
||||
<code>dimension(*), intent(in)</code> if they are pointers to constant data
|
||||
(e.g. <code>const int *</code>). There are a few exceptions where numeric
|
||||
pointers refer to scalar outputs (e.g. for <code>fftw_flops</code>), in which
|
||||
case they are <code>intent(out)</code> scalar arguments in Fortran too.
|
||||
For the new-array execute functions (see <a href="New_002darray-Execute-Functions.html">New-array Execute Functions</a>),
|
||||
the input arrays are declared <code>dimension(*), intent(inout)</code>, since
|
||||
they can be modified in the case of in-place or <code>FFTW_DESTROY_INPUT</code>
|
||||
transforms.
|
||||
|
||||
</li><li> <span id="index-fftw_005falloc_005freal-4"></span>
|
||||
<span id="index-c_005ff_005fpointer-1"></span>
|
||||
Pointer <em>return</em> values (e.g <code>double *</code>) become
|
||||
<code>type(C_PTR)</code>. (If they are pointers to arrays, as for
|
||||
<code>fftw_alloc_real</code>, you can convert them back to Fortran array
|
||||
pointers with the standard intrinsic function <code>c_f_pointer</code>.)
|
||||
|
||||
</li><li> <span id="index-guru-interface-3"></span>
|
||||
<span id="index-fftw_005fiodim-1"></span>
|
||||
<span id="index-fftw_005fiodim64-1"></span>
|
||||
<span id="index-64_002dbit-architecture-2"></span>
|
||||
The <code>fftw_iodim</code> type in the guru interface (see <a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a>) becomes <code>type(fftw_iodim)</code> in Fortran, a
|
||||
derived data type (the Fortran analogue of C’s <code>struct</code>) with
|
||||
three <code>integer(C_INT)</code> components: <code>n</code>, <code>is</code>, and
|
||||
<code>os</code>, with the same meanings as in C. The <code>fftw_iodim64</code> type in the 64-bit guru interface (see <a href="64_002dbit-Guru-Interface.html">64-bit Guru Interface</a>) is the same, except that its components are of type <code>integer(C_INTPTR_T)</code>.
|
||||
|
||||
</li><li> <span id="index-C_005fFUNPTR"></span>
|
||||
Using the wisdom import/export functions from Fortran is a bit tricky,
|
||||
and is discussed in <a href="Accessing-the-wisdom-API-from-Fortran.html">Accessing the wisdom API from Fortran</a>. In
|
||||
brief, the <code>FILE *</code> arguments map to <code>type(C_PTR)</code>, <code>const char *</code> to <code>character(C_CHAR), dimension(*), intent(in)</code> (null-terminated!), and the generic read-char/write-char functions map to <code>type(C_FUNPTR)</code>.
|
||||
|
||||
</li></ul>
|
||||
|
||||
<span id="index-portability-5"></span>
|
||||
<p>You may be wondering if you need to search-and-replace
|
||||
<code>real(kind(0.0d0))</code> (or whatever your favorite Fortran spelling
|
||||
of “double precision” is) with <code>real(C_DOUBLE)</code> everywhere in
|
||||
your program, and similarly for <code>complex</code> and <code>integer</code>
|
||||
types. The answer is no; you can still use your existing types. As
|
||||
long as these types match their C counterparts, things should work
|
||||
without a hitch. The worst that can happen, e.g. in the (unlikely)
|
||||
event of a system where <code>real(kind(0.0d0))</code> is different from
|
||||
<code>real(C_DOUBLE)</code>, is that the compiler will give you a
|
||||
type-mismatch error. That is, if you don’t use the
|
||||
<code>iso_c_binding</code> kinds you need to accept at least the theoretical
|
||||
possibility of having to change your code in response to compiler
|
||||
errors on some future machine, but you don’t need to worry about
|
||||
silently compiling incorrect code that yields runtime errors.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Plan-execution-in-Fortran.html" accesskey="n" rel="next">Plan execution in Fortran</a>, Previous: <a href="Reversing-array-dimensions.html" accesskey="p" rel="prev">Reversing array dimensions</a>, Up: <a href="Calling-FFTW-from-Modern-Fortran.html" accesskey="u" rel="up">Calling FFTW from Modern Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
226
fftw-3.3.10/doc/html/FFTW-MPI-Fortran-Interface.html
Normal file
@@ -0,0 +1,226 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW MPI Fortran Interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW MPI Fortran Interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW MPI Fortran Interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="Calling-FFTW-from-Modern-Fortran.html" rel="next" title="Calling FFTW from Modern Fortran">
|
||||
<link href="MPI-Wisdom-Communication.html" rel="prev" title="MPI Wisdom Communication">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-MPI-Fortran-Interface"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="FFTW-MPI-Reference.html" accesskey="p" rel="prev">FFTW MPI Reference</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-MPI-Fortran-Interface-1"></span><h3 class="section">6.13 FFTW MPI Fortran Interface</h3>
|
||||
<span id="index-Fortran-interface-1"></span>
|
||||
|
||||
<span id="index-iso_005fc_005fbinding"></span>
|
||||
<p>The FFTW MPI interface is callable from modern Fortran compilers
|
||||
supporting the Fortran 2003 <code>iso_c_binding</code> standard for calling
|
||||
C functions. As described in <a href="Calling-FFTW-from-Modern-Fortran.html">Calling FFTW from Modern Fortran</a>,
|
||||
this means that you can directly call FFTW’s C interface from Fortran
|
||||
with only minor changes in syntax. There are, however, a few things
|
||||
specific to the MPI interface to keep in mind:
|
||||
</p>
|
||||
<ul>
|
||||
<li> Instead of including <code>fftw3.f03</code> as in <a href="Overview-of-Fortran-interface.html">Overview of Fortran interface</a>, you should <code>include 'fftw3-mpi.f03'</code> (after
|
||||
<code>use, intrinsic :: iso_c_binding</code> as before). The
|
||||
<code>fftw3-mpi.f03</code> file includes <code>fftw3.f03</code>, so you should
|
||||
<em>not</em> <code>include</code> them both yourself. (You will also want to
|
||||
include the MPI header file, usually via <code>include 'mpif.h'</code> or
|
||||
similar, although though this is not needed by <code>fftw3-mpi.f03</code>
|
||||
<i>per se</i>.) (To use the ‘<samp>fftwl_</samp>’ <code>long double</code> extended-precision routines in supporting compilers, you should include <code>fftw3f-mpi.f03</code> in <em>addition</em> to <code>fftw3-mpi.f03</code>. See <a href="Extended-and-quadruple-precision-in-Fortran.html">Extended and quadruple precision in Fortran</a>.)
|
||||
|
||||
</li><li> Because of the different storage conventions between C and Fortran,
|
||||
you reverse the order of your array dimensions when passing them to
|
||||
FFTW (see <a href="Reversing-array-dimensions.html">Reversing array dimensions</a>). This is merely a
|
||||
difference in notation and incurs no performance overhead. However,
|
||||
it means that, whereas in C the <em>first</em> dimension is distributed,
|
||||
in Fortran the <em>last</em> dimension of your array is distributed.
|
||||
|
||||
</li><li> <span id="index-MPI-communicator-3"></span>
|
||||
In Fortran, communicators are stored as <code>integer</code> types; there is
|
||||
no <code>MPI_Comm</code> type, nor is there any way to access a C
|
||||
<code>MPI_Comm</code>. Fortunately, this is taken care of for you by the
|
||||
FFTW Fortran interface: whenever the C interface expects an
|
||||
<code>MPI_Comm</code> type, you should pass the Fortran communicator as an
|
||||
<code>integer</code>.<a id="DOCF8" href="#FOOT8"><sup>8</sup></a>
|
||||
|
||||
</li><li> Because you need to call the ‘<samp>local_size</samp>’ function to find out
|
||||
how much space to allocate, and this may be <em>larger</em> than the
|
||||
local portion of the array (see <a href="MPI-Data-Distribution.html">MPI Data Distribution</a>), you should
|
||||
<em>always</em> allocate your arrays dynamically using FFTW’s allocation
|
||||
routines as described in <a href="Allocating-aligned-memory-in-Fortran.html">Allocating aligned memory in Fortran</a>.
|
||||
(Coincidentally, this also provides the best performance by
|
||||
guaranteeding proper data alignment.)
|
||||
|
||||
</li><li> Because all sizes in the MPI FFTW interface are declared as
|
||||
<code>ptrdiff_t</code> in C, you should use <code>integer(C_INTPTR_T)</code> in
|
||||
Fortran (see <a href="FFTW-Fortran-type-reference.html">FFTW Fortran type reference</a>).
|
||||
|
||||
</li><li> <span id="index-fftw_005fexecute_005fdft-1"></span>
|
||||
<span id="index-fftw_005fmpi_005fexecute_005fdft-1"></span>
|
||||
<span id="index-new_002darray-execution-3"></span>
|
||||
In Fortran, because of the language semantics, we generally recommend
|
||||
using the new-array execute functions for all plans, even in the
|
||||
common case where you are executing the plan on the same arrays for
|
||||
which the plan was created (see <a href="Plan-execution-in-Fortran.html">Plan execution in Fortran</a>).
|
||||
However, note that in the MPI interface these functions are changed:
|
||||
<code>fftw_execute_dft</code> becomes <code>fftw_mpi_execute_dft</code>,
|
||||
etcetera. See <a href="Using-MPI-Plans.html">Using MPI Plans</a>.
|
||||
|
||||
</li></ul>
|
||||
|
||||
<p>For example, here is a Fortran code snippet to perform a distributed
|
||||
L × M
|
||||
complex DFT in-place. (This assumes you have already
|
||||
initialized MPI with <code>MPI_init</code> and have also performed
|
||||
<code>call fftw_mpi_init</code>.)
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> use, intrinsic :: iso_c_binding
|
||||
include 'fftw3-mpi.f03'
|
||||
integer(C_INTPTR_T), parameter :: L = ...
|
||||
integer(C_INTPTR_T), parameter :: M = ...
|
||||
type(C_PTR) :: plan, cdata
|
||||
complex(C_DOUBLE_COMPLEX), pointer :: data(:,:)
|
||||
integer(C_INTPTR_T) :: i, j, alloc_local, local_M, local_j_offset
|
||||
|
||||
! <span class="roman">get local data size and allocate (note dimension reversal)</span>
|
||||
alloc_local = fftw_mpi_local_size_2d(M, L, MPI_COMM_WORLD, &
|
||||
local_M, local_j_offset)
|
||||
cdata = fftw_alloc_complex(alloc_local)
|
||||
call c_f_pointer(cdata, data, [L,local_M])
|
||||
|
||||
! <span class="roman">create MPI plan for in-place forward DFT (note dimension reversal)</span>
|
||||
plan = fftw_mpi_plan_dft_2d(M, L, data, data, MPI_COMM_WORLD, &
|
||||
FFTW_FORWARD, FFTW_MEASURE)
|
||||
|
||||
! <span class="roman">initialize data to some function</span> my_function(i,j)
|
||||
do j = 1, local_M
|
||||
do i = 1, L
|
||||
data(i, j) = my_function(i, j + local_j_offset)
|
||||
end do
|
||||
end do
|
||||
|
||||
! <span class="roman">compute transform (as many times as desired)</span>
|
||||
call fftw_mpi_execute_dft(plan, data, data)
|
||||
|
||||
call fftw_destroy_plan(plan)
|
||||
call fftw_free(cdata)
|
||||
</pre></div>
|
||||
|
||||
<p>Note that when we called <code>fftw_mpi_local_size_2d</code> and
|
||||
<code>fftw_mpi_plan_dft_2d</code> with the dimensions in reversed order,
|
||||
since a L × M
|
||||
Fortran array is viewed by FFTW in C as a
|
||||
M × L
|
||||
array. This means that the array was distributed over
|
||||
the <code>M</code> dimension, the local portion of which is a
|
||||
L × local_M
|
||||
array in Fortran. (You must <em>not</em> use an
|
||||
<code>allocate</code> statement to allocate an L × local_M
|
||||
array,
|
||||
however; you must allocate <code>alloc_local</code> complex numbers, which
|
||||
may be greater than <code>L * local_M</code>, in order to reserve space for
|
||||
intermediate steps of the transform.) Finally, we mention that
|
||||
because C’s array indices are zero-based, the <code>local_j_offset</code>
|
||||
argument can conveniently be interpreted as an offset in the 1-based
|
||||
<code>j</code> index (rather than as a starting index as in C).
|
||||
</p>
|
||||
<p>If instead you had used the <code>ior(FFTW_MEASURE,
|
||||
FFTW_MPI_TRANSPOSED_OUT)</code> flag, the output of the transform would be a
|
||||
transposed M × local_L
|
||||
array, associated with the <em>same</em>
|
||||
<code>cdata</code> allocation (since the transform is in-place), and which
|
||||
you could declare with:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> complex(C_DOUBLE_COMPLEX), pointer :: tdata(:,:)
|
||||
...
|
||||
call c_f_pointer(cdata, tdata, [M,local_L])
|
||||
</pre></div>
|
||||
|
||||
<p>where <code>local_L</code> would have been obtained by changing the
|
||||
<code>fftw_mpi_local_size_2d</code> call to:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> alloc_local = fftw_mpi_local_size_2d_transposed(M, L, MPI_COMM_WORLD, &
|
||||
local_M, local_j_offset, local_L, local_i_offset)
|
||||
</pre></div>
|
||||
<div class="footnote">
|
||||
<hr>
|
||||
<h4 class="footnotes-heading">Footnotes</h4>
|
||||
|
||||
<h5><a id="FOOT8" href="#DOCF8">(8)</a></h3>
|
||||
<p>Technically, this is because you aren’t
|
||||
actually calling the C functions directly. You are calling wrapper
|
||||
functions that translate the communicator with <code>MPI_Comm_f2c</code>
|
||||
before calling the ordinary C interface. This is all done
|
||||
transparently, however, since the <code>fftw3-mpi.f03</code> interface file
|
||||
renames the wrappers so that they are called in Fortran with the same
|
||||
names as the C interface functions.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Previous: <a href="FFTW-MPI-Reference.html" accesskey="p" rel="prev">FFTW MPI Reference</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
106
fftw-3.3.10/doc/html/FFTW-MPI-Installation.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW MPI Installation (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW MPI Installation (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW MPI Installation (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="Linking-and-Initializing-MPI-FFTW.html" rel="next" title="Linking and Initializing MPI FFTW">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="prev" title="Distributed-memory FFTW with MPI">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-MPI-Installation"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Linking-and-Initializing-MPI-FFTW.html" accesskey="n" rel="next">Linking and Initializing MPI FFTW</a>, Previous: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="p" rel="prev">Distributed-memory FFTW with MPI</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-MPI-Installation-1"></span><h3 class="section">6.1 FFTW MPI Installation</h3>
|
||||
|
||||
<p>All of the FFTW MPI code is located in the <code>mpi</code> subdirectory of
|
||||
the FFTW package. On Unix systems, the FFTW MPI libraries and header
|
||||
files are automatically configured, compiled, and installed along with
|
||||
the uniprocessor FFTW libraries simply by including
|
||||
<code>--enable-mpi</code> in the flags to the <code>configure</code> script
|
||||
(see <a href="Installation-on-Unix.html">Installation on Unix</a>).
|
||||
<span id="index-configure-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Any implementation of the MPI standard, version 1 or later, should
|
||||
work with FFTW. The <code>configure</code> script will attempt to
|
||||
automatically detect how to compile and link code using your MPI
|
||||
implementation. In some cases, especially if you have multiple
|
||||
different MPI implementations installed or have an unusual MPI
|
||||
software package, you may need to provide this information explicitly.
|
||||
</p>
|
||||
<p>Most commonly, one compiles MPI code by invoking a special compiler
|
||||
command, typically <code>mpicc</code> for C code. The <code>configure</code>
|
||||
script knows the most common names for this command, but you can
|
||||
specify the MPI compilation command explicitly by setting the
|
||||
<code>MPICC</code> variable, as in ‘<samp>./configure MPICC=mpicc ...</samp>’.
|
||||
<span id="index-mpicc"></span>
|
||||
</p>
|
||||
|
||||
<p>If, instead of a special compiler command, you need to link a certain
|
||||
library, you can specify the link command via the <code>MPILIBS</code>
|
||||
variable, as in ‘<samp>./configure MPILIBS=-lmpi ...</samp>’. Note that if
|
||||
your MPI library is installed in a non-standard location (one the
|
||||
compiler does not know about by default), you may also have to specify
|
||||
the location of the library and header files via <code>LDFLAGS</code> and
|
||||
<code>CPPFLAGS</code> variables, respectively, as in ‘<samp>./configure
|
||||
LDFLAGS=-L/path/to/mpi/libs CPPFLAGS=-I/path/to/mpi/include ...</samp>’.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
104
fftw-3.3.10/doc/html/FFTW-MPI-Performance-Tips.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW MPI Performance Tips (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW MPI Performance Tips (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW MPI Performance Tips (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="Combining-MPI-and-Threads.html" rel="next" title="Combining MPI and Threads">
|
||||
<link href="Avoiding-MPI-Deadlocks.html" rel="prev" title="Avoiding MPI Deadlocks">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-MPI-Performance-Tips"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Combining-MPI-and-Threads.html" accesskey="n" rel="next">Combining MPI and Threads</a>, Previous: <a href="Avoiding-MPI-Deadlocks.html" accesskey="p" rel="prev">Avoiding MPI Deadlocks</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-MPI-Performance-Tips-1"></span><h3 class="section">6.10 FFTW MPI Performance Tips</h3>
|
||||
|
||||
<p>In this section, we collect a few tips on getting the best performance
|
||||
out of FFTW’s MPI transforms.
|
||||
</p>
|
||||
<p>First, because of the 1d block distribution, FFTW’s parallelization is
|
||||
currently limited by the size of the first dimension.
|
||||
(Multidimensional block distributions may be supported by a future
|
||||
version.) More generally, you should ideally arrange the dimensions so
|
||||
that FFTW can divide them equally among the processes. See <a href="Load-balancing.html">Load balancing</a>.
|
||||
<span id="index-block-distribution-2"></span>
|
||||
<span id="index-load-balancing-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Second, if it is not too inconvenient, you should consider working
|
||||
with transposed output for multidimensional plans, as this saves a
|
||||
considerable amount of communications. See <a href="Transposed-distributions.html">Transposed distributions</a>.
|
||||
<span id="index-transpose-3"></span>
|
||||
</p>
|
||||
|
||||
<p>Third, the fastest choices are generally either an in-place transform
|
||||
or an out-of-place transform with the <code>FFTW_DESTROY_INPUT</code> flag
|
||||
(which allows the input array to be used as scratch space). In-place
|
||||
is especially beneficial if the amount of data per process is large.
|
||||
<span id="index-FFTW_005fDESTROY_005fINPUT-1"></span>
|
||||
</p>
|
||||
|
||||
<p>Fourth, if you have multiple arrays to transform at once, rather than
|
||||
calling FFTW’s MPI transforms several times it usually seems to be
|
||||
faster to interleave the data and use the advanced interface. (This
|
||||
groups the communications together instead of requiring separate
|
||||
messages for each transform.)
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
92
fftw-3.3.10/doc/html/FFTW-MPI-Reference.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW MPI Reference (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW MPI Reference (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW MPI Reference (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="MPI-Files-and-Data-Types.html" rel="next" title="MPI Files and Data Types">
|
||||
<link href="Combining-MPI-and-Threads.html" rel="prev" title="Combining MPI and Threads">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-MPI-Reference"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-MPI-Fortran-Interface.html" accesskey="n" rel="next">FFTW MPI Fortran Interface</a>, Previous: <a href="Combining-MPI-and-Threads.html" accesskey="p" rel="prev">Combining MPI and Threads</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-MPI-Reference-1"></span><h3 class="section">6.12 FFTW MPI Reference</h3>
|
||||
|
||||
<p>This chapter provides a complete reference to all FFTW MPI functions,
|
||||
datatypes, and constants. See also <a href="FFTW-Reference.html">FFTW Reference</a> for information
|
||||
on functions and types in common with the serial interface.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="MPI-Files-and-Data-Types.html" accesskey="1">MPI Files and Data Types</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="MPI-Initialization.html" accesskey="2">MPI Initialization</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Using-MPI-Plans.html" accesskey="3">Using MPI Plans</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="MPI-Data-Distribution-Functions.html" accesskey="4">MPI Data Distribution Functions</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="MPI-Plan-Creation.html" accesskey="5">MPI Plan Creation</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="MPI-Wisdom-Communication.html" accesskey="6">MPI Wisdom Communication</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
92
fftw-3.3.10/doc/html/FFTW-MPI-Transposes.html
Normal file
@@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW MPI Transposes (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW MPI Transposes (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW MPI Transposes (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="Basic-distributed_002dtranspose-interface.html" rel="next" title="Basic distributed-transpose interface">
|
||||
<link href="Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html" rel="prev" title="Other Multi-dimensional Real-data MPI Transforms">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-MPI-Transposes"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-MPI-Wisdom.html" accesskey="n" rel="next">FFTW MPI Wisdom</a>, Previous: <a href="Other-Multi_002ddimensional-Real_002ddata-MPI-Transforms.html" accesskey="p" rel="prev">Other Multi-dimensional Real-data MPI Transforms</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-MPI-Transposes-1"></span><h3 class="section">6.7 FFTW MPI Transposes</h3>
|
||||
<span id="index-transpose-2"></span>
|
||||
|
||||
<p>The FFTW’s MPI Fourier transforms rely on one or more <em>global
|
||||
transposition</em> step for their communications. For example, the
|
||||
multidimensional transforms work by transforming along some
|
||||
dimensions, then transposing to make the first dimension local and
|
||||
transforming that, then transposing back. Because global
|
||||
transposition of a block-distributed matrix has many other potential
|
||||
uses besides FFTs, FFTW’s transpose routines can be called directly,
|
||||
as documented in this section.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Basic-distributed_002dtranspose-interface.html" accesskey="1">Basic distributed-transpose interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Advanced-distributed_002dtranspose-interface.html" accesskey="2">Advanced distributed-transpose interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="An-improved-replacement-for-MPI_005fAlltoall.html" accesskey="3">An improved replacement for MPI_Alltoall</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
171
fftw-3.3.10/doc/html/FFTW-MPI-Wisdom.html
Normal file
@@ -0,0 +1,171 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW MPI Wisdom (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW MPI Wisdom (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW MPI Wisdom (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Distributed_002dmemory-FFTW-with-MPI.html" rel="up" title="Distributed-memory FFTW with MPI">
|
||||
<link href="Avoiding-MPI-Deadlocks.html" rel="next" title="Avoiding MPI Deadlocks">
|
||||
<link href="An-improved-replacement-for-MPI_005fAlltoall.html" rel="prev" title="An improved replacement for MPI_Alltoall">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-MPI-Wisdom"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Avoiding-MPI-Deadlocks.html" accesskey="n" rel="next">Avoiding MPI Deadlocks</a>, Previous: <a href="FFTW-MPI-Transposes.html" accesskey="p" rel="prev">FFTW MPI Transposes</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-MPI-Wisdom-1"></span><h3 class="section">6.8 FFTW MPI Wisdom</h3>
|
||||
<span id="index-wisdom-2"></span>
|
||||
<span id="index-saving-plans-to-disk-2"></span>
|
||||
|
||||
<p>FFTW’s “wisdom” facility (see <a href="Words-of-Wisdom_002dSaving-Plans.html">Words of Wisdom-Saving Plans</a>) can
|
||||
be used to save MPI plans as well as to save uniprocessor plans.
|
||||
However, for MPI there are several unavoidable complications.
|
||||
</p>
|
||||
<span id="index-MPI-I_002fO-1"></span>
|
||||
<p>First, the MPI standard does not guarantee that every process can
|
||||
perform file I/O (at least, not using C stdio routines)—in general,
|
||||
we may only assume that process 0 is capable of I/O.<a id="DOCF7" href="#FOOT7"><sup>7</sup></a> So, if we
|
||||
want to export the wisdom from a single process to a file, we must
|
||||
first export the wisdom to a string, then send it to process 0, then
|
||||
write it to a file.
|
||||
</p>
|
||||
<p>Second, in principle we may want to have separate wisdom for every
|
||||
process, since in general the processes may run on different hardware
|
||||
even for a single MPI program. However, in practice FFTW’s MPI code
|
||||
is designed for the case of homogeneous hardware (see <a href="Load-balancing.html">Load balancing</a>), and in this case it is convenient to use the same wisdom
|
||||
for every process. Thus, we need a mechanism to synchronize the wisdom.
|
||||
</p>
|
||||
<p>To address both of these problems, FFTW provides the following two
|
||||
functions:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">void fftw_mpi_broadcast_wisdom(MPI_Comm comm);
|
||||
void fftw_mpi_gather_wisdom(MPI_Comm comm);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fmpi_005fgather_005fwisdom"></span>
|
||||
<span id="index-fftw_005fmpi_005fbroadcast_005fwisdom"></span>
|
||||
|
||||
<p>Given a communicator <code>comm</code>, <code>fftw_mpi_broadcast_wisdom</code>
|
||||
will broadcast the wisdom from process 0 to all other processes.
|
||||
Conversely, <code>fftw_mpi_gather_wisdom</code> will collect wisdom from all
|
||||
processes onto process 0. (If the plans created for the same problem
|
||||
by different processes are not the same, <code>fftw_mpi_gather_wisdom</code>
|
||||
will arbitrarily choose one of the plans.) Both of these functions
|
||||
may result in suboptimal plans for different processes if the
|
||||
processes are running on non-identical hardware. Both of these
|
||||
functions are <em>collective</em> calls, which means that they must be
|
||||
executed by all processes in the communicator.
|
||||
<span id="index-collective-function-1"></span>
|
||||
</p>
|
||||
|
||||
<p>So, for example, a typical code snippet to import wisdom from a file
|
||||
and use it on all processes would be:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">{
|
||||
int rank;
|
||||
|
||||
fftw_mpi_init();
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
if (rank == 0) fftw_import_wisdom_from_filename("mywisdom");
|
||||
fftw_mpi_broadcast_wisdom(MPI_COMM_WORLD);
|
||||
}
|
||||
</pre></div>
|
||||
|
||||
<p>(Note that we must call <code>fftw_mpi_init</code> before importing any
|
||||
wisdom that might contain MPI plans.) Similarly, a typical code
|
||||
snippet to export wisdom from all processes to a file is:
|
||||
<span id="index-fftw_005fmpi_005finit-2"></span>
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">{
|
||||
int rank;
|
||||
|
||||
fftw_mpi_gather_wisdom(MPI_COMM_WORLD);
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
if (rank == 0) fftw_export_wisdom_to_filename("mywisdom");
|
||||
}
|
||||
</pre></div>
|
||||
|
||||
<div class="footnote">
|
||||
<hr>
|
||||
<h4 class="footnotes-heading">Footnotes</h4>
|
||||
|
||||
<h5><a id="FOOT7" href="#DOCF7">(7)</a></h3>
|
||||
<p>In fact,
|
||||
even this assumption is not technically guaranteed by the standard,
|
||||
although it seems to be universal in actual MPI implementations and is
|
||||
widely assumed by MPI-using software. Technically, you need to query
|
||||
the <code>MPI_IO</code> attribute of <code>MPI_COMM_WORLD</code> with
|
||||
<code>MPI_Attr_get</code>. If this attribute is <code>MPI_PROC_NULL</code>, no
|
||||
I/O is possible. If it is <code>MPI_ANY_SOURCE</code>, any process can
|
||||
perform I/O. Otherwise, it is the rank of a process that can perform
|
||||
I/O ... but since it is not guaranteed to yield the <em>same</em> rank
|
||||
on all processes, you have to do an <code>MPI_Allreduce</code> of some kind
|
||||
if you want all processes to agree about which is going to do I/O.
|
||||
And even then, the standard only guarantees that this process can
|
||||
perform output, but not input. See e.g. <cite>Parallel Programming
|
||||
with MPI</cite> by P. S. Pacheco, section 8.1.3. Needless to say, in our
|
||||
experience virtually no MPI programmers worry about this.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Avoiding-MPI-Deadlocks.html" accesskey="n" rel="next">Avoiding MPI Deadlocks</a>, Previous: <a href="FFTW-MPI-Transposes.html" accesskey="p" rel="prev">FFTW MPI Transposes</a>, Up: <a href="Distributed_002dmemory-FFTW-with-MPI.html" accesskey="u" rel="up">Distributed-memory FFTW with MPI</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
96
fftw-3.3.10/doc/html/FFTW-Reference.html
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>FFTW Reference (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="FFTW Reference (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="FFTW Reference (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="Data-Types-and-Files.html" rel="next" title="Data Types and Files">
|
||||
<link href="Caveats-in-Using-Wisdom.html" rel="prev" title="Caveats in Using Wisdom">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="FFTW-Reference"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Multi_002dthreaded-FFTW.html" accesskey="n" rel="next">Multi-threaded FFTW</a>, Previous: <a href="Other-Important-Topics.html" accesskey="p" rel="prev">Other Important Topics</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="FFTW-Reference-1"></span><h2 class="chapter">4 FFTW Reference</h2>
|
||||
|
||||
<p>This chapter provides a complete reference for all sequential (i.e.,
|
||||
one-processor) FFTW functions. Parallel transforms are described in
|
||||
later chapters.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Data-Types-and-Files.html" accesskey="1">Data Types and Files</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Using-Plans.html" accesskey="2">Using Plans</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Basic-Interface.html" accesskey="3">Basic Interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Advanced-Interface.html" accesskey="4">Advanced Interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Guru-Interface.html" accesskey="5">Guru Interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="New_002darray-Execute-Functions.html" accesskey="6">New-array Execute Functions</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Wisdom.html" accesskey="7">Wisdom</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="What-FFTW-Really-Computes.html" accesskey="8">What FFTW Really Computes</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
104
fftw-3.3.10/doc/html/Fixed_002dsize-Arrays-in-C.html
Normal file
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Fixed-size Arrays in C (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Fixed-size Arrays in C (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Fixed-size Arrays in C (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Multi_002ddimensional-Array-Format.html" rel="up" title="Multi-dimensional Array Format">
|
||||
<link href="Dynamic-Arrays-in-C.html" rel="next" title="Dynamic Arrays in C">
|
||||
<link href="Column_002dmajor-Format.html" rel="prev" title="Column-major Format">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Fixed_002dsize-Arrays-in-C"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Dynamic-Arrays-in-C.html" accesskey="n" rel="next">Dynamic Arrays in C</a>, Previous: <a href="Column_002dmajor-Format.html" accesskey="p" rel="prev">Column-major Format</a>, Up: <a href="Multi_002ddimensional-Array-Format.html" accesskey="u" rel="up">Multi-dimensional Array Format</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Fixed_002dsize-Arrays-in-C-1"></span><h4 class="subsection">3.2.3 Fixed-size Arrays in C</h4>
|
||||
<span id="index-C-multi_002ddimensional-arrays"></span>
|
||||
|
||||
<p>A multi-dimensional array whose size is declared at compile time in C
|
||||
is <em>already</em> in row-major order. You don’t have to do anything
|
||||
special to transform it. For example:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">{
|
||||
fftw_complex data[N0][N1][N2];
|
||||
fftw_plan plan;
|
||||
...
|
||||
plan = fftw_plan_dft_3d(N0, N1, N2, &data[0][0][0], &data[0][0][0],
|
||||
FFTW_FORWARD, FFTW_ESTIMATE);
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
|
||||
<p>This will plan a 3d in-place transform of size <code>N0 x N1 x N2</code>.
|
||||
Notice how we took the address of the zero-th element to pass to the
|
||||
planner (we could also have used a typecast).
|
||||
</p>
|
||||
<p>However, we tend to <em>discourage</em> users from declaring their
|
||||
arrays in this way, for two reasons. First, this allocates the array
|
||||
on the stack (“automatic” storage), which has a very limited size on
|
||||
most operating systems (declaring an array with more than a few
|
||||
thousand elements will often cause a crash). (You can get around this
|
||||
limitation on many systems by declaring the array as
|
||||
<code>static</code> and/or global, but that has its own drawbacks.)
|
||||
Second, it may not optimally align the array for use with a SIMD
|
||||
FFTW (see <a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a>). Instead, we recommend
|
||||
using <code>fftw_malloc</code>, as described below.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
82
fftw-3.3.10/doc/html/Forgetting-Wisdom.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Forgetting Wisdom (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Forgetting Wisdom (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Forgetting Wisdom (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Wisdom.html" rel="up" title="Wisdom">
|
||||
<link href="Wisdom-Utilities.html" rel="next" title="Wisdom Utilities">
|
||||
<link href="Wisdom-Import.html" rel="prev" title="Wisdom Import">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Forgetting-Wisdom"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Wisdom-Utilities.html" accesskey="n" rel="next">Wisdom Utilities</a>, Previous: <a href="Wisdom-Import.html" accesskey="p" rel="prev">Wisdom Import</a>, Up: <a href="Wisdom.html" accesskey="u" rel="up">Wisdom</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Forgetting-Wisdom-1"></span><h4 class="subsection">4.7.3 Forgetting Wisdom</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">void fftw_forget_wisdom(void);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fforget_005fwisdom-1"></span>
|
||||
|
||||
<p>Calling <code>fftw_forget_wisdom</code> causes all accumulated <code>wisdom</code>
|
||||
to be discarded and its associated memory to be freed. (New
|
||||
<code>wisdom</code> can still be gathered subsequently, however.)
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
200
fftw-3.3.10/doc/html/Fortran-Examples.html
Normal file
@@ -0,0 +1,200 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Fortran Examples (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Fortran Examples (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Fortran Examples (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Legacy-Fortran.html" rel="up" title="Calling FFTW from Legacy Fortran">
|
||||
<link href="Wisdom-of-Fortran_003f.html" rel="next" title="Wisdom of Fortran?">
|
||||
<link href="FFTW-Execution-in-Fortran.html" rel="prev" title="FFTW Execution in Fortran">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Fortran-Examples"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Wisdom-of-Fortran_003f.html" accesskey="n" rel="next">Wisdom of Fortran?</a>, Previous: <a href="FFTW-Execution-in-Fortran.html" accesskey="p" rel="prev">FFTW Execution in Fortran</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Fortran-Examples-1"></span><h3 class="section">8.4 Fortran Examples</h3>
|
||||
|
||||
<p>In C, you might have something like the following to transform a
|
||||
one-dimensional complex array:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> fftw_complex in[N], out[N];
|
||||
fftw_plan plan;
|
||||
|
||||
plan = fftw_plan_dft_1d(N,in,out,FFTW_FORWARD,FFTW_ESTIMATE);
|
||||
fftw_execute(plan);
|
||||
fftw_destroy_plan(plan);
|
||||
</pre></div>
|
||||
|
||||
<p>In Fortran, you would use the following to accomplish the same thing:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> double complex in, out
|
||||
dimension in(N), out(N)
|
||||
integer*8 plan
|
||||
|
||||
call dfftw_plan_dft_1d(plan,N,in,out,FFTW_FORWARD,FFTW_ESTIMATE)
|
||||
call dfftw_execute_dft(plan, in, out)
|
||||
call dfftw_destroy_plan(plan)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fplan_005fdft_005f1d"></span>
|
||||
<span id="index-dfftw_005fexecute_005fdft-1"></span>
|
||||
<span id="index-dfftw_005fdestroy_005fplan"></span>
|
||||
|
||||
<p>Notice how all routines are called as Fortran subroutines, and the
|
||||
plan is returned via the first argument to <code>dfftw_plan_dft_1d</code>.
|
||||
Notice also that we changed <code>fftw_execute</code> to
|
||||
<code>dfftw_execute_dft</code> (see <a href="FFTW-Execution-in-Fortran.html">FFTW Execution in Fortran</a>). To do
|
||||
the same thing, but using 8 threads in parallel (see <a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a>), you would simply prefix these calls with:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> integer iret
|
||||
call dfftw_init_threads(iret)
|
||||
call dfftw_plan_with_nthreads(8)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005finit_005fthreads"></span>
|
||||
<span id="index-dfftw_005fplan_005fwith_005fnthreads"></span>
|
||||
|
||||
<p>(You might want to check the value of <code>iret</code>: if it is zero, it
|
||||
indicates an unlikely error during thread initialization.)
|
||||
</p>
|
||||
<p>To check the number of threads currently being used by the planner, you
|
||||
can do the following:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> integer iret
|
||||
call dfftw_planner_nthreads(iret)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fplanner_005fnthreads"></span>
|
||||
|
||||
<p>To transform a three-dimensional array in-place with C, you might do:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> fftw_complex arr[L][M][N];
|
||||
fftw_plan plan;
|
||||
|
||||
plan = fftw_plan_dft_3d(L,M,N, arr,arr,
|
||||
FFTW_FORWARD, FFTW_ESTIMATE);
|
||||
fftw_execute(plan);
|
||||
fftw_destroy_plan(plan);
|
||||
</pre></div>
|
||||
|
||||
<p>In Fortran, you would use this instead:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> double complex arr
|
||||
dimension arr(L,M,N)
|
||||
integer*8 plan
|
||||
|
||||
call dfftw_plan_dft_3d(plan, L,M,N, arr,arr,
|
||||
& FFTW_FORWARD, FFTW_ESTIMATE)
|
||||
call dfftw_execute_dft(plan, arr, arr)
|
||||
call dfftw_destroy_plan(plan)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fplan_005fdft_005f3d"></span>
|
||||
|
||||
<p>Note that we pass the array dimensions in the “natural” order in both C
|
||||
and Fortran.
|
||||
</p>
|
||||
<p>To transform a one-dimensional real array in Fortran, you might do:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> double precision in
|
||||
dimension in(N)
|
||||
double complex out
|
||||
dimension out(N/2 + 1)
|
||||
integer*8 plan
|
||||
|
||||
call dfftw_plan_dft_r2c_1d(plan,N,in,out,FFTW_ESTIMATE)
|
||||
call dfftw_execute_dft_r2c(plan, in, out)
|
||||
call dfftw_destroy_plan(plan)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fplan_005fdft_005fr2c_005f1d"></span>
|
||||
<span id="index-dfftw_005fexecute_005fdft_005fr2c"></span>
|
||||
|
||||
<p>To transform a two-dimensional real array, out of place, you might use
|
||||
the following:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example"> double precision in
|
||||
dimension in(M,N)
|
||||
double complex out
|
||||
dimension out(M/2 + 1, N)
|
||||
integer*8 plan
|
||||
|
||||
call dfftw_plan_dft_r2c_2d(plan,M,N,in,out,FFTW_ESTIMATE)
|
||||
call dfftw_execute_dft_r2c(plan, in, out)
|
||||
call dfftw_destroy_plan(plan)
|
||||
</pre></div>
|
||||
<span id="index-dfftw_005fplan_005fdft_005fr2c_005f2d"></span>
|
||||
|
||||
<p><strong>Important:</strong> Notice that it is the <em>first</em> dimension of the
|
||||
complex output array that is cut in half in Fortran, rather than the
|
||||
last dimension as in C. This is a consequence of the interface routines
|
||||
reversing the order of the array dimensions passed to FFTW so that the
|
||||
Fortran program can use its ordinary column-major order.
|
||||
<span id="index-column_002dmajor-3"></span>
|
||||
<span id="index-r2c_002fc2r-multi_002ddimensional-array-format-3"></span>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Wisdom-of-Fortran_003f.html" accesskey="n" rel="next">Wisdom of Fortran?</a>, Previous: <a href="FFTW-Execution-in-Fortran.html" accesskey="p" rel="prev">FFTW Execution in Fortran</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
162
fftw-3.3.10/doc/html/Fortran_002dinterface-routines.html
Normal file
@@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Fortran-interface routines (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Fortran-interface routines (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Fortran-interface routines (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Calling-FFTW-from-Legacy-Fortran.html" rel="up" title="Calling FFTW from Legacy Fortran">
|
||||
<link href="FFTW-Constants-in-Fortran.html" rel="next" title="FFTW Constants in Fortran">
|
||||
<link href="Calling-FFTW-from-Legacy-Fortran.html" rel="prev" title="Calling FFTW from Legacy Fortran">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Fortran_002dinterface-routines"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-Constants-in-Fortran.html" accesskey="n" rel="next">FFTW Constants in Fortran</a>, Previous: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="p" rel="prev">Calling FFTW from Legacy Fortran</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Fortran_002dinterface-routines-1"></span><h3 class="section">8.1 Fortran-interface routines</h3>
|
||||
|
||||
<p>Nearly all of the FFTW functions have Fortran-callable equivalents.
|
||||
The name of the legacy Fortran routine is the same as that of the
|
||||
corresponding C routine, but with the ‘<samp>fftw_</samp>’ prefix replaced by
|
||||
‘<samp>dfftw_</samp>’.<a id="DOCF9" href="#FOOT9"><sup>9</sup></a> The single and long-double precision
|
||||
versions use ‘<samp>sfftw_</samp>’ and ‘<samp>lfftw_</samp>’, respectively, instead of
|
||||
‘<samp>fftwf_</samp>’ and ‘<samp>fftwl_</samp>’; quadruple precision (<code>real*16</code>)
|
||||
is available on some systems as ‘<samp>fftwq_</samp>’ (see <a href="Precision.html">Precision</a>).
|
||||
(Note that <code>long double</code> on x86 hardware is usually at most
|
||||
80-bit extended precision, <em>not</em> quadruple precision.)
|
||||
</p>
|
||||
<p>For the most part, all of the arguments to the functions are the same,
|
||||
with the following exceptions:
|
||||
</p>
|
||||
<ul>
|
||||
<li> <code>plan</code> variables (what would be of type <code>fftw_plan</code> in C),
|
||||
must be declared as a type that is at least as big as a pointer
|
||||
(address) on your machine. We recommend using <code>integer*8</code> everywhere,
|
||||
since this should always be big enough.
|
||||
<span id="index-portability-6"></span>
|
||||
|
||||
</li><li> Any function that returns a value (e.g. <code>fftw_plan_dft</code>) is
|
||||
converted into a <em>subroutine</em>. The return value is converted into
|
||||
an additional <em>first</em> parameter of this subroutine.<a id="DOCF10" href="#FOOT10"><sup>10</sup></a>
|
||||
|
||||
</li><li> <span id="index-column_002dmajor-2"></span>
|
||||
The Fortran routines expect multi-dimensional arrays to be in
|
||||
<em>column-major</em> order, which is the ordinary format of Fortran
|
||||
arrays (see <a href="Multi_002ddimensional-Array-Format.html">Multi-dimensional Array Format</a>). They do this
|
||||
transparently and costlessly simply by reversing the order of the
|
||||
dimensions passed to FFTW, but this has one important consequence for
|
||||
multi-dimensional real-complex transforms, discussed below.
|
||||
|
||||
</li><li> Wisdom import and export is somewhat more tricky because one cannot
|
||||
easily pass files or strings between C and Fortran; see <a href="Wisdom-of-Fortran_003f.html">Wisdom of Fortran?</a>.
|
||||
|
||||
</li><li> Legacy Fortran cannot use the <code>fftw_malloc</code> dynamic-allocation routine.
|
||||
If you want to exploit the SIMD FFTW (see <a href="SIMD-alignment-and-fftw_005fmalloc.html">SIMD alignment and fftw_malloc</a>), you’ll
|
||||
need to figure out some other way to ensure that your arrays are at
|
||||
least 16-byte aligned.
|
||||
|
||||
</li><li> <span id="index-fftw_005fiodim-2"></span>
|
||||
<span id="index-guru-interface-4"></span>
|
||||
Since Fortran 77 does not have data structures, the <code>fftw_iodim</code>
|
||||
structure from the guru interface (see <a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a>) must be split into separate arguments. In particular, any
|
||||
<code>fftw_iodim</code> array arguments in the C guru interface become three
|
||||
integer array arguments (<code>n</code>, <code>is</code>, and <code>os</code>) in the
|
||||
Fortran guru interface, all of whose lengths should be equal to the
|
||||
corresponding <code>rank</code> argument.
|
||||
|
||||
</li><li> The guru planner interface in Fortran does <em>not</em> do any automatic
|
||||
translation between column-major and row-major; you are responsible
|
||||
for setting the strides etcetera to correspond to your Fortran arrays.
|
||||
However, as a slight bug that we are preserving for backwards
|
||||
compatibility, the ‘<samp>plan_guru_r2r</samp>’ in Fortran <em>does</em> reverse the
|
||||
order of its <code>kind</code> array parameter, so the <code>kind</code> array
|
||||
of that routine should be in the reverse of the order of the iodim
|
||||
arrays (see above).
|
||||
|
||||
</li></ul>
|
||||
|
||||
<p>In general, you should take care to use Fortran data types that
|
||||
correspond to (i.e. are the same size as) the C types used by FFTW.
|
||||
In practice, this correspondence is usually straightforward
|
||||
(i.e. <code>integer</code> corresponds to <code>int</code>, <code>real</code>
|
||||
corresponds to <code>float</code>, etcetera). The native Fortran
|
||||
double/single-precision complex type should be compatible with
|
||||
<code>fftw_complex</code>/<code>fftwf_complex</code>. Such simple correspondences
|
||||
are assumed in the examples below.
|
||||
<span id="index-portability-7"></span>
|
||||
</p>
|
||||
<div class="footnote">
|
||||
<hr>
|
||||
<h4 class="footnotes-heading">Footnotes</h4>
|
||||
|
||||
<h5><a id="FOOT9" href="#DOCF9">(9)</a></h3>
|
||||
<p>Technically, Fortran 77 identifiers are not
|
||||
allowed to have more than 6 characters, nor may they contain
|
||||
underscores. Any compiler that enforces this limitation doesn’t
|
||||
deserve to link to FFTW.</p>
|
||||
<h5><a id="FOOT10" href="#DOCF10">(10)</a></h3>
|
||||
<p>The
|
||||
reason for this is that some Fortran implementations seem to have
|
||||
trouble with C function return values, and vice versa.</p>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="FFTW-Constants-in-Fortran.html" accesskey="n" rel="next">FFTW Constants in Fortran</a>, Previous: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="p" rel="prev">Calling FFTW from Legacy Fortran</a>, Up: <a href="Calling-FFTW-from-Legacy-Fortran.html" accesskey="u" rel="up">Calling FFTW from Legacy Fortran</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
119
fftw-3.3.10/doc/html/Generating-your-own-code.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Generating your own code (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Generating your own code (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Generating your own code (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Installation-and-Customization.html" rel="up" title="Installation and Customization">
|
||||
<link href="Acknowledgments.html" rel="next" title="Acknowledgments">
|
||||
<link href="Cycle-Counters.html" rel="prev" title="Cycle Counters">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Generating-your-own-code"></span><div class="header">
|
||||
<p>
|
||||
Previous: <a href="Cycle-Counters.html" accesskey="p" rel="prev">Cycle Counters</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Generating-your-own-code-1"></span><h3 class="section">10.4 Generating your own code</h3>
|
||||
<span id="index-code-generator-1"></span>
|
||||
|
||||
<p>The directory <code>genfft</code> contains the programs that were used to
|
||||
generate FFTW’s “codelets,” which are hard-coded transforms of small
|
||||
sizes.
|
||||
<span id="index-codelet-2"></span>
|
||||
We do not expect casual users to employ the generator, which is a rather
|
||||
sophisticated program that generates directed acyclic graphs of FFT
|
||||
algorithms and performs algebraic simplifications on them. It was
|
||||
written in Objective Caml, a dialect of ML, which is available at
|
||||
<a href="http://caml.inria.fr/ocaml/index.en.html">http://caml.inria.fr/ocaml/index.en.html</a>.
|
||||
<span id="index-Caml"></span>
|
||||
</p>
|
||||
|
||||
<p>If you have Objective Caml installed (along with recent versions of
|
||||
GNU <code>autoconf</code>, <code>automake</code>, and <code>libtool</code>), then you
|
||||
can change the set of codelets that are generated or play with the
|
||||
generation options. The set of generated codelets is specified by the
|
||||
<code>{dft,rdft}/{codelets,simd}/*/Makefile.am</code> files. For example, you can add
|
||||
efficient REDFT codelets of small sizes by modifying
|
||||
<code>rdft/codelets/r2r/Makefile.am</code>.
|
||||
<span id="index-REDFT-2"></span>
|
||||
After you modify any <code>Makefile.am</code> files, you can type <code>sh
|
||||
bootstrap.sh</code> in the top-level directory followed by <code>make</code> to
|
||||
re-generate the files.
|
||||
</p>
|
||||
<p>We do not provide more details about the code-generation process, since
|
||||
we do not expect that most users will need to generate their own code.
|
||||
However, feel free to contact us at <a href="mailto:fftw@fftw.org">fftw@fftw.org</a> if
|
||||
you are interested in the subject.
|
||||
</p>
|
||||
<span id="index-monadic-programming"></span>
|
||||
<p>You might find it interesting to learn Caml and/or some modern
|
||||
programming techniques that we used in the generator (including monadic
|
||||
programming), especially if you heard the rumor that Java and
|
||||
object-oriented programming are the latest advancement in the field.
|
||||
The internal operation of the codelet generator is described in the
|
||||
paper, “A Fast Fourier Transform Compiler,” by M. Frigo, which is
|
||||
available from the <a href="http://www.fftw.org">FFTW home page</a> and also
|
||||
appeared in the <cite>Proceedings of the 1999 ACM SIGPLAN Conference on
|
||||
Programming Language Design and Implementation (PLDI)</cite>.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Previous: <a href="Cycle-Counters.html" accesskey="p" rel="prev">Cycle Counters</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
149
fftw-3.3.10/doc/html/Guru-Complex-DFTs.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Guru Complex DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Guru Complex DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Guru Complex DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Guru-Interface.html" rel="up" title="Guru Interface">
|
||||
<link href="Guru-Real_002ddata-DFTs.html" rel="next" title="Guru Real-data DFTs">
|
||||
<link href="Guru-vector-and-transform-sizes.html" rel="prev" title="Guru vector and transform sizes">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Guru-Complex-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Real_002ddata-DFTs.html" accesskey="n" rel="next">Guru Real-data DFTs</a>, Previous: <a href="Guru-vector-and-transform-sizes.html" accesskey="p" rel="prev">Guru vector and transform sizes</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Guru-Complex-DFTs-1"></span><h4 class="subsection">4.5.3 Guru Complex DFTs</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_guru_dft(
|
||||
int rank, const fftw_iodim *dims,
|
||||
int howmany_rank, const fftw_iodim *howmany_dims,
|
||||
fftw_complex *in, fftw_complex *out,
|
||||
int sign, unsigned flags);
|
||||
|
||||
fftw_plan fftw_plan_guru_split_dft(
|
||||
int rank, const fftw_iodim *dims,
|
||||
int howmany_rank, const fftw_iodim *howmany_dims,
|
||||
double *ri, double *ii, double *ro, double *io,
|
||||
unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fguru_005fdft"></span>
|
||||
<span id="index-fftw_005fplan_005fguru_005fsplit_005fdft"></span>
|
||||
|
||||
<p>These two functions plan a complex-data, multi-dimensional DFT
|
||||
for the interleaved and split format, respectively.
|
||||
Transform dimensions are given by (<code>rank</code>, <code>dims</code>) over a
|
||||
multi-dimensional vector (loop) of dimensions (<code>howmany_rank</code>,
|
||||
<code>howmany_dims</code>). <code>dims</code> and <code>howmany_dims</code> should point
|
||||
to <code>fftw_iodim</code> arrays of length <code>rank</code> and
|
||||
<code>howmany_rank</code>, respectively.
|
||||
</p>
|
||||
<span id="index-flags-5"></span>
|
||||
<p><code>flags</code> is a bitwise OR (‘<samp>|</samp>’) of zero or more planner flags,
|
||||
as defined in <a href="Planner-Flags.html">Planner Flags</a>.
|
||||
</p>
|
||||
<p>In the <code>fftw_plan_guru_dft</code> function, the pointers <code>in</code> and
|
||||
<code>out</code> point to the interleaved input and output arrays,
|
||||
respectively. The sign can be either <em>-1</em> (=
|
||||
<code>FFTW_FORWARD</code>) or <em>+1</em> (= <code>FFTW_BACKWARD</code>). If the
|
||||
pointers are equal, the transform is in-place.
|
||||
</p>
|
||||
<p>In the <code>fftw_plan_guru_split_dft</code> function,
|
||||
<code>ri</code> and <code>ii</code> point to the real and imaginary input arrays,
|
||||
and <code>ro</code> and <code>io</code> point to the real and imaginary output
|
||||
arrays. The input and output pointers may be the same, indicating an
|
||||
in-place transform. For example, for <code>fftw_complex</code> pointers
|
||||
<code>in</code> and <code>out</code>, the corresponding parameters are:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">ri = (double *) in;
|
||||
ii = (double *) in + 1;
|
||||
ro = (double *) out;
|
||||
io = (double *) out + 1;
|
||||
</pre></div>
|
||||
|
||||
<p>Because <code>fftw_plan_guru_split_dft</code> accepts split arrays, strides
|
||||
are expressed in units of <code>double</code>. For a contiguous
|
||||
<code>fftw_complex</code> array, the overall stride of the transform should
|
||||
be 2, the distance between consecutive real parts or between
|
||||
consecutive imaginary parts; see <a href="Guru-vector-and-transform-sizes.html">Guru vector and transform sizes</a>. Note that the dimension strides are applied equally to the
|
||||
real and imaginary parts; real and imaginary arrays with different
|
||||
strides are not supported.
|
||||
</p>
|
||||
<p>There is no <code>sign</code> parameter in <code>fftw_plan_guru_split_dft</code>.
|
||||
This function always plans for an <code>FFTW_FORWARD</code> transform. To
|
||||
plan for an <code>FFTW_BACKWARD</code> transform, you can exploit the
|
||||
identity that the backwards DFT is equal to the forwards DFT with the
|
||||
real and imaginary parts swapped. For example, in the case of the
|
||||
<code>fftw_complex</code> arrays above, the <code>FFTW_BACKWARD</code> transform
|
||||
is computed by the parameters:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">ri = (double *) in + 1;
|
||||
ii = (double *) in;
|
||||
ro = (double *) out + 1;
|
||||
io = (double *) out;
|
||||
</pre></div>
|
||||
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Real_002ddata-DFTs.html" accesskey="n" rel="next">Guru Real-data DFTs</a>, Previous: <a href="Guru-vector-and-transform-sizes.html" accesskey="p" rel="prev">Guru vector and transform sizes</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
102
fftw-3.3.10/doc/html/Guru-Interface.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Guru Interface (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Guru Interface (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Guru Interface (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="FFTW-Reference.html" rel="up" title="FFTW Reference">
|
||||
<link href="Interleaved-and-split-arrays.html" rel="next" title="Interleaved and split arrays">
|
||||
<link href="Advanced-Real_002dto_002dreal-Transforms.html" rel="prev" title="Advanced Real-to-real Transforms">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Guru-Interface"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="New_002darray-Execute-Functions.html" accesskey="n" rel="next">New-array Execute Functions</a>, Previous: <a href="Advanced-Interface.html" accesskey="p" rel="prev">Advanced Interface</a>, Up: <a href="FFTW-Reference.html" accesskey="u" rel="up">FFTW Reference</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Guru-Interface-1"></span><h3 class="section">4.5 Guru Interface</h3>
|
||||
<span id="index-guru-interface-2"></span>
|
||||
|
||||
<p>The “guru” interface to FFTW is intended to expose as much as possible
|
||||
of the flexibility in the underlying FFTW architecture. It allows one
|
||||
to compute multi-dimensional “vectors” (loops) of multi-dimensional
|
||||
transforms, where each vector/transform dimension has an independent
|
||||
size and stride.
|
||||
<span id="index-vector"></span>
|
||||
One can also use more general complex-number formats, e.g. separate real
|
||||
and imaginary arrays.
|
||||
</p>
|
||||
<p>For those users who require the flexibility of the guru interface, it is
|
||||
important that they pay special attention to the documentation lest they
|
||||
shoot themselves in the foot.
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Interleaved-and-split-arrays.html" accesskey="1">Interleaved and split arrays</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Guru-vector-and-transform-sizes.html" accesskey="2">Guru vector and transform sizes</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Guru-Complex-DFTs.html" accesskey="3">Guru Complex DFTs</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Guru-Real_002ddata-DFTs.html" accesskey="4">Guru Real-data DFTs</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Guru-Real_002dto_002dreal-Transforms.html" accesskey="5">Guru Real-to-real Transforms</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="64_002dbit-Guru-Interface.html" accesskey="6">64-bit Guru Interface</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
148
fftw-3.3.10/doc/html/Guru-Real_002ddata-DFTs.html
Normal file
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Guru Real-data DFTs (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Guru Real-data DFTs (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Guru Real-data DFTs (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Guru-Interface.html" rel="up" title="Guru Interface">
|
||||
<link href="Guru-Real_002dto_002dreal-Transforms.html" rel="next" title="Guru Real-to-real Transforms">
|
||||
<link href="Guru-Complex-DFTs.html" rel="prev" title="Guru Complex DFTs">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Guru-Real_002ddata-DFTs"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Real_002dto_002dreal-Transforms.html" accesskey="n" rel="next">Guru Real-to-real Transforms</a>, Previous: <a href="Guru-Complex-DFTs.html" accesskey="p" rel="prev">Guru Complex DFTs</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Guru-Real_002ddata-DFTs-1"></span><h4 class="subsection">4.5.4 Guru Real-data DFTs</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_guru_dft_r2c(
|
||||
int rank, const fftw_iodim *dims,
|
||||
int howmany_rank, const fftw_iodim *howmany_dims,
|
||||
double *in, fftw_complex *out,
|
||||
unsigned flags);
|
||||
|
||||
fftw_plan fftw_plan_guru_split_dft_r2c(
|
||||
int rank, const fftw_iodim *dims,
|
||||
int howmany_rank, const fftw_iodim *howmany_dims,
|
||||
double *in, double *ro, double *io,
|
||||
unsigned flags);
|
||||
|
||||
fftw_plan fftw_plan_guru_dft_c2r(
|
||||
int rank, const fftw_iodim *dims,
|
||||
int howmany_rank, const fftw_iodim *howmany_dims,
|
||||
fftw_complex *in, double *out,
|
||||
unsigned flags);
|
||||
|
||||
fftw_plan fftw_plan_guru_split_dft_c2r(
|
||||
int rank, const fftw_iodim *dims,
|
||||
int howmany_rank, const fftw_iodim *howmany_dims,
|
||||
double *ri, double *ii, double *out,
|
||||
unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fguru_005fdft_005fr2c"></span>
|
||||
<span id="index-fftw_005fplan_005fguru_005fsplit_005fdft_005fr2c"></span>
|
||||
<span id="index-fftw_005fplan_005fguru_005fdft_005fc2r"></span>
|
||||
<span id="index-fftw_005fplan_005fguru_005fsplit_005fdft_005fc2r"></span>
|
||||
|
||||
<p>Plan a real-input (r2c) or real-output (c2r), multi-dimensional DFT with
|
||||
transform dimensions given by (<code>rank</code>, <code>dims</code>) over a
|
||||
multi-dimensional vector (loop) of dimensions (<code>howmany_rank</code>,
|
||||
<code>howmany_dims</code>). <code>dims</code> and <code>howmany_dims</code> should point
|
||||
to <code>fftw_iodim</code> arrays of length <code>rank</code> and
|
||||
<code>howmany_rank</code>, respectively. As for the basic and advanced
|
||||
interfaces, an r2c transform is <code>FFTW_FORWARD</code> and a c2r transform
|
||||
is <code>FFTW_BACKWARD</code>.
|
||||
</p>
|
||||
<p>The <em>last</em> dimension of <code>dims</code> is interpreted specially:
|
||||
that dimension of the real array has size <code>dims[rank-1].n</code>, but
|
||||
that dimension of the complex array has size <code>dims[rank-1].n/2+1</code>
|
||||
(division rounded down). The strides, on the other hand, are taken to
|
||||
be exactly as specified. It is up to the user to specify the strides
|
||||
appropriately for the peculiar dimensions of the data, and we do not
|
||||
guarantee that the planner will succeed (return non-<code>NULL</code>) for
|
||||
any dimensions other than those described in <a href="Real_002ddata-DFT-Array-Format.html">Real-data DFT Array Format</a> and generalized in <a href="Advanced-Real_002ddata-DFTs.html">Advanced Real-data DFTs</a>. (That is,
|
||||
for an in-place transform, each individual dimension should be able to
|
||||
operate in place.)
|
||||
<span id="index-in_002dplace-6"></span>
|
||||
</p>
|
||||
|
||||
<p><code>in</code> and <code>out</code> point to the input and output arrays for r2c
|
||||
and c2r transforms, respectively. For split arrays, <code>ri</code> and
|
||||
<code>ii</code> point to the real and imaginary input arrays for a c2r
|
||||
transform, and <code>ro</code> and <code>io</code> point to the real and imaginary
|
||||
output arrays for an r2c transform. <code>in</code> and <code>ro</code> or
|
||||
<code>ri</code> and <code>out</code> may be the same, indicating an in-place
|
||||
transform. (In-place transforms where <code>in</code> and <code>io</code> or
|
||||
<code>ii</code> and <code>out</code> are the same are not currently supported.)
|
||||
</p>
|
||||
<span id="index-flags-6"></span>
|
||||
<p><code>flags</code> is a bitwise OR (‘<samp>|</samp>’) of zero or more planner flags,
|
||||
as defined in <a href="Planner-Flags.html">Planner Flags</a>.
|
||||
</p>
|
||||
<p>In-place transforms of rank greater than 1 are currently only
|
||||
supported for interleaved arrays. For split arrays, the planner will
|
||||
return <code>NULL</code>.
|
||||
<span id="index-in_002dplace-7"></span>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Real_002dto_002dreal-Transforms.html" accesskey="n" rel="next">Guru Real-to-real Transforms</a>, Previous: <a href="Guru-Complex-DFTs.html" accesskey="p" rel="prev">Guru Complex DFTs</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
101
fftw-3.3.10/doc/html/Guru-Real_002dto_002dreal-Transforms.html
Normal file
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Guru Real-to-real Transforms (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Guru Real-to-real Transforms (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Guru Real-to-real Transforms (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Guru-Interface.html" rel="up" title="Guru Interface">
|
||||
<link href="64_002dbit-Guru-Interface.html" rel="next" title="64-bit Guru Interface">
|
||||
<link href="Guru-Real_002ddata-DFTs.html" rel="prev" title="Guru Real-data DFTs">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Guru-Real_002dto_002dreal-Transforms"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="64_002dbit-Guru-Interface.html" accesskey="n" rel="next">64-bit Guru Interface</a>, Previous: <a href="Guru-Real_002ddata-DFTs.html" accesskey="p" rel="prev">Guru Real-data DFTs</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Guru-Real_002dto_002dreal-Transforms-1"></span><h4 class="subsection">4.5.5 Guru Real-to-real Transforms</h4>
|
||||
|
||||
<div class="example">
|
||||
<pre class="example">fftw_plan fftw_plan_guru_r2r(int rank, const fftw_iodim *dims,
|
||||
int howmany_rank,
|
||||
const fftw_iodim *howmany_dims,
|
||||
double *in, double *out,
|
||||
const fftw_r2r_kind *kind,
|
||||
unsigned flags);
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fplan_005fguru_005fr2r"></span>
|
||||
|
||||
<p>Plan a real-to-real (r2r) multi-dimensional <code>FFTW_FORWARD</code>
|
||||
transform with transform dimensions given by (<code>rank</code>, <code>dims</code>)
|
||||
over a multi-dimensional vector (loop) of dimensions
|
||||
(<code>howmany_rank</code>, <code>howmany_dims</code>). <code>dims</code> and
|
||||
<code>howmany_dims</code> should point to <code>fftw_iodim</code> arrays of length
|
||||
<code>rank</code> and <code>howmany_rank</code>, respectively.
|
||||
</p>
|
||||
<p>The transform kind of each dimension is given by the <code>kind</code>
|
||||
parameter, which should point to an array of length <code>rank</code>. Valid
|
||||
<code>fftw_r2r_kind</code> constants are given in <a href="Real_002dto_002dReal-Transform-Kinds.html">Real-to-Real Transform Kinds</a>.
|
||||
</p>
|
||||
<p><code>in</code> and <code>out</code> point to the real input and output arrays; they
|
||||
may be the same, indicating an in-place transform.
|
||||
</p>
|
||||
<span id="index-flags-7"></span>
|
||||
<p><code>flags</code> is a bitwise OR (‘<samp>|</samp>’) of zero or more planner flags,
|
||||
as defined in <a href="Planner-Flags.html">Planner Flags</a>.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
142
fftw-3.3.10/doc/html/Guru-vector-and-transform-sizes.html
Normal file
@@ -0,0 +1,142 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Guru vector and transform sizes (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Guru vector and transform sizes (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Guru vector and transform sizes (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Guru-Interface.html" rel="up" title="Guru Interface">
|
||||
<link href="Guru-Complex-DFTs.html" rel="next" title="Guru Complex DFTs">
|
||||
<link href="Interleaved-and-split-arrays.html" rel="prev" title="Interleaved and split arrays">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Guru-vector-and-transform-sizes"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Complex-DFTs.html" accesskey="n" rel="next">Guru Complex DFTs</a>, Previous: <a href="Interleaved-and-split-arrays.html" accesskey="p" rel="prev">Interleaved and split arrays</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Guru-vector-and-transform-sizes-1"></span><h4 class="subsection">4.5.2 Guru vector and transform sizes</h4>
|
||||
|
||||
<p>The guru interface introduces one basic new data structure,
|
||||
<code>fftw_iodim</code>, that is used to specify sizes and strides for
|
||||
multi-dimensional transforms and vectors:
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">typedef struct {
|
||||
int n;
|
||||
int is;
|
||||
int os;
|
||||
} fftw_iodim;
|
||||
</pre></div>
|
||||
<span id="index-fftw_005fiodim"></span>
|
||||
|
||||
<p>Here, <code>n</code> is the size of the dimension, and <code>is</code> and <code>os</code>
|
||||
are the strides of that dimension for the input and output arrays. (The
|
||||
stride is the separation of consecutive elements along this dimension.)
|
||||
</p>
|
||||
<p>The meaning of the stride parameter depends on the type of the array
|
||||
that the stride refers to. <em>If the array is interleaved complex,
|
||||
strides are expressed in units of complex numbers
|
||||
(<code>fftw_complex</code>). If the array is split complex or real, strides
|
||||
are expressed in units of real numbers (<code>double</code>).</em> This
|
||||
convention is consistent with the usual pointer arithmetic in the C
|
||||
language. An interleaved array is denoted by a pointer <code>p</code> to
|
||||
<code>fftw_complex</code>, so that <code>p+1</code> points to the next complex
|
||||
number. Split arrays are denoted by pointers to <code>double</code>, in
|
||||
which case pointer arithmetic operates in units of
|
||||
<code>sizeof(double)</code>.
|
||||
<span id="index-stride-2"></span>
|
||||
</p>
|
||||
|
||||
<p>The guru planner interfaces all take a (<code>rank</code>, <code>dims[rank]</code>)
|
||||
pair describing the transform size, and a (<code>howmany_rank</code>,
|
||||
<code>howmany_dims[howmany_rank]</code>) pair describing the “vector” size (a
|
||||
multi-dimensional loop of transforms to perform), where <code>dims</code> and
|
||||
<code>howmany_dims</code> are arrays of <code>fftw_iodim</code>. Each <code>n</code> field must
|
||||
be positive for <code>dims</code> and nonnegative for <code>howmany_dims</code>, while both
|
||||
<code>rank</code> and <code>howmany_rank</code> must be nonnegative.
|
||||
</p>
|
||||
<p>For example, the <code>howmany</code> parameter in the advanced complex-DFT
|
||||
interface corresponds to <code>howmany_rank</code> = 1,
|
||||
<code>howmany_dims[0].n</code> = <code>howmany</code>, <code>howmany_dims[0].is</code> =
|
||||
<code>idist</code>, and <code>howmany_dims[0].os</code> = <code>odist</code>.
|
||||
<span id="index-howmany-loop"></span>
|
||||
<span id="index-dist-1"></span>
|
||||
(To compute a single transform, you can just use <code>howmany_rank</code> = 0.)
|
||||
</p>
|
||||
|
||||
<p>A row-major multidimensional array with dimensions <code>n[rank]</code>
|
||||
(see <a href="Row_002dmajor-Format.html">Row-major Format</a>) corresponds to <code>dims[i].n</code> =
|
||||
<code>n[i]</code> and the recurrence <code>dims[i].is</code> = <code>n[i+1] *
|
||||
dims[i+1].is</code> (similarly for <code>os</code>). The stride of the last
|
||||
(<code>i=rank-1</code>) dimension is the overall stride of the array.
|
||||
e.g. to be equivalent to the advanced complex-DFT interface, you would
|
||||
have <code>dims[rank-1].is</code> = <code>istride</code> and
|
||||
<code>dims[rank-1].os</code> = <code>ostride</code>.
|
||||
<span id="index-row_002dmajor-3"></span>
|
||||
</p>
|
||||
|
||||
<p>In general, we only guarantee FFTW to return a non-<code>NULL</code> plan if
|
||||
the vector and transform dimensions correspond to a set of distinct
|
||||
indices, and for in-place transforms the input/output strides should
|
||||
be the same.
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-Complex-DFTs.html" accesskey="n" rel="next">Guru Complex DFTs</a>, Previous: <a href="Interleaved-and-split-arrays.html" accesskey="p" rel="prev">Interleaved and split arrays</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
91
fftw-3.3.10/doc/html/How-Many-Threads-to-Use_003f.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>How Many Threads to Use? (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="How Many Threads to Use? (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="How Many Threads to Use? (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Multi_002dthreaded-FFTW.html" rel="up" title="Multi-threaded FFTW">
|
||||
<link href="Thread-safety.html" rel="next" title="Thread safety">
|
||||
<link href="Usage-of-Multi_002dthreaded-FFTW.html" rel="prev" title="Usage of Multi-threaded FFTW">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="How-Many-Threads-to-Use_003f"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Thread-safety.html" accesskey="n" rel="next">Thread safety</a>, Previous: <a href="Usage-of-Multi_002dthreaded-FFTW.html" accesskey="p" rel="prev">Usage of Multi-threaded FFTW</a>, Up: <a href="Multi_002dthreaded-FFTW.html" accesskey="u" rel="up">Multi-threaded FFTW</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="How-Many-Threads-to-Use_003f-1"></span><h3 class="section">5.3 How Many Threads to Use?</h3>
|
||||
|
||||
<span id="index-number-of-threads"></span>
|
||||
<p>There is a fair amount of overhead involved in synchronizing threads,
|
||||
so the optimal number of threads to use depends upon the size of the
|
||||
transform as well as on the number of processors you have.
|
||||
</p>
|
||||
<p>As a general rule, you don’t want to use more threads than you have
|
||||
processors. (Using more threads will work, but there will be extra
|
||||
overhead with no benefit.) In fact, if the problem size is too small,
|
||||
you may want to use fewer threads than you have processors.
|
||||
</p>
|
||||
<p>You will have to experiment with your system to see what level of
|
||||
parallelization is best for your problem size. Typically, the problem
|
||||
will have to involve at least a few thousand data points before threads
|
||||
become beneficial. If you plan with <code>FFTW_PATIENT</code>, it will
|
||||
automatically disable threads for sizes that don’t benefit from
|
||||
parallelization.
|
||||
<span id="index-FFTW_005fPATIENT-3"></span>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
121
fftw-3.3.10/doc/html/Installation-and-Customization.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Installation and Customization (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Installation and Customization (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Installation and Customization (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="index.html" rel="up" title="Top">
|
||||
<link href="Installation-on-Unix.html" rel="next" title="Installation on Unix">
|
||||
<link href="Upgrading-from-FFTW-version-2.html" rel="prev" title="Upgrading from FFTW version 2">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Installation-and-Customization"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Acknowledgments.html" accesskey="n" rel="next">Acknowledgments</a>, Previous: <a href="Upgrading-from-FFTW-version-2.html" accesskey="p" rel="prev">Upgrading from FFTW version 2</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Installation-and-Customization-1"></span><h2 class="chapter">10 Installation and Customization</h2>
|
||||
<span id="index-installation"></span>
|
||||
|
||||
<p>This chapter describes the installation and customization of FFTW, the
|
||||
latest version of which may be downloaded from
|
||||
<a href="http://www.fftw.org">the FFTW home page</a>.
|
||||
</p>
|
||||
<p>In principle, FFTW should work on any system with an ANSI C compiler
|
||||
(<code>gcc</code> is fine). However, planner time is drastically reduced if
|
||||
FFTW can exploit a hardware cycle counter; FFTW comes with cycle-counter
|
||||
support for all modern general-purpose CPUs, but you may need to add a
|
||||
couple of lines of code if your compiler is not yet supported
|
||||
(see <a href="Cycle-Counters.html">Cycle Counters</a>). (On Unix, there will be a warning at the end
|
||||
of the <code>configure</code> output if no cycle counter is found.)
|
||||
<span id="index-cycle-counter"></span>
|
||||
<span id="index-compiler-1"></span>
|
||||
<span id="index-portability-9"></span>
|
||||
</p>
|
||||
|
||||
<p>Installation of FFTW is simplest if you have a Unix or a GNU system,
|
||||
such as GNU/Linux, and we describe this case in the first section below,
|
||||
including the use of special configuration options to e.g. install
|
||||
different precisions or exploit optimizations for particular
|
||||
architectures (e.g. SIMD). Compilation on non-Unix systems is a more
|
||||
manual process, but we outline the procedure in the second section. It
|
||||
is also likely that pre-compiled binaries will be available for popular
|
||||
systems.
|
||||
</p>
|
||||
<p>Finally, we describe how you can customize FFTW for particular needs by
|
||||
generating <em>codelets</em> for fast transforms of sizes not supported
|
||||
efficiently by the standard FFTW distribution.
|
||||
<span id="index-codelet-1"></span>
|
||||
</p>
|
||||
<table class="menu" border="0" cellspacing="0">
|
||||
<tr><td align="left" valign="top">• <a href="Installation-on-Unix.html" accesskey="1">Installation on Unix</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Installation-on-non_002dUnix-systems.html" accesskey="2">Installation on non-Unix systems</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Cycle-Counters.html" accesskey="3">Cycle Counters</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
<tr><td align="left" valign="top">• <a href="Generating-your-own-code.html" accesskey="4">Generating your own code</a></td><td> </td><td align="left" valign="top">
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Acknowledgments.html" accesskey="n" rel="next">Acknowledgments</a>, Previous: <a href="Upgrading-from-FFTW-version-2.html" accesskey="p" rel="prev">Upgrading from FFTW version 2</a>, Up: <a href="index.html" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,106 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Installation and Supported Hardware/Software (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Installation and Supported Hardware/Software (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Installation and Supported Hardware/Software (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Multi_002dthreaded-FFTW.html" rel="up" title="Multi-threaded FFTW">
|
||||
<link href="Usage-of-Multi_002dthreaded-FFTW.html" rel="next" title="Usage of Multi-threaded FFTW">
|
||||
<link href="Multi_002dthreaded-FFTW.html" rel="prev" title="Multi-threaded FFTW">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Installation-and-Supported-Hardware_002fSoftware"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Usage-of-Multi_002dthreaded-FFTW.html" accesskey="n" rel="next">Usage of Multi-threaded FFTW</a>, Previous: <a href="Multi_002dthreaded-FFTW.html" accesskey="p" rel="prev">Multi-threaded FFTW</a>, Up: <a href="Multi_002dthreaded-FFTW.html" accesskey="u" rel="up">Multi-threaded FFTW</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Installation-and-Supported-Hardware_002fSoftware-1"></span><h3 class="section">5.1 Installation and Supported Hardware/Software</h3>
|
||||
|
||||
<p>All of the FFTW threads code is located in the <code>threads</code>
|
||||
subdirectory of the FFTW package. On Unix systems, the FFTW threads
|
||||
libraries and header files can be automatically configured, compiled,
|
||||
and installed along with the uniprocessor FFTW libraries simply by
|
||||
including <code>--enable-threads</code> in the flags to the <code>configure</code>
|
||||
script (see <a href="Installation-on-Unix.html">Installation on Unix</a>), or <code>--enable-openmp</code> to use
|
||||
<a href="http://www.openmp.org">OpenMP</a> threads.
|
||||
<span id="index-configure"></span>
|
||||
</p>
|
||||
|
||||
<span id="index-portability-3"></span>
|
||||
<span id="index-OpenMP"></span>
|
||||
<p>The threads routines require your operating system to have some sort
|
||||
of shared-memory threads support. Specifically, the FFTW threads
|
||||
package works with POSIX threads (available on most Unix variants,
|
||||
from GNU/Linux to MacOS X) and Win32 threads. OpenMP threads, which
|
||||
are supported in many common compilers (e.g. gcc) are also supported,
|
||||
and may give better performance on some systems. (OpenMP threads are
|
||||
also useful if you are employing OpenMP in your own code, in order to
|
||||
minimize conflicts between threading models.) If you have a
|
||||
shared-memory machine that uses a different threads API, it should be
|
||||
a simple matter of programming to include support for it; see the file
|
||||
<code>threads/threads.c</code> for more detail.
|
||||
</p>
|
||||
<p>You can compile FFTW with <em>both</em> <code>--enable-threads</code> and
|
||||
<code>--enable-openmp</code> at the same time, since they install libraries
|
||||
with different names (‘<samp>fftw3_threads</samp>’ and ‘<samp>fftw3_omp</samp>’, as
|
||||
described below). However, your programs may only link to <em>one</em>
|
||||
of these two libraries at a time.
|
||||
</p>
|
||||
<p>Ideally, of course, you should also have multiple processors in order to
|
||||
get any benefit from the threaded transforms.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
253
fftw-3.3.10/doc/html/Installation-on-Unix.html
Normal file
@@ -0,0 +1,253 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Installation on Unix (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Installation on Unix (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Installation on Unix (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Installation-and-Customization.html" rel="up" title="Installation and Customization">
|
||||
<link href="Installation-on-non_002dUnix-systems.html" rel="next" title="Installation on non-Unix systems">
|
||||
<link href="Installation-and-Customization.html" rel="prev" title="Installation and Customization">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Installation-on-Unix"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Installation-on-non_002dUnix-systems.html" accesskey="n" rel="next">Installation on non-Unix systems</a>, Previous: <a href="Installation-and-Customization.html" accesskey="p" rel="prev">Installation and Customization</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Installation-on-Unix-1"></span><h3 class="section">10.1 Installation on Unix</h3>
|
||||
|
||||
<p>FFTW comes with a <code>configure</code> program in the GNU style.
|
||||
Installation can be as simple as:
|
||||
<span id="index-configure-2"></span>
|
||||
</p>
|
||||
<div class="example">
|
||||
<pre class="example">./configure
|
||||
make
|
||||
make install
|
||||
</pre></div>
|
||||
|
||||
<p>This will build the uniprocessor complex and real transform libraries
|
||||
along with the test programs. (We recommend that you use GNU
|
||||
<code>make</code> if it is available; on some systems it is called
|
||||
<code>gmake</code>.) The “<code>make install</code>” command installs the fftw
|
||||
and rfftw libraries in standard places, and typically requires root
|
||||
privileges (unless you specify a different install directory with the
|
||||
<code>--prefix</code> flag to <code>configure</code>). You can also type
|
||||
“<code>make check</code>” to put the FFTW test programs through their paces.
|
||||
If you have problems during configuration or compilation, you may want
|
||||
to run “<code>make distclean</code>” before trying again; this ensures that
|
||||
you don’t have any stale files left over from previous compilation
|
||||
attempts.
|
||||
</p>
|
||||
<p>The <code>configure</code> script chooses the <code>gcc</code> compiler by default,
|
||||
if it is available; you can select some other compiler with:
|
||||
</p><div class="example">
|
||||
<pre class="example">./configure CC="<span class="roman"><i><the name of your C compiler></i></span>"
|
||||
</pre></div>
|
||||
|
||||
<p>The <code>configure</code> script knows good <code>CFLAGS</code> (C compiler flags)
|
||||
<span id="index-compiler-flags"></span>
|
||||
for a few systems. If your system is not known, the <code>configure</code>
|
||||
script will print out a warning. In this case, you should re-configure
|
||||
FFTW with the command
|
||||
</p><div class="example">
|
||||
<pre class="example">./configure CFLAGS="<span class="roman"><i><write your CFLAGS here></i></span>"
|
||||
</pre></div>
|
||||
<p>and then compile as usual. If you do find an optimal set of
|
||||
<code>CFLAGS</code> for your system, please let us know what they are (along
|
||||
with the output of <code>config.guess</code>) so that we can include them in
|
||||
future releases.
|
||||
</p>
|
||||
<p><code>configure</code> supports all the standard flags defined by the GNU
|
||||
Coding Standards; see the <code>INSTALL</code> file in FFTW or
|
||||
<a href="http://www.gnu.org/prep/standards/html_node/index.html">the GNU web page</a>.
|
||||
Note especially <code>--help</code> to list all flags and
|
||||
<code>--enable-shared</code> to create shared, rather than static, libraries.
|
||||
<code>configure</code> also accepts a few FFTW-specific flags, particularly:
|
||||
</p>
|
||||
<ul>
|
||||
<li> <span id="index-precision-9"></span>
|
||||
<code>--enable-float</code>: Produces a single-precision version of FFTW
|
||||
(<code>float</code>) instead of the default double-precision (<code>double</code>).
|
||||
See <a href="Precision.html">Precision</a>.
|
||||
|
||||
</li><li> <span id="index-precision-10"></span>
|
||||
<code>--enable-long-double</code>: Produces a long-double precision version of
|
||||
FFTW (<code>long double</code>) instead of the default double-precision
|
||||
(<code>double</code>). The <code>configure</code> script will halt with an error
|
||||
message if <code>long double</code> is the same size as <code>double</code> on your
|
||||
machine/compiler. See <a href="Precision.html">Precision</a>.
|
||||
|
||||
</li><li> <span id="index-precision-11"></span>
|
||||
<code>--enable-quad-precision</code>: Produces a quadruple-precision version
|
||||
of FFTW using the nonstandard <code>__float128</code> type provided by
|
||||
<code>gcc</code> 4.6 or later on x86, x86-64, and Itanium architectures,
|
||||
instead of the default double-precision (<code>double</code>). The
|
||||
<code>configure</code> script will halt with an error message if the
|
||||
compiler is not <code>gcc</code> version 4.6 or later or if <code>gcc</code>’s
|
||||
<code>libquadmath</code> library is not installed. See <a href="Precision.html">Precision</a>.
|
||||
|
||||
</li><li> <span id="index-threads-3"></span>
|
||||
<code>--enable-threads</code>: Enables compilation and installation of the
|
||||
FFTW threads library (see <a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a>), which provides a
|
||||
simple interface to parallel transforms for SMP systems. By default,
|
||||
the threads routines are not compiled.
|
||||
|
||||
</li><li> <code>--enable-openmp</code>: Like <code>--enable-threads</code>, but using OpenMP
|
||||
compiler directives in order to induce parallelism rather than
|
||||
spawning its own threads directly, and installing an ‘<samp>fftw3_omp</samp>’ library
|
||||
rather than an ‘<samp>fftw3_threads</samp>’ library (see <a href="Multi_002dthreaded-FFTW.html">Multi-threaded FFTW</a>). You can use both <code>--enable-openmp</code> and <code>--enable-threads</code>
|
||||
since they compile/install libraries with different names. By default,
|
||||
the OpenMP routines are not compiled.
|
||||
|
||||
</li><li> <code>--with-combined-threads</code>: By default, if <code>--enable-threads</code>
|
||||
is used, the threads support is compiled into a separate library that
|
||||
must be linked in addition to the main FFTW library. This is so that
|
||||
users of the serial library do not need to link the system threads
|
||||
libraries. If <code>--with-combined-threads</code> is specified, however,
|
||||
then no separate threads library is created, and threads are included
|
||||
in the main FFTW library. This is mainly useful under Windows, where
|
||||
no system threads library is required and inter-library dependencies
|
||||
are problematic.
|
||||
|
||||
</li><li> <span id="index-MPI-1"></span>
|
||||
<code>--enable-mpi</code>: Enables compilation and installation of the FFTW
|
||||
MPI library (see <a href="Distributed_002dmemory-FFTW-with-MPI.html">Distributed-memory FFTW with MPI</a>), which provides
|
||||
parallel transforms for distributed-memory systems with MPI. (By
|
||||
default, the MPI routines are not compiled.) See <a href="FFTW-MPI-Installation.html">FFTW MPI Installation</a>.
|
||||
|
||||
</li><li> <span id="index-Fortran_002dcallable-wrappers"></span>
|
||||
<code>--disable-fortran</code>: Disables inclusion of legacy-Fortran
|
||||
wrapper routines (see <a href="Calling-FFTW-from-Legacy-Fortran.html">Calling FFTW from Legacy Fortran</a>) in the standard
|
||||
FFTW libraries. These wrapper routines increase the library size by
|
||||
only a negligible amount, so they are included by default as long as
|
||||
the <code>configure</code> script finds a Fortran compiler on your system.
|
||||
(To specify a particular Fortran compiler <i>foo</i>, pass
|
||||
<code>F77=</code><i>foo</i> to <code>configure</code>.)
|
||||
|
||||
</li><li> <code>--with-g77-wrappers</code>: By default, when Fortran wrappers are
|
||||
included, the wrappers employ the linking conventions of the Fortran
|
||||
compiler detected by the <code>configure</code> script. If this compiler is
|
||||
GNU <code>g77</code>, however, then <em>two</em> versions of the wrappers are
|
||||
included: one with <code>g77</code>’s idiosyncratic convention of appending
|
||||
two underscores to identifiers, and one with the more common
|
||||
convention of appending only a single underscore. This way, the same
|
||||
FFTW library will work with both <code>g77</code> and other Fortran
|
||||
compilers, such as GNU <code>gfortran</code>. However, the converse is not
|
||||
true: if you configure with a different compiler, then the
|
||||
<code>g77</code>-compatible wrappers are not included. By specifying
|
||||
<code>--with-g77-wrappers</code>, the <code>g77</code>-compatible wrappers are
|
||||
included in addition to wrappers for whatever Fortran compiler
|
||||
<code>configure</code> finds.
|
||||
<span id="index-g77"></span>
|
||||
|
||||
</li><li> <code>--with-slow-timer</code>: Disables the use of hardware cycle counters,
|
||||
and falls back on <code>gettimeofday</code> or <code>clock</code>. This greatly
|
||||
worsens performance, and should generally not be used (unless you don’t
|
||||
have a cycle counter but still really want an optimized plan regardless
|
||||
of the time). See <a href="Cycle-Counters.html">Cycle Counters</a>.
|
||||
|
||||
</li><li> <code>--enable-sse</code> (single precision),
|
||||
<code>--enable-sse2</code> (single, double),
|
||||
<code>--enable-avx</code> (single, double),
|
||||
<code>--enable-avx2</code> (single, double),
|
||||
<code>--enable-avx512</code> (single, double),
|
||||
<code>--enable-avx-128-fma</code>,
|
||||
<code>--enable-kcvi</code> (single),
|
||||
<code>--enable-altivec</code> (single),
|
||||
<code>--enable-vsx</code> (single, double),
|
||||
<code>--enable-neon</code> (single, double on aarch64),
|
||||
<code>--enable-generic-simd128</code>,
|
||||
and
|
||||
<code>--enable-generic-simd256</code>:
|
||||
|
||||
<p>Enable various SIMD instruction sets. You need compiler that supports
|
||||
the given SIMD extensions, but FFTW will try to detect at runtime
|
||||
whether the CPU supports these extensions. That is, you can compile
|
||||
with<code>--enable-avx</code> and the code will still run on a CPU without AVX
|
||||
support.
|
||||
</p>
|
||||
<ul class="no-bullet">
|
||||
<li>- These options require a compiler supporting SIMD extensions, and
|
||||
compiler support is always a bit flaky: see the FFTW FAQ for a list of
|
||||
compiler versions that have problems compiling FFTW.
|
||||
</li><li>- Because of the large variety of ARM processors and ABIs, FFTW
|
||||
does not attempt to guess the correct <code>gcc</code> flags for generating
|
||||
NEON code. In general, you will have to provide them on the command line.
|
||||
This command line is known to have worked at least once:
|
||||
<div class="example">
|
||||
<pre class="example">./configure --with-slow-timer --host=arm-linux-gnueabi \
|
||||
--enable-single --enable-neon \
|
||||
"CC=arm-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp"
|
||||
</pre></div>
|
||||
</li></ul>
|
||||
|
||||
</li></ul>
|
||||
|
||||
<span id="index-compiler-2"></span>
|
||||
<p>To force <code>configure</code> to use a particular C compiler <i>foo</i>
|
||||
(instead of the default, usually <code>gcc</code>), pass <code>CC=</code><i>foo</i> to the
|
||||
<code>configure</code> script; you may also need to set the flags via the variable
|
||||
<code>CFLAGS</code> as described above.
|
||||
<span id="index-compiler-flags-1"></span>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Installation-on-non_002dUnix-systems.html" accesskey="n" rel="next">Installation on non-Unix systems</a>, Previous: <a href="Installation-and-Customization.html" accesskey="p" rel="prev">Installation and Customization</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
118
fftw-3.3.10/doc/html/Installation-on-non_002dUnix-systems.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Installation on non-Unix systems (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Installation on non-Unix systems (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Installation on non-Unix systems (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Installation-and-Customization.html" rel="up" title="Installation and Customization">
|
||||
<link href="Cycle-Counters.html" rel="next" title="Cycle Counters">
|
||||
<link href="Installation-on-Unix.html" rel="prev" title="Installation on Unix">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Installation-on-non_002dUnix-systems"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Cycle-Counters.html" accesskey="n" rel="next">Cycle Counters</a>, Previous: <a href="Installation-on-Unix.html" accesskey="p" rel="prev">Installation on Unix</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Installation-on-non_002dUnix-systems-1"></span><h3 class="section">10.2 Installation on non-Unix systems</h3>
|
||||
|
||||
<p>It should be relatively straightforward to compile FFTW even on non-Unix
|
||||
systems lacking the niceties of a <code>configure</code> script. Basically,
|
||||
you need to edit the <code>config.h</code> header (copy it from
|
||||
<code>config.h.in</code>) to <code>#define</code> the various options and compiler
|
||||
characteristics, and then compile all the ‘<samp>.c</samp>’ files in the
|
||||
relevant directories.
|
||||
</p>
|
||||
<p>The <code>config.h</code> header contains about 100 options to set, each one
|
||||
initially an <code>#undef</code>, each documented with a comment, and most of
|
||||
them fairly obvious. For most of the options, you should simply
|
||||
<code>#define</code> them to <code>1</code> if they are applicable, although a few
|
||||
options require a particular value (e.g. <code>SIZEOF_LONG_LONG</code> should
|
||||
be defined to the size of the <code>long long</code> type, in bytes, or zero
|
||||
if it is not supported). We will likely post some sample
|
||||
<code>config.h</code> files for various operating systems and compilers for
|
||||
you to use (at least as a starting point). Please let us know if you
|
||||
have to hand-create a configuration file (and/or a pre-compiled binary)
|
||||
that you want to share.
|
||||
</p>
|
||||
<p>To create the FFTW library, you will then need to compile all of the
|
||||
‘<samp>.c</samp>’ files in the <code>kernel</code>, <code>dft</code>, <code>dft/scalar</code>,
|
||||
<code>dft/scalar/codelets</code>, <code>rdft</code>, <code>rdft/scalar</code>,
|
||||
<code>rdft/scalar/r2cf</code>, <code>rdft/scalar/r2cb</code>,
|
||||
<code>rdft/scalar/r2r</code>, <code>reodft</code>, and <code>api</code> directories.
|
||||
If you are compiling with SIMD support (e.g. you defined
|
||||
<code>HAVE_SSE2</code> in <code>config.h</code>), then you also need to compile
|
||||
the <code>.c</code> files in the <code>simd-support</code>,
|
||||
<code>{dft,rdft}/simd</code>, <code>{dft,rdft}/simd/*</code> directories.
|
||||
</p>
|
||||
<p>Once these files are all compiled, link them into a library, or a shared
|
||||
library, or directly into your program.
|
||||
</p>
|
||||
<p>To compile the FFTW test program, additionally compile the code in the
|
||||
<code>libbench2/</code> directory, and link it into a library. Then compile
|
||||
the code in the <code>tests/</code> directory and link it to the
|
||||
<code>libbench2</code> and FFTW libraries. To compile the <code>fftw-wisdom</code>
|
||||
(command-line) tool (see <a href="Wisdom-Utilities.html">Wisdom Utilities</a>), compile
|
||||
<code>tools/fftw-wisdom.c</code> and link it to the <code>libbench2</code> and FFTW
|
||||
libraries
|
||||
</p>
|
||||
<hr>
|
||||
<div class="header">
|
||||
<p>
|
||||
Next: <a href="Cycle-Counters.html" accesskey="n" rel="next">Cycle Counters</a>, Previous: <a href="Installation-on-Unix.html" accesskey="p" rel="prev">Installation on Unix</a>, Up: <a href="Installation-and-Customization.html" accesskey="u" rel="up">Installation and Customization</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
95
fftw-3.3.10/doc/html/Interleaved-and-split-arrays.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!-- This manual is for FFTW
|
||||
(version 3.3.10, 10 December 2020).
|
||||
|
||||
Copyright (C) 2003 Matteo Frigo.
|
||||
|
||||
Copyright (C) 2003 Massachusetts Institute of Technology.
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by the Free Software Foundation. -->
|
||||
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Interleaved and split arrays (FFTW 3.3.10)</title>
|
||||
|
||||
<meta name="description" content="Interleaved and split arrays (FFTW 3.3.10)">
|
||||
<meta name="keywords" content="Interleaved and split arrays (FFTW 3.3.10)">
|
||||
<meta name="resource-type" content="document">
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="Generator" content="makeinfo">
|
||||
<link href="index.html" rel="start" title="Top">
|
||||
<link href="Concept-Index.html" rel="index" title="Concept Index">
|
||||
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||||
<link href="Guru-Interface.html" rel="up" title="Guru Interface">
|
||||
<link href="Guru-vector-and-transform-sizes.html" rel="next" title="Guru vector and transform sizes">
|
||||
<link href="Guru-Interface.html" rel="prev" title="Guru Interface">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
a.summary-letter {text-decoration: none}
|
||||
blockquote.indentedblock {margin-right: 0em}
|
||||
div.display {margin-left: 3.2em}
|
||||
div.example {margin-left: 3.2em}
|
||||
div.lisp {margin-left: 3.2em}
|
||||
kbd {font-style: oblique}
|
||||
pre.display {font-family: inherit}
|
||||
pre.format {font-family: inherit}
|
||||
pre.menu-comment {font-family: serif}
|
||||
pre.menu-preformatted {font-family: serif}
|
||||
span.nolinebreak {white-space: nowrap}
|
||||
span.roman {font-family: initial; font-weight: normal}
|
||||
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||||
ul.no-bullet {list-style: none}
|
||||
-->
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body lang="en">
|
||||
<span id="Interleaved-and-split-arrays"></span><div class="header">
|
||||
<p>
|
||||
Next: <a href="Guru-vector-and-transform-sizes.html" accesskey="n" rel="next">Guru vector and transform sizes</a>, Previous: <a href="Guru-Interface.html" accesskey="p" rel="prev">Guru Interface</a>, Up: <a href="Guru-Interface.html" accesskey="u" rel="up">Guru Interface</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
|
||||
</div>
|
||||
<hr>
|
||||
<span id="Interleaved-and-split-arrays-1"></span><h4 class="subsection">4.5.1 Interleaved and split arrays</h4>
|
||||
|
||||
<p>The guru interface supports two representations of complex numbers,
|
||||
which we call the interleaved and the split format.
|
||||
</p>
|
||||
<p>The <em>interleaved</em> format is the same one used by the basic and
|
||||
advanced interfaces, and it is documented in <a href="Complex-numbers.html">Complex numbers</a>.
|
||||
In the interleaved format, you provide pointers to the real part of a
|
||||
complex number, and the imaginary part understood to be stored in the
|
||||
next memory location.
|
||||
<span id="index-interleaved-format"></span>
|
||||
</p>
|
||||
|
||||
<p>The <em>split</em> format allows separate pointers to the real and
|
||||
imaginary parts of a complex array.
|
||||
<span id="index-split-format"></span>
|
||||
</p>
|
||||
|
||||
<p>Technically, the interleaved format is redundant, because you can
|
||||
always express an interleaved array in terms of a split array with
|
||||
appropriate pointers and strides. On the other hand, the interleaved
|
||||
format is simpler to use, and it is common in practice. Hence, FFTW
|
||||
supports it as a special case.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||