Updates
This commit is contained in:
80
fftw-3.3.10/tests/Makefile.am
Normal file
80
fftw-3.3.10/tests/Makefile.am
Normal file
@@ -0,0 +1,80 @@
|
||||
AM_CPPFLAGS = -I $(top_srcdir)
|
||||
noinst_PROGRAMS = bench
|
||||
EXTRA_DIST = check.pl README
|
||||
|
||||
if THREADS
|
||||
bench_CFLAGS = $(PTHREAD_CFLAGS)
|
||||
if !COMBINED_THREADS
|
||||
LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la
|
||||
endif
|
||||
else
|
||||
if OPENMP
|
||||
bench_CFLAGS = $(OPENMP_CFLAGS)
|
||||
LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la
|
||||
endif
|
||||
endif
|
||||
|
||||
bench_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h
|
||||
bench_LDADD = $(LIBFFTWTHREADS) \
|
||||
$(top_builddir)/libfftw3@PREC_SUFFIX@.la \
|
||||
$(top_builddir)/libbench2/libbench2.a $(THREADLIBS)
|
||||
|
||||
check-local: bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) -r -c=30 -v `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW transforms passed basic tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
if SMP
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) -r -c=30 -v --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) -r -c=5 -v --threads_callback --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW threaded transforms passed basic tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
endif
|
||||
|
||||
bigcheck: bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW transforms passed big tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
if SMP
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --nthreads=3 `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --nthreads=10 `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --threads_callback --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW threaded transforms passed big tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
endif
|
||||
|
||||
smallcheck: bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -r -c=1 -v `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -r --estimate -c=5 -v `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW transforms passed a few tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
if SMP
|
||||
perl -w $(srcdir)/check.pl -r --estimate -c=2 -v --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW threaded transforms passed a few tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
endif
|
||||
|
||||
paranoid-check: bench$(EXEEXT)
|
||||
if SMP
|
||||
perl -w $(srcdir)/check.pl -a --patient --nthreads=10 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --patient --nthreads=7 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --patient --nthreads=3 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --patient --nthreads=2 --paranoid `pwd`/bench$(EXEEXT)
|
||||
endif
|
||||
perl -w $(srcdir)/check.pl -a --patient --paranoid `pwd`/bench$(EXEEXT)
|
||||
|
||||
exhaustive-check: bench$(EXEEXT)
|
||||
if SMP
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=10 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=7 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=3 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=2 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --threads_callback --nthreads=2 --paranoid `pwd`/bench$(EXEEXT)
|
||||
endif
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --paranoid `pwd`/bench$(EXEEXT)
|
||||
752
fftw-3.3.10/tests/Makefile.in
Normal file
752
fftw-3.3.10/tests/Makefile.in
Normal file
@@ -0,0 +1,752 @@
|
||||
# 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@
|
||||
noinst_PROGRAMS = bench$(EXEEXT)
|
||||
subdir = tests
|
||||
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 =
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_bench_OBJECTS = bench-bench.$(OBJEXT) bench-hook.$(OBJEXT) \
|
||||
bench-fftw-bench.$(OBJEXT)
|
||||
bench_OBJECTS = $(am_bench_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
bench_DEPENDENCIES = $(LIBFFTWTHREADS) \
|
||||
$(top_builddir)/libfftw3@PREC_SUFFIX@.la \
|
||||
$(top_builddir)/libbench2/libbench2.a $(am__DEPENDENCIES_1)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
bench_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(bench_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
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 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/bench-bench.Po \
|
||||
./$(DEPDIR)/bench-fftw-bench.Po ./$(DEPDIR)/bench-hook.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(bench_SOURCES)
|
||||
DIST_SOURCES = $(bench_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)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README
|
||||
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@
|
||||
AM_CPPFLAGS = -I $(top_srcdir)
|
||||
EXTRA_DIST = check.pl README
|
||||
@OPENMP_TRUE@@THREADS_FALSE@bench_CFLAGS = $(OPENMP_CFLAGS)
|
||||
@THREADS_TRUE@bench_CFLAGS = $(PTHREAD_CFLAGS)
|
||||
@COMBINED_THREADS_FALSE@@THREADS_TRUE@LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la
|
||||
@OPENMP_TRUE@@THREADS_FALSE@LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la
|
||||
bench_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h
|
||||
bench_LDADD = $(LIBFFTWTHREADS) \
|
||||
$(top_builddir)/libfftw3@PREC_SUFFIX@.la \
|
||||
$(top_builddir)/libbench2/libbench2.a $(THREADLIBS)
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(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 tests/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tests/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):
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
bench$(EXEEXT): $(bench_OBJECTS) $(bench_DEPENDENCIES) $(EXTRA_bench_DEPENDENCIES)
|
||||
@rm -f bench$(EXEEXT)
|
||||
$(AM_V_CCLD)$(bench_LINK) $(bench_OBJECTS) $(bench_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench-bench.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench-fftw-bench.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bench-hook.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
bench-bench.o: bench.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -MT bench-bench.o -MD -MP -MF $(DEPDIR)/bench-bench.Tpo -c -o bench-bench.o `test -f 'bench.c' || echo '$(srcdir)/'`bench.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench-bench.Tpo $(DEPDIR)/bench-bench.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bench.c' object='bench-bench.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -c -o bench-bench.o `test -f 'bench.c' || echo '$(srcdir)/'`bench.c
|
||||
|
||||
bench-bench.obj: bench.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -MT bench-bench.obj -MD -MP -MF $(DEPDIR)/bench-bench.Tpo -c -o bench-bench.obj `if test -f 'bench.c'; then $(CYGPATH_W) 'bench.c'; else $(CYGPATH_W) '$(srcdir)/bench.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench-bench.Tpo $(DEPDIR)/bench-bench.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bench.c' object='bench-bench.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -c -o bench-bench.obj `if test -f 'bench.c'; then $(CYGPATH_W) 'bench.c'; else $(CYGPATH_W) '$(srcdir)/bench.c'; fi`
|
||||
|
||||
bench-hook.o: hook.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -MT bench-hook.o -MD -MP -MF $(DEPDIR)/bench-hook.Tpo -c -o bench-hook.o `test -f 'hook.c' || echo '$(srcdir)/'`hook.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench-hook.Tpo $(DEPDIR)/bench-hook.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hook.c' object='bench-hook.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -c -o bench-hook.o `test -f 'hook.c' || echo '$(srcdir)/'`hook.c
|
||||
|
||||
bench-hook.obj: hook.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -MT bench-hook.obj -MD -MP -MF $(DEPDIR)/bench-hook.Tpo -c -o bench-hook.obj `if test -f 'hook.c'; then $(CYGPATH_W) 'hook.c'; else $(CYGPATH_W) '$(srcdir)/hook.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench-hook.Tpo $(DEPDIR)/bench-hook.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hook.c' object='bench-hook.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -c -o bench-hook.obj `if test -f 'hook.c'; then $(CYGPATH_W) 'hook.c'; else $(CYGPATH_W) '$(srcdir)/hook.c'; fi`
|
||||
|
||||
bench-fftw-bench.o: fftw-bench.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -MT bench-fftw-bench.o -MD -MP -MF $(DEPDIR)/bench-fftw-bench.Tpo -c -o bench-fftw-bench.o `test -f 'fftw-bench.c' || echo '$(srcdir)/'`fftw-bench.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench-fftw-bench.Tpo $(DEPDIR)/bench-fftw-bench.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fftw-bench.c' object='bench-fftw-bench.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -c -o bench-fftw-bench.o `test -f 'fftw-bench.c' || echo '$(srcdir)/'`fftw-bench.c
|
||||
|
||||
bench-fftw-bench.obj: fftw-bench.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -MT bench-fftw-bench.obj -MD -MP -MF $(DEPDIR)/bench-fftw-bench.Tpo -c -o bench-fftw-bench.obj `if test -f 'fftw-bench.c'; then $(CYGPATH_W) 'fftw-bench.c'; else $(CYGPATH_W) '$(srcdir)/fftw-bench.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bench-fftw-bench.Tpo $(DEPDIR)/bench-fftw-bench.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fftw-bench.c' object='bench-fftw-bench.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(bench_CFLAGS) $(CFLAGS) -c -o bench-fftw-bench.obj `if test -f 'fftw-bench.c'; then $(CYGPATH_W) 'fftw-bench.c'; else $(CYGPATH_W) '$(srcdir)/fftw-bench.c'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
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
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-local
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
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-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/bench-bench.Po
|
||||
-rm -f ./$(DEPDIR)/bench-fftw-bench.Po
|
||||
-rm -f ./$(DEPDIR)/bench-hook.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
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 ./$(DEPDIR)/bench-bench.Po
|
||||
-rm -f ./$(DEPDIR)/bench-fftw-bench.Po
|
||||
-rm -f ./$(DEPDIR)/bench-hook.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: check-am install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \
|
||||
check-local clean clean-generic clean-libtool \
|
||||
clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags 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-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
check-local: bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) -r -c=30 -v `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW transforms passed basic tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) -r -c=30 -v --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) -r -c=5 -v --threads_callback --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@SMP_TRUE@ @echo " FFTW threaded transforms passed basic tests!"
|
||||
@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
|
||||
bigcheck: bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW transforms passed big tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --nthreads=3 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --nthreads=10 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl $(CHECK_PL_OPTS) --validate-wisdom -a -v --threads_callback --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@SMP_TRUE@ @echo " FFTW threaded transforms passed big tests!"
|
||||
@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
|
||||
smallcheck: bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -r -c=1 -v `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -r --estimate -c=5 -v `pwd`/bench$(EXEEXT)
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo " FFTW transforms passed a few tests!"
|
||||
@echo "--------------------------------------------------------------"
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -r --estimate -c=2 -v --nthreads=2 `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
@SMP_TRUE@ @echo " FFTW threaded transforms passed a few tests!"
|
||||
@SMP_TRUE@ @echo "--------------------------------------------------------------"
|
||||
|
||||
paranoid-check: bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --patient --nthreads=10 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --patient --nthreads=7 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --patient --nthreads=3 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --patient --nthreads=2 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --patient --paranoid `pwd`/bench$(EXEEXT)
|
||||
|
||||
exhaustive-check: bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=10 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=7 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=3 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --exhaustive --nthreads=2 --paranoid `pwd`/bench$(EXEEXT)
|
||||
@SMP_TRUE@ perl -w $(srcdir)/check.pl -a --exhaustive --threads_callback --nthreads=2 --paranoid `pwd`/bench$(EXEEXT)
|
||||
perl -w $(srcdir)/check.pl -a --exhaustive --paranoid `pwd`/bench$(EXEEXT)
|
||||
|
||||
# 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:
|
||||
73
fftw-3.3.10/tests/README
Normal file
73
fftw-3.3.10/tests/README
Normal file
@@ -0,0 +1,73 @@
|
||||
This directory contains a benchmarking and testing program
|
||||
for fftw3.
|
||||
|
||||
The `bench' program has a zillion options, because we use it for
|
||||
benchmarking other FFT libraries as well. This file only documents
|
||||
the basic usage of bench.
|
||||
|
||||
Usage: bench <commands>
|
||||
|
||||
where each command is as follows:
|
||||
|
||||
-s <problem>
|
||||
--speed <problem>
|
||||
|
||||
Benchmarks the speed of <problem>.
|
||||
|
||||
The syntax for problems is [i|o][r|c][f|b]<size>, where
|
||||
|
||||
i/o means in-place or out-of-place. Out of place is the default.
|
||||
r/c means real or complex transform. Complex is the default.
|
||||
f/b means forward or backward transform. Forward is the default.
|
||||
<size> is an arbitrary multidimensional sequence of integers
|
||||
separated by the character 'x'.
|
||||
|
||||
(The syntax for problems is actually richer, but we do not document
|
||||
it here. See the man page for fftw-wisdom for more information.)
|
||||
|
||||
Example:
|
||||
|
||||
ib256 : in-place backward complex transform of size 256
|
||||
32x64 : out-of-place forward complex 2D transform of 32 rows
|
||||
and 64 columns.
|
||||
|
||||
-y <problem>
|
||||
--verify <problem>
|
||||
|
||||
Verify that FFTW is computing the correct answer.
|
||||
|
||||
The program does not output anything unless an error occurs or
|
||||
verbosity is at least one.
|
||||
|
||||
-v<n>
|
||||
|
||||
Set verbosity to <n>, or 1 if <n> is omitted. -v2 will output
|
||||
the created plans with fftw_print_plan.
|
||||
|
||||
-oestimate
|
||||
-opatient
|
||||
-oexhaustive
|
||||
|
||||
Plan with FFTW_ESTIMATE, FFTW_PATIENT, or FFTW_EXHAUSTIVE, respectively.
|
||||
The default is FFTW_MEASURE.
|
||||
|
||||
If you benchmark FFTW, please use -opatient.
|
||||
|
||||
-onthreads=N
|
||||
|
||||
Use N threads, if FFTW was compiled with --enable-threads. N
|
||||
must be a positive integer; the default is N=1.
|
||||
|
||||
-onosimd
|
||||
|
||||
Disable SIMD instructions (e.g. SSE or SSE2).
|
||||
|
||||
-ounaligned
|
||||
|
||||
Plan with the FFTW_UNALIGNED flag.
|
||||
|
||||
-owisdom
|
||||
|
||||
On startup, read wisdom from a file wis.dat in the current directory
|
||||
(if it exists). On completion, write accumulated wisdom to wis.dat
|
||||
(overwriting any existing file of that name).
|
||||
552
fftw-3.3.10/tests/bench.c
Normal file
552
fftw-3.3.10/tests/bench.c
Normal file
@@ -0,0 +1,552 @@
|
||||
/**************************************************************************/
|
||||
/* NOTE to users: this is the FFTW self-test and benchmark program.
|
||||
It is probably NOT a good place to learn FFTW usage, since it has a
|
||||
lot of added complexity in order to exercise and test the full API,
|
||||
etcetera. We suggest reading the manual.
|
||||
|
||||
(Some of the self-test code is split off into fftw-bench.c and
|
||||
hook.c.) */
|
||||
/**************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "tests/fftw-bench.h"
|
||||
|
||||
static const char *mkversion(void) { return FFTW(version); }
|
||||
static const char *mkcc(void) { return FFTW(cc); }
|
||||
static const char *mkcodelet_optim(void) { return FFTW(codelet_optim); }
|
||||
|
||||
BEGIN_BENCH_DOC
|
||||
BENCH_DOC("name", "fftw3")
|
||||
BENCH_DOCF("version", mkversion)
|
||||
BENCH_DOCF("cc", mkcc)
|
||||
BENCH_DOCF("codelet-optim", mkcodelet_optim)
|
||||
END_BENCH_DOC
|
||||
|
||||
static FFTW(iodim) *bench_tensor_to_fftw_iodim(bench_tensor *t)
|
||||
{
|
||||
FFTW(iodim) *d;
|
||||
int i;
|
||||
|
||||
BENCH_ASSERT(t->rnk >= 0);
|
||||
if (t->rnk == 0) return 0;
|
||||
|
||||
d = (FFTW(iodim) *)bench_malloc(sizeof(FFTW(iodim)) * t->rnk);
|
||||
for (i = 0; i < t->rnk; ++i) {
|
||||
d[i].n = t->dims[i].n;
|
||||
d[i].is = t->dims[i].is;
|
||||
d[i].os = t->dims[i].os;
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
static void extract_reim_split(int sign, int size, bench_real *p,
|
||||
bench_real **r, bench_real **i)
|
||||
{
|
||||
if (sign == FFTW_FORWARD) {
|
||||
*r = p + 0;
|
||||
*i = p + size;
|
||||
} else {
|
||||
*r = p + size;
|
||||
*i = p + 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int sizeof_problem(bench_problem *p)
|
||||
{
|
||||
return tensor_sz(p->sz) * tensor_sz(p->vecsz);
|
||||
}
|
||||
|
||||
/* ouch */
|
||||
static int expressible_as_api_many(bench_tensor *t)
|
||||
{
|
||||
int i;
|
||||
|
||||
BENCH_ASSERT(BENCH_FINITE_RNK(t->rnk));
|
||||
|
||||
i = t->rnk - 1;
|
||||
while (--i >= 0) {
|
||||
bench_iodim *d = t->dims + i;
|
||||
if (d[0].is % d[1].is) return 0;
|
||||
if (d[0].os % d[1].os) return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int *mkn(bench_tensor *t)
|
||||
{
|
||||
int *n = (int *) bench_malloc(sizeof(int *) * t->rnk);
|
||||
int i;
|
||||
for (i = 0; i < t->rnk; ++i)
|
||||
n[i] = t->dims[i].n;
|
||||
return n;
|
||||
}
|
||||
|
||||
static void mknembed_many(bench_tensor *t, int **inembedp, int **onembedp)
|
||||
{
|
||||
int i;
|
||||
bench_iodim *d;
|
||||
int *inembed = (int *) bench_malloc(sizeof(int *) * t->rnk);
|
||||
int *onembed = (int *) bench_malloc(sizeof(int *) * t->rnk);
|
||||
|
||||
BENCH_ASSERT(BENCH_FINITE_RNK(t->rnk));
|
||||
*inembedp = inembed; *onembedp = onembed;
|
||||
|
||||
i = t->rnk - 1;
|
||||
while (--i >= 0) {
|
||||
d = t->dims + i;
|
||||
inembed[i+1] = d[0].is / d[1].is;
|
||||
onembed[i+1] = d[0].os / d[1].os;
|
||||
}
|
||||
}
|
||||
|
||||
/* try to use the most appropriate API function. Big mess. */
|
||||
|
||||
static int imax(int a, int b) { return (a > b ? a : b); }
|
||||
|
||||
static int halfish_sizeof_problem(bench_problem *p)
|
||||
{
|
||||
int n2 = sizeof_problem(p);
|
||||
if (BENCH_FINITE_RNK(p->sz->rnk) && p->sz->rnk > 0)
|
||||
n2 = (n2 / imax(p->sz->dims[p->sz->rnk - 1].n, 1)) *
|
||||
(p->sz->dims[p->sz->rnk - 1].n / 2 + 1);
|
||||
return n2;
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_real_split(bench_problem *p, unsigned flags)
|
||||
{
|
||||
FFTW(plan) pln;
|
||||
bench_tensor *sz = p->sz, *vecsz = p->vecsz;
|
||||
FFTW(iodim) *dims, *howmany_dims;
|
||||
bench_real *ri, *ii, *ro, *io;
|
||||
int n2 = halfish_sizeof_problem(p);
|
||||
|
||||
extract_reim_split(FFTW_FORWARD, n2, (bench_real *) p->in, &ri, &ii);
|
||||
extract_reim_split(FFTW_FORWARD, n2, (bench_real *) p->out, &ro, &io);
|
||||
|
||||
dims = bench_tensor_to_fftw_iodim(sz);
|
||||
howmany_dims = bench_tensor_to_fftw_iodim(vecsz);
|
||||
if (p->sign < 0) {
|
||||
if (verbose > 2) printf("using plan_guru_split_dft_r2c\n");
|
||||
pln = FFTW(plan_guru_split_dft_r2c)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
ri, ro, io, flags);
|
||||
}
|
||||
else {
|
||||
if (verbose > 2) printf("using plan_guru_split_dft_c2r\n");
|
||||
pln = FFTW(plan_guru_split_dft_c2r)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
ri, ii, ro, flags);
|
||||
}
|
||||
bench_free(dims);
|
||||
bench_free(howmany_dims);
|
||||
return pln;
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_real_interleaved(bench_problem *p, unsigned flags)
|
||||
{
|
||||
FFTW(plan) pln;
|
||||
bench_tensor *sz = p->sz, *vecsz = p->vecsz;
|
||||
|
||||
if (vecsz->rnk == 0 && tensor_unitstridep(sz)
|
||||
&& tensor_real_rowmajorp(sz, p->sign, p->in_place))
|
||||
goto api_simple;
|
||||
|
||||
if (vecsz->rnk == 1 && expressible_as_api_many(sz))
|
||||
goto api_many;
|
||||
|
||||
goto api_guru;
|
||||
|
||||
api_simple:
|
||||
switch (sz->rnk) {
|
||||
case 1:
|
||||
if (p->sign < 0) {
|
||||
if (verbose > 2) printf("using plan_dft_r2c_1d\n");
|
||||
return FFTW(plan_dft_r2c_1d)(sz->dims[0].n,
|
||||
(bench_real *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
flags);
|
||||
}
|
||||
else {
|
||||
if (verbose > 2) printf("using plan_dft_c2r_1d\n");
|
||||
return FFTW(plan_dft_c2r_1d)(sz->dims[0].n,
|
||||
(bench_complex *) p->in,
|
||||
(bench_real *) p->out,
|
||||
flags);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (p->sign < 0) {
|
||||
if (verbose > 2) printf("using plan_dft_r2c_2d\n");
|
||||
return FFTW(plan_dft_r2c_2d)(sz->dims[0].n, sz->dims[1].n,
|
||||
(bench_real *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
flags);
|
||||
}
|
||||
else {
|
||||
if (verbose > 2) printf("using plan_dft_c2r_2d\n");
|
||||
return FFTW(plan_dft_c2r_2d)(sz->dims[0].n, sz->dims[1].n,
|
||||
(bench_complex *) p->in,
|
||||
(bench_real *) p->out,
|
||||
flags);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (p->sign < 0) {
|
||||
if (verbose > 2) printf("using plan_dft_r2c_3d\n");
|
||||
return FFTW(plan_dft_r2c_3d)(
|
||||
sz->dims[0].n, sz->dims[1].n, sz->dims[2].n,
|
||||
(bench_real *) p->in, (bench_complex *) p->out,
|
||||
flags);
|
||||
}
|
||||
else {
|
||||
if (verbose > 2) printf("using plan_dft_c2r_3d\n");
|
||||
return FFTW(plan_dft_c2r_3d)(
|
||||
sz->dims[0].n, sz->dims[1].n, sz->dims[2].n,
|
||||
(bench_complex *) p->in, (bench_real *) p->out,
|
||||
flags);
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
int *n = mkn(sz);
|
||||
if (p->sign < 0) {
|
||||
if (verbose > 2) printf("using plan_dft_r2c\n");
|
||||
pln = FFTW(plan_dft_r2c)(sz->rnk, n,
|
||||
(bench_real *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
flags);
|
||||
}
|
||||
else {
|
||||
if (verbose > 2) printf("using plan_dft_c2r\n");
|
||||
pln = FFTW(plan_dft_c2r)(sz->rnk, n,
|
||||
(bench_complex *) p->in,
|
||||
(bench_real *) p->out,
|
||||
flags);
|
||||
}
|
||||
bench_free(n);
|
||||
return pln;
|
||||
}
|
||||
}
|
||||
|
||||
api_many:
|
||||
{
|
||||
int *n, *inembed, *onembed;
|
||||
BENCH_ASSERT(vecsz->rnk == 1);
|
||||
n = mkn(sz);
|
||||
mknembed_many(sz, &inembed, &onembed);
|
||||
if (p->sign < 0) {
|
||||
if (verbose > 2) printf("using plan_many_dft_r2c\n");
|
||||
pln = FFTW(plan_many_dft_r2c)(
|
||||
sz->rnk, n, vecsz->dims[0].n,
|
||||
(bench_real *) p->in, inembed,
|
||||
sz->dims[sz->rnk - 1].is, vecsz->dims[0].is,
|
||||
(bench_complex *) p->out, onembed,
|
||||
sz->dims[sz->rnk - 1].os, vecsz->dims[0].os,
|
||||
flags);
|
||||
}
|
||||
else {
|
||||
if (verbose > 2) printf("using plan_many_dft_c2r\n");
|
||||
pln = FFTW(plan_many_dft_c2r)(
|
||||
sz->rnk, n, vecsz->dims[0].n,
|
||||
(bench_complex *) p->in, inembed,
|
||||
sz->dims[sz->rnk - 1].is, vecsz->dims[0].is,
|
||||
(bench_real *) p->out, onembed,
|
||||
sz->dims[sz->rnk - 1].os, vecsz->dims[0].os,
|
||||
flags);
|
||||
}
|
||||
bench_free(n); bench_free(inembed); bench_free(onembed);
|
||||
return pln;
|
||||
}
|
||||
|
||||
api_guru:
|
||||
{
|
||||
FFTW(iodim) *dims, *howmany_dims;
|
||||
|
||||
if (p->sign < 0) {
|
||||
dims = bench_tensor_to_fftw_iodim(sz);
|
||||
howmany_dims = bench_tensor_to_fftw_iodim(vecsz);
|
||||
if (verbose > 2) printf("using plan_guru_dft_r2c\n");
|
||||
pln = FFTW(plan_guru_dft_r2c)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
(bench_real *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
flags);
|
||||
}
|
||||
else {
|
||||
dims = bench_tensor_to_fftw_iodim(sz);
|
||||
howmany_dims = bench_tensor_to_fftw_iodim(vecsz);
|
||||
if (verbose > 2) printf("using plan_guru_dft_c2r\n");
|
||||
pln = FFTW(plan_guru_dft_c2r)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
(bench_complex *) p->in,
|
||||
(bench_real *) p->out,
|
||||
flags);
|
||||
}
|
||||
bench_free(dims);
|
||||
bench_free(howmany_dims);
|
||||
return pln;
|
||||
}
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_real(bench_problem *p, unsigned flags)
|
||||
{
|
||||
if (p->split)
|
||||
return mkplan_real_split(p, flags);
|
||||
else
|
||||
return mkplan_real_interleaved(p, flags);
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_complex_split(bench_problem *p, unsigned flags)
|
||||
{
|
||||
FFTW(plan) pln;
|
||||
bench_tensor *sz = p->sz, *vecsz = p->vecsz;
|
||||
FFTW(iodim) *dims, *howmany_dims;
|
||||
bench_real *ri, *ii, *ro, *io;
|
||||
|
||||
extract_reim_split(p->sign, p->iphyssz, (bench_real *) p->in, &ri, &ii);
|
||||
extract_reim_split(p->sign, p->ophyssz, (bench_real *) p->out, &ro, &io);
|
||||
|
||||
dims = bench_tensor_to_fftw_iodim(sz);
|
||||
howmany_dims = bench_tensor_to_fftw_iodim(vecsz);
|
||||
if (verbose > 2) printf("using plan_guru_split_dft\n");
|
||||
pln = FFTW(plan_guru_split_dft)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
ri, ii, ro, io, flags);
|
||||
bench_free(dims);
|
||||
bench_free(howmany_dims);
|
||||
return pln;
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_complex_interleaved(bench_problem *p, unsigned flags)
|
||||
{
|
||||
FFTW(plan) pln;
|
||||
bench_tensor *sz = p->sz, *vecsz = p->vecsz;
|
||||
|
||||
if (vecsz->rnk == 0 && tensor_unitstridep(sz) && tensor_rowmajorp(sz))
|
||||
goto api_simple;
|
||||
|
||||
if (vecsz->rnk == 1 && expressible_as_api_many(sz))
|
||||
goto api_many;
|
||||
|
||||
goto api_guru;
|
||||
|
||||
api_simple:
|
||||
switch (sz->rnk) {
|
||||
case 1:
|
||||
if (verbose > 2) printf("using plan_dft_1d\n");
|
||||
return FFTW(plan_dft_1d)(sz->dims[0].n,
|
||||
(bench_complex *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
p->sign, flags);
|
||||
break;
|
||||
case 2:
|
||||
if (verbose > 2) printf("using plan_dft_2d\n");
|
||||
return FFTW(plan_dft_2d)(sz->dims[0].n, sz->dims[1].n,
|
||||
(bench_complex *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
p->sign, flags);
|
||||
break;
|
||||
case 3:
|
||||
if (verbose > 2) printf("using plan_dft_3d\n");
|
||||
return FFTW(plan_dft_3d)(
|
||||
sz->dims[0].n, sz->dims[1].n, sz->dims[2].n,
|
||||
(bench_complex *) p->in, (bench_complex *) p->out,
|
||||
p->sign, flags);
|
||||
break;
|
||||
default: {
|
||||
int *n = mkn(sz);
|
||||
if (verbose > 2) printf("using plan_dft\n");
|
||||
pln = FFTW(plan_dft)(sz->rnk, n,
|
||||
(bench_complex *) p->in,
|
||||
(bench_complex *) p->out, p->sign, flags);
|
||||
bench_free(n);
|
||||
return pln;
|
||||
}
|
||||
}
|
||||
|
||||
api_many:
|
||||
{
|
||||
int *n, *inembed, *onembed;
|
||||
BENCH_ASSERT(vecsz->rnk == 1);
|
||||
n = mkn(sz);
|
||||
mknembed_many(sz, &inembed, &onembed);
|
||||
if (verbose > 2) printf("using plan_many_dft\n");
|
||||
pln = FFTW(plan_many_dft)(
|
||||
sz->rnk, n, vecsz->dims[0].n,
|
||||
(bench_complex *) p->in,
|
||||
inembed, sz->dims[sz->rnk - 1].is, vecsz->dims[0].is,
|
||||
(bench_complex *) p->out,
|
||||
onembed, sz->dims[sz->rnk - 1].os, vecsz->dims[0].os,
|
||||
p->sign, flags);
|
||||
bench_free(n); bench_free(inembed); bench_free(onembed);
|
||||
return pln;
|
||||
}
|
||||
|
||||
api_guru:
|
||||
{
|
||||
FFTW(iodim) *dims, *howmany_dims;
|
||||
|
||||
dims = bench_tensor_to_fftw_iodim(sz);
|
||||
howmany_dims = bench_tensor_to_fftw_iodim(vecsz);
|
||||
if (verbose > 2) printf("using plan_guru_dft\n");
|
||||
pln = FFTW(plan_guru_dft)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
(bench_complex *) p->in,
|
||||
(bench_complex *) p->out,
|
||||
p->sign, flags);
|
||||
bench_free(dims);
|
||||
bench_free(howmany_dims);
|
||||
return pln;
|
||||
}
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_complex(bench_problem *p, unsigned flags)
|
||||
{
|
||||
if (p->split)
|
||||
return mkplan_complex_split(p, flags);
|
||||
else
|
||||
return mkplan_complex_interleaved(p, flags);
|
||||
}
|
||||
|
||||
static FFTW(plan) mkplan_r2r(bench_problem *p, unsigned flags)
|
||||
{
|
||||
FFTW(plan) pln;
|
||||
bench_tensor *sz = p->sz, *vecsz = p->vecsz;
|
||||
FFTW(r2r_kind) *k;
|
||||
|
||||
k = (FFTW(r2r_kind) *) bench_malloc(sizeof(FFTW(r2r_kind)) * sz->rnk);
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sz->rnk; ++i)
|
||||
switch (p->k[i]) {
|
||||
case R2R_R2HC: k[i] = FFTW_R2HC; break;
|
||||
case R2R_HC2R: k[i] = FFTW_HC2R; break;
|
||||
case R2R_DHT: k[i] = FFTW_DHT; break;
|
||||
case R2R_REDFT00: k[i] = FFTW_REDFT00; break;
|
||||
case R2R_REDFT01: k[i] = FFTW_REDFT01; break;
|
||||
case R2R_REDFT10: k[i] = FFTW_REDFT10; break;
|
||||
case R2R_REDFT11: k[i] = FFTW_REDFT11; break;
|
||||
case R2R_RODFT00: k[i] = FFTW_RODFT00; break;
|
||||
case R2R_RODFT01: k[i] = FFTW_RODFT01; break;
|
||||
case R2R_RODFT10: k[i] = FFTW_RODFT10; break;
|
||||
case R2R_RODFT11: k[i] = FFTW_RODFT11; break;
|
||||
default: BENCH_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (vecsz->rnk == 0 && tensor_unitstridep(sz) && tensor_rowmajorp(sz))
|
||||
goto api_simple;
|
||||
|
||||
if (vecsz->rnk == 1 && expressible_as_api_many(sz))
|
||||
goto api_many;
|
||||
|
||||
goto api_guru;
|
||||
|
||||
api_simple:
|
||||
switch (sz->rnk) {
|
||||
case 1:
|
||||
if (verbose > 2) printf("using plan_r2r_1d\n");
|
||||
pln = FFTW(plan_r2r_1d)(sz->dims[0].n,
|
||||
(bench_real *) p->in,
|
||||
(bench_real *) p->out,
|
||||
k[0], flags);
|
||||
goto done;
|
||||
case 2:
|
||||
if (verbose > 2) printf("using plan_r2r_2d\n");
|
||||
pln = FFTW(plan_r2r_2d)(sz->dims[0].n, sz->dims[1].n,
|
||||
(bench_real *) p->in,
|
||||
(bench_real *) p->out,
|
||||
k[0], k[1], flags);
|
||||
goto done;
|
||||
case 3:
|
||||
if (verbose > 2) printf("using plan_r2r_3d\n");
|
||||
pln = FFTW(plan_r2r_3d)(
|
||||
sz->dims[0].n, sz->dims[1].n, sz->dims[2].n,
|
||||
(bench_real *) p->in, (bench_real *) p->out,
|
||||
k[0], k[1], k[2], flags);
|
||||
goto done;
|
||||
default: {
|
||||
int *n = mkn(sz);
|
||||
if (verbose > 2) printf("using plan_r2r\n");
|
||||
pln = FFTW(plan_r2r)(sz->rnk, n,
|
||||
(bench_real *) p->in, (bench_real *) p->out,
|
||||
k, flags);
|
||||
bench_free(n);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
api_many:
|
||||
{
|
||||
int *n, *inembed, *onembed;
|
||||
BENCH_ASSERT(vecsz->rnk == 1);
|
||||
n = mkn(sz);
|
||||
mknembed_many(sz, &inembed, &onembed);
|
||||
if (verbose > 2) printf("using plan_many_r2r\n");
|
||||
pln = FFTW(plan_many_r2r)(
|
||||
sz->rnk, n, vecsz->dims[0].n,
|
||||
(bench_real *) p->in,
|
||||
inembed, sz->dims[sz->rnk - 1].is, vecsz->dims[0].is,
|
||||
(bench_real *) p->out,
|
||||
onembed, sz->dims[sz->rnk - 1].os, vecsz->dims[0].os,
|
||||
k, flags);
|
||||
bench_free(n); bench_free(inembed); bench_free(onembed);
|
||||
goto done;
|
||||
}
|
||||
|
||||
api_guru:
|
||||
{
|
||||
FFTW(iodim) *dims, *howmany_dims;
|
||||
|
||||
dims = bench_tensor_to_fftw_iodim(sz);
|
||||
howmany_dims = bench_tensor_to_fftw_iodim(vecsz);
|
||||
if (verbose > 2) printf("using plan_guru_r2r\n");
|
||||
pln = FFTW(plan_guru_r2r)(sz->rnk, dims,
|
||||
vecsz->rnk, howmany_dims,
|
||||
(bench_real *) p->in,
|
||||
(bench_real *) p->out, k, flags);
|
||||
bench_free(dims);
|
||||
bench_free(howmany_dims);
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
bench_free(k);
|
||||
return pln;
|
||||
}
|
||||
|
||||
FFTW(plan) mkplan(bench_problem *p, unsigned flags)
|
||||
{
|
||||
switch (p->kind) {
|
||||
case PROBLEM_COMPLEX: return mkplan_complex(p, flags);
|
||||
case PROBLEM_REAL: return mkplan_real(p, flags);
|
||||
case PROBLEM_R2R: return mkplan_r2r(p, flags);
|
||||
default: BENCH_ASSERT(0); return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void main_init(int *argc, char ***argv)
|
||||
{
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
}
|
||||
|
||||
void initial_cleanup(void)
|
||||
{
|
||||
}
|
||||
|
||||
void final_cleanup(void)
|
||||
{
|
||||
}
|
||||
|
||||
int import_wisdom(FILE *f)
|
||||
{
|
||||
return FFTW(import_wisdom_from_file)(f);
|
||||
}
|
||||
|
||||
void export_wisdom(FILE *f)
|
||||
{
|
||||
FFTW(export_wisdom_to_file)(f);
|
||||
}
|
||||
333
fftw-3.3.10/tests/check.pl
Executable file
333
fftw-3.3.10/tests/check.pl
Executable file
@@ -0,0 +1,333 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
$program = "./bench";
|
||||
$default_options = "";
|
||||
$verbose = 0;
|
||||
$paranoid = 0;
|
||||
$exhaustive = 0;
|
||||
$patient = 0;
|
||||
$estimate = 0;
|
||||
$wisdom = 0;
|
||||
$validate_wisdom = 0;
|
||||
$threads_callback = 0;
|
||||
$nthreads = 1;
|
||||
$rounds = 0;
|
||||
$maxsize = 60000;
|
||||
$maxcount = 100;
|
||||
$do_0d = 0;
|
||||
$do_1d = 0;
|
||||
$do_2d = 0;
|
||||
$do_random = 0;
|
||||
$keepgoing = 0;
|
||||
$flushcount = 42;
|
||||
|
||||
$mpi = 0;
|
||||
$mpi_transposed_in = 0;
|
||||
$mpi_transposed_out = 0;
|
||||
|
||||
sub make_options {
|
||||
my $options = $default_options;
|
||||
$options = "--verify-rounds=$rounds $options" if $rounds;
|
||||
$options = "--verbose=$verbose $options" if $verbose;
|
||||
$options = "-o paranoid $options" if $paranoid;
|
||||
$options = "-o exhaustive $options" if $exhaustive;
|
||||
$options = "-o patient $options" if $patient;
|
||||
$options = "-o estimate $options" if $estimate;
|
||||
$options = "-o wisdom $options" if $wisdom;
|
||||
$options = "-o threads_callback $options" if $threads_callback;
|
||||
$options = "-o nthreads=$nthreads $options" if ($nthreads > 1);
|
||||
$options = "-obflag=30 $options" if $mpi_transposed_in;
|
||||
$options = "-obflag=31 $options" if $mpi_transposed_out;
|
||||
return $options;
|
||||
}
|
||||
|
||||
@list_of_problems = ();
|
||||
|
||||
sub run_bench {
|
||||
my $options = shift;
|
||||
my $problist = shift;
|
||||
|
||||
print "Executing \"$program $options $problist\"\n"
|
||||
if $verbose;
|
||||
|
||||
system("$program $options $problist");
|
||||
$exit_value = $? >> 8;
|
||||
$signal_num = $? & 127;
|
||||
$dumped_core = $? & 128;
|
||||
|
||||
if ($signal_num == 1) {
|
||||
print "hangup\n";
|
||||
exit 0;
|
||||
}
|
||||
if ($signal_num == 2) {
|
||||
print "interrupted\n";
|
||||
exit 0;
|
||||
}
|
||||
if ($signal_num == 9) {
|
||||
print "killed\n";
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($exit_value != 0 || $dumped_core || $signal_num) {
|
||||
print "FAILED $program: $problist\n";
|
||||
if ($signal_num) { print "received signal $signal_num\n"; }
|
||||
exit 1 unless $keepgoing;
|
||||
}
|
||||
}
|
||||
|
||||
sub flush_problems {
|
||||
my $options = shift;
|
||||
my $problist = "";
|
||||
|
||||
if ($#list_of_problems >= 0) {
|
||||
for (@list_of_problems) {
|
||||
$problist = "$problist --verify '$_'";
|
||||
}
|
||||
|
||||
if ($validate_wisdom) {
|
||||
# start with a fresh wisdom state
|
||||
unlink("wis.dat");
|
||||
}
|
||||
|
||||
run_bench($options, $problist);
|
||||
|
||||
if ($validate_wisdom) {
|
||||
# run again and validate that we can the problem in wisdom-only mode
|
||||
print "Executing again in wisdom-only mode\n"
|
||||
if $verbose;
|
||||
run_bench("$options -owisdom-only", $problist);
|
||||
}
|
||||
@list_of_problems = ();
|
||||
}
|
||||
}
|
||||
|
||||
sub do_problem {
|
||||
my $problem = shift;
|
||||
my $doablep = shift;
|
||||
my $options = &make_options;
|
||||
|
||||
if ($problem =~ /\// && $problem =~ /r/
|
||||
&& ($problem =~ /i.*x/
|
||||
|| $problem =~ /v/ || $problem =~ /\*/)) {
|
||||
return; # cannot do real split inplace-multidimensional or vector
|
||||
}
|
||||
|
||||
# in --mpi mode, restrict to problems supported by MPI code
|
||||
if ($mpi) {
|
||||
if ($problem =~ /\//) { return; } # no split
|
||||
if ($problem =~ /\*/) { return; } # no non-contiguous vectors
|
||||
if ($problem =~ /r/ && $problem !~ /x/) { return; } # no 1d r2c
|
||||
if ($problem =~ /k/ && $problem !~ /x/) { return; } # no 1d r2r
|
||||
if ($mpi_transposed_in || $problem =~ /\[/) {
|
||||
if ($problem !~ /x/) { return; } # no 1d transposed_in
|
||||
if ($problem =~ /r/ && $problem !~ /b/) { return; } # only c2r
|
||||
}
|
||||
if ($mpi_transposed_out || $problem =~ /\]/) {
|
||||
if ($problem !~ /x/) { return; } # no 1d transposed_out
|
||||
if ($problem =~ /r/ && $problem =~ /b/) { return; } # only r2c
|
||||
}
|
||||
}
|
||||
|
||||
# size-1 redft00 is not defined/doable
|
||||
return if ($problem =~ /[^0-9]1e00/);
|
||||
|
||||
if ($doablep) {
|
||||
@list_of_problems = ($problem, @list_of_problems);
|
||||
&flush_problems($options) if ($#list_of_problems > $flushcount);
|
||||
} else {
|
||||
print "Executing \"$program $options --can-do $problem\"\n"
|
||||
if $verbose;
|
||||
$result=`$program $options --can-do $problem`;
|
||||
if ($result ne "#f\n" && $result ne "#f\r\n") {
|
||||
print "FAILED $program: $problem is not undoable\n";
|
||||
exit 1 unless $keepgoing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# given geometry, try both directions and in place/out of place
|
||||
sub do_geometry {
|
||||
my $geom = shift;
|
||||
my $doablep = shift;
|
||||
do_problem("if$geom", $doablep);
|
||||
do_problem("of$geom", $doablep);
|
||||
do_problem("ib$geom", $doablep);
|
||||
do_problem("ob$geom", $doablep);
|
||||
do_problem("//if$geom", $doablep);
|
||||
do_problem("//of$geom", $doablep);
|
||||
do_problem("//ib$geom", $doablep);
|
||||
do_problem("//ob$geom", $doablep);
|
||||
}
|
||||
|
||||
# given size, try all transform kinds (complex, real, etc.)
|
||||
sub do_size {
|
||||
my $size = shift;
|
||||
my $doablep = shift;
|
||||
do_geometry("c$size", $doablep);
|
||||
do_geometry("r$size", $doablep);
|
||||
}
|
||||
|
||||
sub small_0d {
|
||||
for ($i = 0; $i <= 16; ++$i) {
|
||||
for ($j = 0; $j <= 16; ++$j) {
|
||||
for ($vl = 1; $vl <= 5; ++$vl) {
|
||||
my $ivl = $i * $vl;
|
||||
my $jvl = $j * $vl;
|
||||
do_problem("o1v${i}:${vl}:${jvl}x${j}:${ivl}:${vl}x${vl}:1:1", 1);
|
||||
do_problem("i1v${i}:${vl}:${jvl}x${j}:${ivl}:${vl}x${vl}:1:1", 1);
|
||||
do_problem("ok1v${i}:${vl}:${jvl}x${j}:${ivl}:${vl}x${vl}:1:1", 1);
|
||||
do_problem("ik1v${i}:${vl}:${jvl}x${j}:${ivl}:${vl}x${vl}:1:1", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub small_1d {
|
||||
do_size (0, 0);
|
||||
for ($i = 1; $i <= 100; ++$i) {
|
||||
do_size ($i, 1);
|
||||
}
|
||||
do_size (128, 1);
|
||||
do_size (256, 1);
|
||||
do_size (512, 1);
|
||||
do_size (1024, 1);
|
||||
do_size (2048, 1);
|
||||
do_size (4096, 1);
|
||||
}
|
||||
|
||||
sub small_2d {
|
||||
do_size ("0x0", 0);
|
||||
for ($i = 1; $i <= 100; ++$i) {
|
||||
my $ub = 900/$i;
|
||||
$ub = 100 if $ub > 100;
|
||||
for ($j = 1; $j <= $ub; ++$j) {
|
||||
do_size ("${i}x${j}", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub rand_small_factors {
|
||||
my $l = shift;
|
||||
my $n = 1;
|
||||
my $maxfactor = 13;
|
||||
my $f = int(rand($maxfactor) + 1);
|
||||
while ($n * $f < $l) {
|
||||
$n *= $f;
|
||||
$f = int(rand($maxfactor) + 1);
|
||||
};
|
||||
return $n;
|
||||
}
|
||||
|
||||
# way too complicated...
|
||||
sub one_random_test {
|
||||
my $q = int(2 + rand($maxsize));
|
||||
my $rnk = int(1 + rand(4));
|
||||
my $vtype = int(rand(3));
|
||||
my $g = int(2 + exp(log($q) / ($rnk + ($vtype > 0))));
|
||||
my $first = 1;
|
||||
my $sz = "";
|
||||
my $is_r2r = shift;
|
||||
my @r2r_kinds = ("f", "b", "h",
|
||||
"e00", "e01", "e10", "e11", "o00", "o01", "o10", "o11");
|
||||
|
||||
while ($q > 1 && $rnk > 0) {
|
||||
my $r = rand_small_factors(int(rand($g) + 10));
|
||||
if ($r > 1) {
|
||||
$sz = "${sz}x" if (!$first);
|
||||
$first = 0;
|
||||
$sz = "${sz}${r}";
|
||||
if ($is_r2r) {
|
||||
my $k = $r2r_kinds[int(1 + rand($#r2r_kinds))];
|
||||
$sz = "${sz}${k}";
|
||||
}
|
||||
$q = int($q / $r);
|
||||
if ($g > $q) { $g = $q; }
|
||||
--$rnk;
|
||||
}
|
||||
}
|
||||
if ($vtype > 0 && $g > 1) {
|
||||
my $v = int(1 + rand($g));
|
||||
$sz = "${sz}*${v}" if ($vtype == 1);
|
||||
$sz = "${sz}v${v}" if ($vtype == 2);
|
||||
}
|
||||
if ($mpi) {
|
||||
my $stype = int(rand(3));
|
||||
$sz = "]${sz}" if ($stype == 1);
|
||||
$sz = "[${sz}" if ($stype == 2);
|
||||
}
|
||||
$sz = "d$sz" if (int(rand(3)) == 0);
|
||||
if ($is_r2r) {
|
||||
do_problem("ik$sz", 1);
|
||||
do_problem("ok$sz", 1);
|
||||
}
|
||||
else {
|
||||
do_size($sz, 1);
|
||||
}
|
||||
}
|
||||
|
||||
sub random_tests {
|
||||
my $i;
|
||||
for ($i = 0; $i < $maxcount; ++$i) {
|
||||
&one_random_test(0);
|
||||
&one_random_test(1);
|
||||
}
|
||||
}
|
||||
|
||||
sub parse_arguments (@)
|
||||
{
|
||||
local (@arglist) = @_;
|
||||
|
||||
while (@arglist)
|
||||
{
|
||||
if ($arglist[0] eq '-v') { ++$verbose; }
|
||||
elsif ($arglist[0] eq '--verbose') { ++$verbose; }
|
||||
elsif ($arglist[0] eq '-p') { ++$paranoid; }
|
||||
elsif ($arglist[0] eq '--paranoid') { ++$paranoid; }
|
||||
elsif ($arglist[0] eq '--exhaustive') { ++$exhaustive; }
|
||||
elsif ($arglist[0] eq '--patient') { ++$patient; }
|
||||
elsif ($arglist[0] eq '--estimate') { ++$estimate; }
|
||||
elsif ($arglist[0] eq '--wisdom') { ++$wisdom; }
|
||||
elsif ($arglist[0] eq '--validate-wisdom') { ++$wisdom; ++$validate_wisdom; }
|
||||
elsif ($arglist[0] eq '--threads_callback') { ++$threads_callback; }
|
||||
elsif ($arglist[0] =~ /^--nthreads=(.+)$/) { $nthreads = $1; }
|
||||
elsif ($arglist[0] eq '-k') { ++$keepgoing; }
|
||||
elsif ($arglist[0] eq '--keep-going') { ++$keepgoing; }
|
||||
elsif ($arglist[0] =~ /^--verify-rounds=(.+)$/) { $rounds = $1; }
|
||||
elsif ($arglist[0] =~ /^--count=(.+)$/) { $maxcount = $1; }
|
||||
elsif ($arglist[0] =~ /^-c=(.+)$/) { $maxcount = $1; }
|
||||
elsif ($arglist[0] =~ /^--flushcount=(.+)$/) { $flushcount = $1; }
|
||||
elsif ($arglist[0] =~ /^--maxsize=(.+)$/) { $maxsize = $1; }
|
||||
|
||||
elsif ($arglist[0] eq '--mpi') { ++$mpi; }
|
||||
elsif ($arglist[0] eq '--mpi-transposed-in') {
|
||||
++$mpi; ++$mpi_transposed_in; }
|
||||
elsif ($arglist[0] eq '--mpi-transposed-out') {
|
||||
++$mpi; ++$mpi_transposed_out; }
|
||||
|
||||
elsif ($arglist[0] eq '-0d') { ++$do_0d; }
|
||||
elsif ($arglist[0] eq '-1d') { ++$do_1d; }
|
||||
elsif ($arglist[0] eq '-2d') { ++$do_2d; }
|
||||
elsif ($arglist[0] eq '-r') { ++$do_random; }
|
||||
elsif ($arglist[0] eq '--random') { ++$do_random; }
|
||||
elsif ($arglist[0] eq '-a') {
|
||||
++$do_0d; ++$do_1d; ++$do_2d; ++$do_random;
|
||||
}
|
||||
|
||||
else { $program=$arglist[0]; }
|
||||
shift (@arglist);
|
||||
}
|
||||
}
|
||||
|
||||
# MAIN PROGRAM:
|
||||
|
||||
&parse_arguments (@ARGV);
|
||||
|
||||
&random_tests if $do_random;
|
||||
&small_0d if $do_0d;
|
||||
&small_1d if $do_1d;
|
||||
&small_2d if $do_2d;
|
||||
|
||||
{
|
||||
my $options = &make_options;
|
||||
&flush_problems($options);
|
||||
}
|
||||
303
fftw-3.3.10/tests/fftw-bench.c
Normal file
303
fftw-3.3.10/tests/fftw-bench.c
Normal file
@@ -0,0 +1,303 @@
|
||||
/* See bench.c. We keep a few common subroutines in this file so
|
||||
that they can be re-used in the MPI test program. */
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "tests/fftw-bench.h"
|
||||
|
||||
/* define to enable code that traps floating-point exceptions.
|
||||
Disabled by default because I don't want to worry about the
|
||||
portability of such code. feenableexcept() seems to be a GNU
|
||||
thing */
|
||||
#undef TRAP_FP_EXCEPTIONS
|
||||
|
||||
#ifdef TRAP_FP_EXCEPTIONS
|
||||
# include <signal.h>
|
||||
# include <fenv.h>
|
||||
#endif
|
||||
|
||||
#ifdef _OPENMP
|
||||
# include <omp.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SMP
|
||||
int threads_ok = 1;
|
||||
#endif
|
||||
|
||||
FFTW(plan) the_plan = 0;
|
||||
|
||||
static const char *wisdat = "wis.dat";
|
||||
unsigned the_flags = 0;
|
||||
int paranoid = 0;
|
||||
int usewisdom = 0;
|
||||
int havewisdom = 0;
|
||||
int nthreads = 1;
|
||||
int amnesia = 0;
|
||||
|
||||
extern void install_hook(void); /* in hook.c */
|
||||
extern void uninstall_hook(void); /* in hook.c */
|
||||
|
||||
#ifdef FFTW_RANDOM_ESTIMATOR
|
||||
extern unsigned FFTW(random_estimate_seed);
|
||||
#endif
|
||||
|
||||
#ifdef TRAP_FP_EXCEPTIONS
|
||||
static void sigfpe_handler(int sig, siginfo_t *info, void *context)
|
||||
{
|
||||
/* fftw code is not supposed to generate FP exceptions */
|
||||
UNUSED(sig); UNUSED(info); UNUSED(context);
|
||||
fprintf(stderr, "caught FPE, aborting\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
static void setup_sigfpe_handler(void)
|
||||
{
|
||||
struct sigaction a;
|
||||
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW);
|
||||
memset(&a, 0, sizeof(a));
|
||||
a.sa_sigaction = sigfpe_handler;
|
||||
a.sa_flags = SA_SIGINFO;
|
||||
if (sigaction(SIGFPE, &a, NULL) == -1) {
|
||||
fprintf(stderr, "cannot install sigfpe handler\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void setup_sigfpe_handler(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/* dummy serial threads backend for testing threads_set_callback */
|
||||
static void serial_threads(void *(*work)(char *), char *jobdata, size_t elsize, int njobs, void *data)
|
||||
{
|
||||
int i;
|
||||
(void) data; /* unused */
|
||||
for (i = 0; i < njobs; ++i)
|
||||
work(jobdata + elsize * i);
|
||||
}
|
||||
|
||||
void useropt(const char *arg)
|
||||
{
|
||||
int x;
|
||||
double y;
|
||||
|
||||
if (!strcmp(arg, "patient")) the_flags |= FFTW_PATIENT;
|
||||
else if (!strcmp(arg, "estimate")) the_flags |= FFTW_ESTIMATE;
|
||||
else if (!strcmp(arg, "estimatepat")) the_flags |= FFTW_ESTIMATE_PATIENT;
|
||||
else if (!strcmp(arg, "exhaustive")) the_flags |= FFTW_EXHAUSTIVE;
|
||||
else if (!strcmp(arg, "unaligned")) the_flags |= FFTW_UNALIGNED;
|
||||
else if (!strcmp(arg, "nosimd")) the_flags |= FFTW_NO_SIMD;
|
||||
else if (!strcmp(arg, "noindirectop")) the_flags |= FFTW_NO_INDIRECT_OP;
|
||||
else if (!strcmp(arg, "wisdom-only")) the_flags |= FFTW_WISDOM_ONLY;
|
||||
else if (sscanf(arg, "flag=%d", &x) == 1) the_flags |= x;
|
||||
else if (sscanf(arg, "bflag=%d", &x) == 1) the_flags |= 1U << x;
|
||||
else if (!strcmp(arg, "paranoid")) paranoid = 1;
|
||||
else if (!strcmp(arg, "wisdom")) usewisdom = 1;
|
||||
else if (!strcmp(arg, "amnesia")) amnesia = 1;
|
||||
else if (!strcmp(arg, "threads_callback"))
|
||||
#ifdef HAVE_SMP
|
||||
FFTW(threads_set_callback)(serial_threads, NULL);
|
||||
#else
|
||||
fprintf(stderr, "Serial FFTW; ignoring threads_callback option.\n");
|
||||
#endif
|
||||
else if (sscanf(arg, "nthreads=%d", &x) == 1) nthreads = x;
|
||||
#ifdef FFTW_RANDOM_ESTIMATOR
|
||||
else if (sscanf(arg, "eseed=%d", &x) == 1) FFTW(random_estimate_seed) = x;
|
||||
#endif
|
||||
else if (sscanf(arg, "timelimit=%lg", &y) == 1) {
|
||||
FFTW(set_timelimit)(y);
|
||||
}
|
||||
|
||||
else fprintf(stderr, "unknown user option: %s. Ignoring.\n", arg);
|
||||
}
|
||||
|
||||
void rdwisdom(void)
|
||||
{
|
||||
FILE *f;
|
||||
double tim;
|
||||
int success = 0;
|
||||
|
||||
if (havewisdom) return;
|
||||
|
||||
#ifdef HAVE_SMP
|
||||
if (threads_ok) {
|
||||
BENCH_ASSERT(FFTW(init_threads)());
|
||||
FFTW(plan_with_nthreads)(nthreads);
|
||||
BENCH_ASSERT(FFTW(planner_nthreads)() == nthreads);
|
||||
FFTW(make_planner_thread_safe)();
|
||||
#ifdef _OPENMP
|
||||
omp_set_num_threads(nthreads);
|
||||
#endif
|
||||
}
|
||||
else if (nthreads > 1 && verbose > 1) {
|
||||
fprintf(stderr, "bench: WARNING - nthreads = %d, but threads not supported\n", nthreads);
|
||||
nthreads = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!usewisdom) return;
|
||||
|
||||
timer_start(USER_TIMER);
|
||||
if ((f = fopen(wisdat, "r"))) {
|
||||
if (!import_wisdom(f))
|
||||
fprintf(stderr, "bench: ERROR reading wisdom\n");
|
||||
else
|
||||
success = 1;
|
||||
fclose(f);
|
||||
}
|
||||
tim = timer_stop(USER_TIMER);
|
||||
|
||||
if (success) {
|
||||
if (verbose > 1) printf("READ WISDOM (%g seconds): ", tim);
|
||||
|
||||
if (verbose > 3)
|
||||
export_wisdom(stdout);
|
||||
if (verbose > 1)
|
||||
printf("\n");
|
||||
}
|
||||
havewisdom = 1;
|
||||
}
|
||||
|
||||
void wrwisdom(void)
|
||||
{
|
||||
FILE *f;
|
||||
double tim;
|
||||
if (!havewisdom) return;
|
||||
|
||||
timer_start(USER_TIMER);
|
||||
if ((f = fopen(wisdat, "w"))) {
|
||||
export_wisdom(f);
|
||||
fclose(f);
|
||||
}
|
||||
tim = timer_stop(USER_TIMER);
|
||||
if (verbose > 1) printf("write wisdom took %g seconds\n", tim);
|
||||
}
|
||||
|
||||
static unsigned preserve_input_flags(bench_problem *p)
|
||||
{
|
||||
/*
|
||||
* fftw3 cannot preserve input for multidimensional c2r transforms.
|
||||
* Enforce FFTW_DESTROY_INPUT
|
||||
*/
|
||||
if (p->kind == PROBLEM_REAL &&
|
||||
p->sign > 0 &&
|
||||
!p->in_place &&
|
||||
p->sz->rnk > 1)
|
||||
p->destroy_input = 1;
|
||||
|
||||
if (p->destroy_input)
|
||||
return FFTW_DESTROY_INPUT;
|
||||
else
|
||||
return FFTW_PRESERVE_INPUT;
|
||||
}
|
||||
|
||||
int can_do(bench_problem *p)
|
||||
{
|
||||
double tim;
|
||||
|
||||
if (verbose > 2 && p->pstring)
|
||||
printf("Planning %s...\n", p->pstring);
|
||||
rdwisdom();
|
||||
|
||||
timer_start(USER_TIMER);
|
||||
the_plan = mkplan(p, preserve_input_flags(p) | the_flags | FFTW_ESTIMATE);
|
||||
tim = timer_stop(USER_TIMER);
|
||||
if (verbose > 2) printf("estimate-planner time: %g s\n", tim);
|
||||
|
||||
if (the_plan) {
|
||||
FFTW(destroy_plan)(the_plan);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setup(bench_problem *p)
|
||||
{
|
||||
double tim;
|
||||
|
||||
setup_sigfpe_handler();
|
||||
|
||||
if (amnesia) {
|
||||
FFTW(forget_wisdom)();
|
||||
havewisdom = 0;
|
||||
}
|
||||
|
||||
/* Regression test: check that fftw_malloc exists and links
|
||||
* properly */
|
||||
{
|
||||
void *ptr = FFTW(malloc(42));
|
||||
BENCH_ASSERT(FFTW(alignment_of)((bench_real *)ptr) == 0);
|
||||
FFTW(free(ptr));
|
||||
}
|
||||
|
||||
rdwisdom();
|
||||
install_hook();
|
||||
|
||||
#ifdef HAVE_SMP
|
||||
if (verbose > 1 && nthreads > 1) printf("NTHREADS = %d\n", nthreads);
|
||||
#endif
|
||||
|
||||
timer_start(USER_TIMER);
|
||||
the_plan = mkplan(p, preserve_input_flags(p) | the_flags);
|
||||
tim = timer_stop(USER_TIMER);
|
||||
if (verbose > 1) printf("planner time: %g s\n", tim);
|
||||
|
||||
BENCH_ASSERT(the_plan);
|
||||
|
||||
{
|
||||
double add, mul, nfma, cost, pcost;
|
||||
FFTW(flops)(the_plan, &add, &mul, &nfma);
|
||||
cost = FFTW(estimate_cost)(the_plan);
|
||||
pcost = FFTW(cost)(the_plan);
|
||||
if (verbose > 1) {
|
||||
FFTW(print_plan)(the_plan);
|
||||
printf("\n");
|
||||
printf("flops: %0.0f add, %0.0f mul, %0.0f fma\n",
|
||||
add, mul, nfma);
|
||||
printf("estimated cost: %f, pcost = %f\n", cost, pcost);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void doit(int iter, bench_problem *p)
|
||||
{
|
||||
int i;
|
||||
FFTW(plan) q = the_plan;
|
||||
|
||||
UNUSED(p);
|
||||
for (i = 0; i < iter; ++i)
|
||||
FFTW(execute)(q);
|
||||
}
|
||||
|
||||
void done(bench_problem *p)
|
||||
{
|
||||
UNUSED(p);
|
||||
|
||||
FFTW(destroy_plan)(the_plan);
|
||||
uninstall_hook();
|
||||
}
|
||||
|
||||
void cleanup(void)
|
||||
{
|
||||
initial_cleanup();
|
||||
|
||||
wrwisdom();
|
||||
#ifdef HAVE_SMP
|
||||
FFTW(cleanup_threads)();
|
||||
#else
|
||||
FFTW(cleanup)();
|
||||
#endif
|
||||
|
||||
# ifdef FFTW_DEBUG_MALLOC
|
||||
{
|
||||
/* undocumented memory checker */
|
||||
FFTW_EXTERN void FFTW(malloc_print_minfo)(int v);
|
||||
FFTW(malloc_print_minfo)(verbose);
|
||||
}
|
||||
# endif
|
||||
|
||||
final_cleanup();
|
||||
}
|
||||
37
fftw-3.3.10/tests/fftw-bench.h
Normal file
37
fftw-3.3.10/tests/fftw-bench.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* declarations of common subroutines, etc. for use with FFTW
|
||||
self-test/benchmark program (see bench.c). */
|
||||
|
||||
#include "libbench2/bench-user.h"
|
||||
#include "api/fftw3.h"
|
||||
|
||||
#define CONCAT(prefix, name) prefix ## name
|
||||
#if defined(BENCHFFT_SINGLE)
|
||||
#define FFTW(x) CONCAT(fftwf_, x)
|
||||
#elif defined(BENCHFFT_LDOUBLE)
|
||||
#define FFTW(x) CONCAT(fftwl_, x)
|
||||
#elif defined(BENCHFFT_QUAD)
|
||||
#define FFTW(x) CONCAT(fftwq_, x)
|
||||
#else
|
||||
#define FFTW(x) CONCAT(fftw_, x)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern FFTW(plan) mkplan(bench_problem *p, unsigned flags);
|
||||
extern void initial_cleanup(void);
|
||||
extern void final_cleanup(void);
|
||||
extern int import_wisdom(FILE *f);
|
||||
extern void export_wisdom(FILE *f);
|
||||
|
||||
#if defined(HAVE_THREADS) || defined(HAVE_OPENMP)
|
||||
# define HAVE_SMP
|
||||
extern int threads_ok;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
259
fftw-3.3.10/tests/hook.c
Normal file
259
fftw-3.3.10/tests/hook.c
Normal file
@@ -0,0 +1,259 @@
|
||||
/* fftw hook to be used in the benchmark program.
|
||||
|
||||
We keep it in a separate file because
|
||||
|
||||
1) bench.c is supposed to test the API---we do not want to #include
|
||||
"ifftw.h" and accidentally use internal symbols/macros.
|
||||
2) this code is a royal mess. The messiness is due to
|
||||
A) confusion between internal fftw tensors and bench_tensor's
|
||||
(which we want to keep separate because the benchmark
|
||||
program tests other routines too)
|
||||
B) despite A), our desire to recycle the libbench verifier.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "libbench2/bench-user.h"
|
||||
|
||||
#define CALLING_FFTW /* hack for Windows DLL nonsense */
|
||||
#include "api/api.h"
|
||||
#include "dft/dft.h"
|
||||
#include "rdft/rdft.h"
|
||||
|
||||
extern int paranoid; /* in bench.c */
|
||||
extern X(plan) the_plan; /* in bench.c */
|
||||
|
||||
/*
|
||||
transform an fftw tensor into a bench_tensor.
|
||||
*/
|
||||
static bench_tensor *fftw_tensor_to_bench_tensor(tensor *t)
|
||||
{
|
||||
bench_tensor *bt = mktensor(t->rnk);
|
||||
|
||||
if (FINITE_RNK(t->rnk)) {
|
||||
int i;
|
||||
for (i = 0; i < t->rnk; ++i) {
|
||||
/* FIXME: 64-bit unclean because of INT -> int conversion */
|
||||
bt->dims[i].n = t->dims[i].n;
|
||||
bt->dims[i].is = t->dims[i].is;
|
||||
bt->dims[i].os = t->dims[i].os;
|
||||
BENCH_ASSERT(bt->dims[i].n == t->dims[i].n);
|
||||
BENCH_ASSERT(bt->dims[i].is == t->dims[i].is);
|
||||
BENCH_ASSERT(bt->dims[i].os == t->dims[i].os);
|
||||
}
|
||||
}
|
||||
return bt;
|
||||
}
|
||||
|
||||
/*
|
||||
transform an fftw problem into a bench_problem.
|
||||
*/
|
||||
static bench_problem *fftw_problem_to_bench_problem(planner *plnr,
|
||||
const problem *p_)
|
||||
{
|
||||
bench_problem *bp = 0;
|
||||
switch (p_->adt->problem_kind) {
|
||||
case PROBLEM_DFT:
|
||||
{
|
||||
const problem_dft *p = (const problem_dft *) p_;
|
||||
|
||||
if (!p->ri || !p->ii)
|
||||
abort();
|
||||
|
||||
bp = (bench_problem *) bench_malloc(sizeof(bench_problem));
|
||||
|
||||
bp->kind = PROBLEM_COMPLEX;
|
||||
bp->sign = FFT_SIGN;
|
||||
bp->split = 1; /* tensor strides are in R's, not C's */
|
||||
bp->in = UNTAINT(p->ri);
|
||||
bp->out = UNTAINT(p->ro);
|
||||
bp->ini = UNTAINT(p->ii);
|
||||
bp->outi = UNTAINT(p->io);
|
||||
bp->inphys = bp->outphys = 0;
|
||||
bp->iphyssz = bp->ophyssz = 0;
|
||||
bp->in_place = p->ri == p->ro;
|
||||
bp->sz = fftw_tensor_to_bench_tensor(p->sz);
|
||||
bp->vecsz = fftw_tensor_to_bench_tensor(p->vecsz);
|
||||
bp->k = 0;
|
||||
break;
|
||||
}
|
||||
case PROBLEM_RDFT:
|
||||
{
|
||||
const problem_rdft *p = (const problem_rdft *) p_;
|
||||
int i;
|
||||
|
||||
if (!p->I || !p->O)
|
||||
abort();
|
||||
|
||||
for (i = 0; i < p->sz->rnk; ++i)
|
||||
switch (p->kind[i]) {
|
||||
case R2HC01:
|
||||
case R2HC10:
|
||||
case R2HC11:
|
||||
case HC2R01:
|
||||
case HC2R10:
|
||||
case HC2R11:
|
||||
return bp;
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
||||
bp = (bench_problem *) bench_malloc(sizeof(bench_problem));
|
||||
|
||||
bp->kind = PROBLEM_R2R;
|
||||
bp->sign = FFT_SIGN;
|
||||
bp->split = 0;
|
||||
bp->in = UNTAINT(p->I);
|
||||
bp->out = UNTAINT(p->O);
|
||||
bp->ini = bp->outi = 0;
|
||||
bp->inphys = bp->outphys = 0;
|
||||
bp->iphyssz = bp->ophyssz = 0;
|
||||
bp->in_place = p->I == p->O;
|
||||
bp->sz = fftw_tensor_to_bench_tensor(p->sz);
|
||||
bp->vecsz = fftw_tensor_to_bench_tensor(p->vecsz);
|
||||
bp->k = (r2r_kind_t *) bench_malloc(sizeof(r2r_kind_t) * p->sz->rnk);
|
||||
for (i = 0; i < p->sz->rnk; ++i)
|
||||
switch (p->kind[i]) {
|
||||
case R2HC: bp->k[i] = R2R_R2HC; break;
|
||||
case HC2R: bp->k[i] = R2R_HC2R; break;
|
||||
case DHT: bp->k[i] = R2R_DHT; break;
|
||||
case REDFT00: bp->k[i] = R2R_REDFT00; break;
|
||||
case REDFT01: bp->k[i] = R2R_REDFT01; break;
|
||||
case REDFT10: bp->k[i] = R2R_REDFT10; break;
|
||||
case REDFT11: bp->k[i] = R2R_REDFT11; break;
|
||||
case RODFT00: bp->k[i] = R2R_RODFT00; break;
|
||||
case RODFT01: bp->k[i] = R2R_RODFT01; break;
|
||||
case RODFT10: bp->k[i] = R2R_RODFT10; break;
|
||||
case RODFT11: bp->k[i] = R2R_RODFT11; break;
|
||||
default: CK(0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PROBLEM_RDFT2:
|
||||
{
|
||||
const problem_rdft2 *p = (const problem_rdft2 *) p_;
|
||||
int rnk = p->sz->rnk;
|
||||
|
||||
if (!p->r0 || !p->r1 || !p->cr || !p->ci)
|
||||
abort();
|
||||
|
||||
/* give up verifying rdft2 R2HCII */
|
||||
if (p->kind != R2HC && p->kind != HC2R)
|
||||
return bp;
|
||||
|
||||
if (rnk > 0) {
|
||||
/* can't verify separate even/odd arrays for now */
|
||||
if (2 * (p->r1 - p->r0) !=
|
||||
((p->kind == R2HC) ?
|
||||
p->sz->dims[rnk-1].is : p->sz->dims[rnk-1].os))
|
||||
return bp;
|
||||
}
|
||||
|
||||
bp = (bench_problem *) bench_malloc(sizeof(bench_problem));
|
||||
|
||||
bp->kind = PROBLEM_REAL;
|
||||
bp->sign = p->kind == R2HC ? FFT_SIGN : -FFT_SIGN;
|
||||
bp->split = 1; /* tensor strides are in R's, not C's */
|
||||
if (p->kind == R2HC) {
|
||||
bp->sign = FFT_SIGN;
|
||||
bp->in = UNTAINT(p->r0);
|
||||
bp->out = UNTAINT(p->cr);
|
||||
bp->ini = 0;
|
||||
bp->outi = UNTAINT(p->ci);
|
||||
}
|
||||
else {
|
||||
bp->sign = -FFT_SIGN;
|
||||
bp->out = UNTAINT(p->r0);
|
||||
bp->in = UNTAINT(p->cr);
|
||||
bp->outi = 0;
|
||||
bp->ini = UNTAINT(p->ci);
|
||||
}
|
||||
bp->inphys = bp->outphys = 0;
|
||||
bp->iphyssz = bp->ophyssz = 0;
|
||||
bp->in_place = p->r0 == p->cr;
|
||||
bp->sz = fftw_tensor_to_bench_tensor(p->sz);
|
||||
if (rnk > 0) {
|
||||
if (p->kind == R2HC)
|
||||
bp->sz->dims[rnk-1].is /= 2;
|
||||
else
|
||||
bp->sz->dims[rnk-1].os /= 2;
|
||||
}
|
||||
bp->vecsz = fftw_tensor_to_bench_tensor(p->vecsz);
|
||||
bp->k = 0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
||||
bp->userinfo = 0;
|
||||
bp->pstring = 0;
|
||||
bp->destroy_input = !NO_DESTROY_INPUTP(plnr);
|
||||
|
||||
return bp;
|
||||
}
|
||||
|
||||
static void hook(planner *plnr, plan *pln, const problem *p_, int optimalp)
|
||||
{
|
||||
int rounds = 5;
|
||||
double tol = SINGLE_PRECISION ? 1.0e-3 : 1.0e-10;
|
||||
UNUSED(optimalp);
|
||||
|
||||
if (verbose > 5) {
|
||||
printer *pr = X(mkprinter_file)(stdout);
|
||||
pr->print(pr, "%P:%(%p%)\n", p_, pln);
|
||||
X(printer_destroy)(pr);
|
||||
printf("cost %g \n\n", pln->pcost);
|
||||
}
|
||||
|
||||
if (paranoid) {
|
||||
bench_problem *bp;
|
||||
|
||||
bp = fftw_problem_to_bench_problem(plnr, p_);
|
||||
if (bp) {
|
||||
X(plan) the_plan_save = the_plan;
|
||||
|
||||
the_plan = (apiplan *) MALLOC(sizeof(apiplan), PLANS);
|
||||
the_plan->pln = pln;
|
||||
the_plan->prb = (problem *) p_;
|
||||
|
||||
X(plan_awake)(pln, AWAKE_SQRTN_TABLE);
|
||||
verify_problem(bp, rounds, tol);
|
||||
X(plan_awake)(pln, SLEEPY);
|
||||
|
||||
X(ifree)(the_plan);
|
||||
the_plan = the_plan_save;
|
||||
|
||||
problem_destroy(bp);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static void paranoid_checks(void)
|
||||
{
|
||||
/* FIXME: assumes char = 8 bits, which is false on at least one
|
||||
DSP I know of. */
|
||||
#if 0
|
||||
/* if flags_t is not 64 bits i want to know it. */
|
||||
CK(sizeof(flags_t) == 8);
|
||||
|
||||
CK(sizeof(md5uint) >= 4);
|
||||
#endif
|
||||
|
||||
CK(sizeof(uintptr_t) >= sizeof(R *));
|
||||
|
||||
CK(sizeof(INT) >= sizeof(R *));
|
||||
}
|
||||
|
||||
void install_hook(void)
|
||||
{
|
||||
planner *plnr = X(the_planner)();
|
||||
plnr->hook = hook;
|
||||
paranoid_checks();
|
||||
}
|
||||
|
||||
void uninstall_hook(void)
|
||||
{
|
||||
planner *plnr = X(the_planner)();
|
||||
plnr->hook = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user