This commit is contained in:
2025-07-12 12:17:44 +03:00
parent c759f60ff7
commit 792e1b937a
3507 changed files with 492613 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
AM_CPPFLAGS = -I $(top_srcdir)
AM_CFLAGS = $(STACK_ALIGN_CFLAGS)
if OPENMP
FFTWOMPLIB = libfftw3@PREC_SUFFIX@_omp.la
else
FFTWOMPLIB =
endif
if THREADS
if COMBINED_THREADS
noinst_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la
else
lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la $(FFTWOMPLIB)
endif
else
lib_LTLIBRARIES = $(FFTWOMPLIB)
endif
libfftw3@PREC_SUFFIX@_threads_la_SOURCES = api.c conf.c threads.c \
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
if !COMBINED_THREADS
libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
endif
libfftw3@PREC_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_omp_la_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS)
libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
if !COMBINED_THREADS
libfftw3@PREC_SUFFIX@_omp_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
endif

View File

@@ -0,0 +1,897 @@
# 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 = threads
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__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
@COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_omp_la_DEPENDENCIES = \
@COMBINED_THREADS_FALSE@ ../libfftw3@PREC_SUFFIX@.la
am_libfftw3@PREC_SUFFIX@_omp_la_OBJECTS = \
libfftw3@PREC_SUFFIX@_omp_la-api.lo \
libfftw3@PREC_SUFFIX@_omp_la-conf.lo \
libfftw3@PREC_SUFFIX@_omp_la-openmp.lo \
libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.lo \
libfftw3@PREC_SUFFIX@_omp_la-ct.lo \
libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.lo \
libfftw3@PREC_SUFFIX@_omp_la-hc2hc.lo \
libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.lo \
libfftw3@PREC_SUFFIX@_omp_la-f77api.lo
libfftw3@PREC_SUFFIX@_omp_la_OBJECTS = \
$(am_libfftw3@PREC_SUFFIX@_omp_la_OBJECTS)
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 =
libfftw3@PREC_SUFFIX@_omp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) \
$(libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS) $(LDFLAGS) -o $@
@COMBINED_THREADS_FALSE@@OPENMP_TRUE@@THREADS_TRUE@am_libfftw3@PREC_SUFFIX@_omp_la_rpath = \
@COMBINED_THREADS_FALSE@@OPENMP_TRUE@@THREADS_TRUE@ -rpath \
@COMBINED_THREADS_FALSE@@OPENMP_TRUE@@THREADS_TRUE@ $(libdir)
@OPENMP_TRUE@@THREADS_FALSE@am_libfftw3@PREC_SUFFIX@_omp_la_rpath = \
@OPENMP_TRUE@@THREADS_FALSE@ -rpath $(libdir)
@COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_threads_la_DEPENDENCIES = \
@COMBINED_THREADS_FALSE@ ../libfftw3@PREC_SUFFIX@.la
am_libfftw3@PREC_SUFFIX@_threads_la_OBJECTS = \
libfftw3@PREC_SUFFIX@_threads_la-api.lo \
libfftw3@PREC_SUFFIX@_threads_la-conf.lo \
libfftw3@PREC_SUFFIX@_threads_la-threads.lo \
libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.lo \
libfftw3@PREC_SUFFIX@_threads_la-ct.lo \
libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.lo \
libfftw3@PREC_SUFFIX@_threads_la-hc2hc.lo \
libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.lo \
libfftw3@PREC_SUFFIX@_threads_la-f77api.lo
libfftw3@PREC_SUFFIX@_threads_la_OBJECTS = \
$(am_libfftw3@PREC_SUFFIX@_threads_la_OBJECTS)
libfftw3@PREC_SUFFIX@_threads_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) \
$(libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS) $(LDFLAGS) -o $@
@COMBINED_THREADS_FALSE@@THREADS_TRUE@am_libfftw3@PREC_SUFFIX@_threads_la_rpath = \
@COMBINED_THREADS_FALSE@@THREADS_TRUE@ -rpath $(libdir)
@COMBINED_THREADS_TRUE@@THREADS_TRUE@am_libfftw3@PREC_SUFFIX@_threads_la_rpath =
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)/libfftw3@PREC_SUFFIX@_omp_la-api.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Plo \
./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Plo
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 = $(libfftw3@PREC_SUFFIX@_omp_la_SOURCES) \
$(libfftw3@PREC_SUFFIX@_threads_la_SOURCES)
DIST_SOURCES = $(libfftw3@PREC_SUFFIX@_omp_la_SOURCES) \
$(libfftw3@PREC_SUFFIX@_threads_la_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 $(top_srcdir)/depcomp
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)
AM_CFLAGS = $(STACK_ALIGN_CFLAGS)
@OPENMP_FALSE@FFTWOMPLIB =
@OPENMP_TRUE@FFTWOMPLIB = libfftw3@PREC_SUFFIX@_omp.la
@COMBINED_THREADS_TRUE@@THREADS_TRUE@noinst_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la
@COMBINED_THREADS_FALSE@@THREADS_TRUE@lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la $(FFTWOMPLIB)
@THREADS_FALSE@lib_LTLIBRARIES = $(FFTWOMPLIB)
libfftw3@PREC_SUFFIX@_threads_la_SOURCES = api.c conf.c threads.c \
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
@COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
libfftw3@PREC_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \
threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
vrank-geq1-rdft2.c f77api.c f77funcs.h
libfftw3@PREC_SUFFIX@_omp_la_CFLAGS = $(AM_CFLAGS) $(OPENMP_CFLAGS)
libfftw3@PREC_SUFFIX@_omp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
@COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_omp_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
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 threads/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu threads/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):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libfftw3@PREC_SUFFIX@_omp.la: $(libfftw3@PREC_SUFFIX@_omp_la_OBJECTS) $(libfftw3@PREC_SUFFIX@_omp_la_DEPENDENCIES) $(EXTRA_libfftw3@PREC_SUFFIX@_omp_la_DEPENDENCIES)
$(AM_V_CCLD)$(libfftw3@PREC_SUFFIX@_omp_la_LINK) $(am_libfftw3@PREC_SUFFIX@_omp_la_rpath) $(libfftw3@PREC_SUFFIX@_omp_la_OBJECTS) $(libfftw3@PREC_SUFFIX@_omp_la_LIBADD) $(LIBS)
libfftw3@PREC_SUFFIX@_threads.la: $(libfftw3@PREC_SUFFIX@_threads_la_OBJECTS) $(libfftw3@PREC_SUFFIX@_threads_la_DEPENDENCIES) $(EXTRA_libfftw3@PREC_SUFFIX@_threads_la_DEPENDENCIES)
$(AM_V_CCLD)$(libfftw3@PREC_SUFFIX@_threads_la_LINK) $(am_libfftw3@PREC_SUFFIX@_threads_la_rpath) $(libfftw3@PREC_SUFFIX@_threads_la_OBJECTS) $(libfftw3@PREC_SUFFIX@_threads_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-api.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Plo@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 $@ $<
libfftw3@PREC_SUFFIX@_omp_la-api.lo: api.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-api.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-api.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-api.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-api.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api.c' object='libfftw3@PREC_SUFFIX@_omp_la-api.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
libfftw3@PREC_SUFFIX@_omp_la-conf.lo: conf.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-conf.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='libfftw3@PREC_SUFFIX@_omp_la-conf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c
libfftw3@PREC_SUFFIX@_omp_la-openmp.lo: openmp.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-openmp.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-openmp.lo `test -f 'openmp.c' || echo '$(srcdir)/'`openmp.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='openmp.c' object='libfftw3@PREC_SUFFIX@_omp_la-openmp.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-openmp.lo `test -f 'openmp.c' || echo '$(srcdir)/'`openmp.c
libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.lo: dft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.lo `test -f 'dft-vrank-geq1.c' || echo '$(srcdir)/'`dft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dft-vrank-geq1.c' object='libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.lo `test -f 'dft-vrank-geq1.c' || echo '$(srcdir)/'`dft-vrank-geq1.c
libfftw3@PREC_SUFFIX@_omp_la-ct.lo: ct.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-ct.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-ct.lo `test -f 'ct.c' || echo '$(srcdir)/'`ct.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ct.c' object='libfftw3@PREC_SUFFIX@_omp_la-ct.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-ct.lo `test -f 'ct.c' || echo '$(srcdir)/'`ct.c
libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.lo: rdft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.lo `test -f 'rdft-vrank-geq1.c' || echo '$(srcdir)/'`rdft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rdft-vrank-geq1.c' object='libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.lo `test -f 'rdft-vrank-geq1.c' || echo '$(srcdir)/'`rdft-vrank-geq1.c
libfftw3@PREC_SUFFIX@_omp_la-hc2hc.lo: hc2hc.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-hc2hc.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-hc2hc.lo `test -f 'hc2hc.c' || echo '$(srcdir)/'`hc2hc.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hc2hc.c' object='libfftw3@PREC_SUFFIX@_omp_la-hc2hc.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-hc2hc.lo `test -f 'hc2hc.c' || echo '$(srcdir)/'`hc2hc.c
libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.lo: vrank-geq1-rdft2.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.lo `test -f 'vrank-geq1-rdft2.c' || echo '$(srcdir)/'`vrank-geq1-rdft2.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vrank-geq1-rdft2.c' object='libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.lo `test -f 'vrank-geq1-rdft2.c' || echo '$(srcdir)/'`vrank-geq1-rdft2.c
libfftw3@PREC_SUFFIX@_omp_la-f77api.lo: f77api.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_omp_la-f77api.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Tpo -c -o libfftw3@PREC_SUFFIX@_omp_la-f77api.lo `test -f 'f77api.c' || echo '$(srcdir)/'`f77api.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='f77api.c' object='libfftw3@PREC_SUFFIX@_omp_la-f77api.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_omp_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_omp_la-f77api.lo `test -f 'f77api.c' || echo '$(srcdir)/'`f77api.c
libfftw3@PREC_SUFFIX@_threads_la-api.lo: api.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-api.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api.c' object='libfftw3@PREC_SUFFIX@_threads_la-api.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-api.lo `test -f 'api.c' || echo '$(srcdir)/'`api.c
libfftw3@PREC_SUFFIX@_threads_la-conf.lo: conf.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-conf.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='libfftw3@PREC_SUFFIX@_threads_la-conf.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c
libfftw3@PREC_SUFFIX@_threads_la-threads.lo: threads.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-threads.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-threads.lo `test -f 'threads.c' || echo '$(srcdir)/'`threads.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='threads.c' object='libfftw3@PREC_SUFFIX@_threads_la-threads.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-threads.lo `test -f 'threads.c' || echo '$(srcdir)/'`threads.c
libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.lo: dft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.lo `test -f 'dft-vrank-geq1.c' || echo '$(srcdir)/'`dft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dft-vrank-geq1.c' object='libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.lo `test -f 'dft-vrank-geq1.c' || echo '$(srcdir)/'`dft-vrank-geq1.c
libfftw3@PREC_SUFFIX@_threads_la-ct.lo: ct.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-ct.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-ct.lo `test -f 'ct.c' || echo '$(srcdir)/'`ct.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ct.c' object='libfftw3@PREC_SUFFIX@_threads_la-ct.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-ct.lo `test -f 'ct.c' || echo '$(srcdir)/'`ct.c
libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.lo: rdft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.lo `test -f 'rdft-vrank-geq1.c' || echo '$(srcdir)/'`rdft-vrank-geq1.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rdft-vrank-geq1.c' object='libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.lo `test -f 'rdft-vrank-geq1.c' || echo '$(srcdir)/'`rdft-vrank-geq1.c
libfftw3@PREC_SUFFIX@_threads_la-hc2hc.lo: hc2hc.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-hc2hc.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-hc2hc.lo `test -f 'hc2hc.c' || echo '$(srcdir)/'`hc2hc.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hc2hc.c' object='libfftw3@PREC_SUFFIX@_threads_la-hc2hc.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-hc2hc.lo `test -f 'hc2hc.c' || echo '$(srcdir)/'`hc2hc.c
libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.lo: vrank-geq1-rdft2.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.lo `test -f 'vrank-geq1-rdft2.c' || echo '$(srcdir)/'`vrank-geq1-rdft2.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vrank-geq1-rdft2.c' object='libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.lo `test -f 'vrank-geq1-rdft2.c' || echo '$(srcdir)/'`vrank-geq1-rdft2.c
libfftw3@PREC_SUFFIX@_threads_la-f77api.lo: f77api.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -MT libfftw3@PREC_SUFFIX@_threads_la-f77api.lo -MD -MP -MF $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Tpo -c -o libfftw3@PREC_SUFFIX@_threads_la-f77api.lo `test -f 'f77api.c' || echo '$(srcdir)/'`f77api.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Tpo $(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='f77api.c' object='libfftw3@PREC_SUFFIX@_threads_la-f77api.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfftw3@PREC_SUFFIX@_threads_la_CFLAGS) $(CFLAGS) -c -o libfftw3@PREC_SUFFIX@_threads_la-f77api.lo `test -f 'f77api.c' || echo '$(srcdir)/'`f77api.c
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 $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(libdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
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-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile 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-libLTLIBRARIES
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)/libfftw3@PREC_SUFFIX@_omp_la-api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-conf.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-ct.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-dft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-f77api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-hc2hc.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-openmp.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-rdft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_omp_la-vrank-geq1-rdft2.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-conf.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-ct.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-dft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-f77api.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-hc2hc.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-rdft-vrank-geq1.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-threads.Plo
-rm -f ./$(DEPDIR)/libfftw3@PREC_SUFFIX@_threads_la-vrank-geq1-rdft2.Plo
-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: uninstall-libLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: all all-am am--depfiles check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
cscopelist-am ctags-am distclean distclean-compile \
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-libLTLIBRARIES 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-am uninstall uninstall-am uninstall-libLTLIBRARIES
.PRECIOUS: Makefile
# 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:

99
fftw-3.3.10/threads/api.c Normal file
View File

@@ -0,0 +1,99 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
#include "threads/threads.h"
static int threads_inited = 0;
static void threads_register_hooks(void)
{
X(mksolver_ct_hook) = X(mksolver_ct_threads);
X(mksolver_hc2hc_hook) = X(mksolver_hc2hc_threads);
}
static void threads_unregister_hooks(void)
{
X(mksolver_ct_hook) = 0;
X(mksolver_hc2hc_hook) = 0;
}
/* should be called before all other FFTW functions! */
int X(init_threads)(void)
{
if (!threads_inited) {
planner *plnr;
if (X(ithreads_init)())
return 0;
threads_register_hooks();
/* this should be the first time the_planner is called,
and hence the time it is configured */
plnr = X(the_planner)();
X(threads_conf_standard)(plnr);
threads_inited = 1;
}
return 1;
}
void X(cleanup_threads)(void)
{
X(cleanup)();
if (threads_inited) {
X(threads_cleanup)();
threads_unregister_hooks();
threads_inited = 0;
}
}
void X(plan_with_nthreads)(int nthreads)
{
planner *plnr;
if (!threads_inited) {
X(cleanup)();
X(init_threads)();
}
A(threads_inited);
plnr = X(the_planner)();
plnr->nthr = X(imax)(1, nthreads);
}
int X(planner_nthreads)(void)
{
return X(the_planner)()->nthr;
}
void X(make_planner_thread_safe)(void)
{
X(threads_register_planner_hooks)();
}
spawnloop_function X(spawnloop_callback) = (spawnloop_function) 0;
void *X(spawnloop_callback_data) = (void *) 0;
void X(threads_set_callback)(void (*spawnloop)(void *(*work)(char *), char *, size_t, int, void *), void *data)
{
X(spawnloop_callback) = (spawnloop_function) spawnloop;
X(spawnloop_callback_data) = data;
}

View File

@@ -0,0 +1,36 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "threads/threads.h"
static const solvtab s =
{
SOLVTAB(X(dft_thr_vrank_geq1_register)),
SOLVTAB(X(rdft_thr_vrank_geq1_register)),
SOLVTAB(X(rdft2_thr_vrank_geq1_register)),
SOLVTAB_END
};
void X(threads_conf_standard)(planner *p)
{
X(solvtab_exec)(s, p);
}

271
fftw-3.3.10/threads/ct.c Normal file
View File

@@ -0,0 +1,271 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "threads/threads.h"
typedef struct {
plan_dft super;
plan *cld;
plan **cldws;
int nthr;
INT r;
} P;
typedef struct {
plan **cldws;
R *r, *i;
} PD;
static void *spawn_apply(spawn_data *d)
{
PD *ego = (PD *) d->data;
INT thr_num = d->thr_num;
plan_dftw *cldw = (plan_dftw *) (ego->cldws[thr_num]);
cldw->apply((plan *) cldw, ego->r, ego->i);
return 0;
}
static void apply_dit(const plan *ego_, R *ri, R *ii, R *ro, R *io)
{
const P *ego = (const P *) ego_;
plan_dft *cld;
cld = (plan_dft *) ego->cld;
cld->apply(ego->cld, ri, ii, ro, io);
{
PD d;
d.r = ro; d.i = io;
d.cldws = ego->cldws;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*)&d);
}
}
static void apply_dif(const plan *ego_, R *ri, R *ii, R *ro, R *io)
{
const P *ego = (const P *) ego_;
plan_dft *cld;
{
PD d;
d.r = ri; d.i = ii;
d.cldws = ego->cldws;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*)&d);
}
cld = (plan_dft *) ego->cld;
cld->apply(ego->cld, ri, ii, ro, io);
}
static void awake(plan *ego_, enum wakefulness wakefulness)
{
P *ego = (P *) ego_;
int i;
X(plan_awake)(ego->cld, wakefulness);
for (i = 0; i < ego->nthr; ++i)
X(plan_awake)(ego->cldws[i], wakefulness);
}
static void destroy(plan *ego_)
{
P *ego = (P *) ego_;
int i;
X(plan_destroy_internal)(ego->cld);
for (i = 0; i < ego->nthr; ++i)
X(plan_destroy_internal)(ego->cldws[i]);
X(ifree)(ego->cldws);
}
static void print(const plan *ego_, printer *p)
{
const P *ego = (const P *) ego_;
int i;
p->print(p, "(dft-thr-ct-%s-x%d/%D",
ego->super.apply == apply_dit ? "dit" : "dif",
ego->nthr, ego->r);
for (i = 0; i < ego->nthr; ++i)
if (i == 0 || (ego->cldws[i] != ego->cldws[i-1] &&
(i <= 1 || ego->cldws[i] != ego->cldws[i-2])))
p->print(p, "%(%p%)", ego->cldws[i]);
p->print(p, "%(%p%))", ego->cld);
}
static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
{
const ct_solver *ego = (const ct_solver *) ego_;
const problem_dft *p;
P *pln = 0;
plan *cld = 0, **cldws = 0;
INT n, r, m, v, ivs, ovs;
INT block_size;
int i, nthr, plnr_nthr_save;
iodim *d;
static const plan_adt padt = {
X(dft_solve), awake, print, destroy
};
if (plnr->nthr <= 1 || !X(ct_applicable)(ego, p_, plnr))
return (plan *) 0;
p = (const problem_dft *) p_;
d = p->sz->dims;
n = d[0].n;
r = X(choose_radix)(ego->r, n);
m = n / r;
X(tensor_tornk1)(p->vecsz, &v, &ivs, &ovs);
block_size = (m + plnr->nthr - 1) / plnr->nthr;
nthr = (int)((m + block_size - 1) / block_size);
plnr_nthr_save = plnr->nthr;
plnr->nthr = (plnr->nthr + nthr - 1) / nthr;
cldws = (plan **) MALLOC(sizeof(plan *) * nthr, PLANS);
for (i = 0; i < nthr; ++i) cldws[i] = (plan *) 0;
switch (ego->dec) {
case DECDIT:
{
for (i = 0; i < nthr; ++i) {
cldws[i] = ego->mkcldw(ego,
r, m * d[0].os, m * d[0].os,
m, d[0].os,
v, ovs, ovs,
i*block_size,
(i == nthr - 1) ?
(m - i*block_size) : block_size,
p->ro, p->io, plnr);
if (!cldws[i]) goto nada;
}
plnr->nthr = plnr_nthr_save;
cld = X(mkplan_d)(plnr,
X(mkproblem_dft_d)(
X(mktensor_1d)(m, r * d[0].is, d[0].os),
X(mktensor_2d)(r, d[0].is, m * d[0].os,
v, ivs, ovs),
p->ri, p->ii, p->ro, p->io)
);
if (!cld) goto nada;
pln = MKPLAN_DFT(P, &padt, apply_dit);
break;
}
case DECDIF:
case DECDIF+TRANSPOSE:
{
INT cors, covs; /* cldw ors, ovs */
if (ego->dec == DECDIF+TRANSPOSE) {
cors = ivs;
covs = m * d[0].is;
/* ensure that we generate well-formed dftw subproblems */
/* FIXME: too conservative */
if (!(1
&& r == v
&& d[0].is == r * cors))
goto nada;
/* FIXME: allow in-place only for now, like in
fftw-3.[01] */
if (!(1
&& p->ri == p->ro
&& d[0].is == r * d[0].os
&& cors == d[0].os
&& covs == ovs
))
goto nada;
} else {
cors = m * d[0].is;
covs = ivs;
}
for (i = 0; i < nthr; ++i) {
cldws[i] = ego->mkcldw(ego,
r, m * d[0].is, cors,
m, d[0].is,
v, ivs, covs,
i*block_size,
(i == nthr - 1) ?
(m - i*block_size) : block_size,
p->ri, p->ii, plnr);
if (!cldws[i]) goto nada;
}
plnr->nthr = plnr_nthr_save;
cld = X(mkplan_d)(plnr,
X(mkproblem_dft_d)(
X(mktensor_1d)(m, d[0].is, r * d[0].os),
X(mktensor_2d)(r, cors, d[0].os,
v, covs, ovs),
p->ri, p->ii, p->ro, p->io)
);
if (!cld) goto nada;
pln = MKPLAN_DFT(P, &padt, apply_dif);
break;
}
default: A(0);
}
pln->cld = cld;
pln->cldws = cldws;
pln->nthr = nthr;
pln->r = r;
X(ops_zero)(&pln->super.super.ops);
for (i = 0; i < nthr; ++i) {
X(ops_add2)(&cldws[i]->ops, &pln->super.super.ops);
pln->super.super.could_prune_now_p |= cldws[i]->could_prune_now_p;
}
X(ops_add2)(&cld->ops, &pln->super.super.ops);
return &(pln->super.super);
nada:
if (cldws) {
for (i = 0; i < nthr; ++i)
X(plan_destroy_internal)(cldws[i]);
X(ifree)(cldws);
}
X(plan_destroy_internal)(cld);
return (plan *) 0;
}
ct_solver *X(mksolver_ct_threads)(size_t size, INT r, int dec,
ct_mkinferior mkcldw,
ct_force_vrecursion force_vrecursionp)
{
static const solver_adt sadt = { PROBLEM_DFT, mkplan, 0 };
ct_solver *slv = (ct_solver *) X(mksolver)(size, &sadt);
slv->r = r;
slv->dec = dec;
slv->mkcldw = mkcldw;
slv->force_vrecursionp = force_vrecursionp;
return slv;
}

View File

@@ -0,0 +1,224 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "threads/threads.h"
typedef struct {
solver super;
int vecloop_dim;
const int *buddies;
size_t nbuddies;
} S;
typedef struct {
plan_dft super;
plan **cldrn;
INT its, ots;
int nthr;
const S *solver;
} P;
typedef struct {
INT its, ots;
R *ri, *ii, *ro, *io;
plan **cldrn;
} PD;
static void *spawn_apply(spawn_data *d)
{
PD *ego = (PD *) d->data;
INT its = ego->its;
INT ots = ego->ots;
int thr_num = d->thr_num;
plan_dft *cld = (plan_dft *) ego->cldrn[thr_num];
cld->apply((plan *) cld,
ego->ri + thr_num * its, ego->ii + thr_num * its,
ego->ro + thr_num * ots, ego->io + thr_num * ots);
return 0;
}
static void apply(const plan *ego_, R *ri, R *ii, R *ro, R *io)
{
const P *ego = (const P *) ego_;
PD d;
d.its = ego->its;
d.ots = ego->ots;
d.cldrn = ego->cldrn;
d.ri = ri; d.ii = ii; d.ro = ro; d.io = io;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*) &d);
}
static void awake(plan *ego_, enum wakefulness wakefulness)
{
P *ego = (P *) ego_;
int i;
for (i = 0; i < ego->nthr; ++i)
X(plan_awake)(ego->cldrn[i], wakefulness);
}
static void destroy(plan *ego_)
{
P *ego = (P *) ego_;
int i;
for (i = 0; i < ego->nthr; ++i)
X(plan_destroy_internal)(ego->cldrn[i]);
X(ifree)(ego->cldrn);
}
static void print(const plan *ego_, printer *p)
{
const P *ego = (const P *) ego_;
const S *s = ego->solver;
int i;
p->print(p, "(dft-thr-vrank>=1-x%d/%d", ego->nthr, s->vecloop_dim);
for (i = 0; i < ego->nthr; ++i)
if (i == 0 || (ego->cldrn[i] != ego->cldrn[i-1] &&
(i <= 1 || ego->cldrn[i] != ego->cldrn[i-2])))
p->print(p, "%(%p%)", ego->cldrn[i]);
p->putchr(p, ')');
}
static int pickdim(const S *ego, const tensor *vecsz, int oop, int *dp)
{
return X(pickdim)(ego->vecloop_dim, ego->buddies, ego->nbuddies,
vecsz, oop, dp);
}
static int applicable0(const solver *ego_, const problem *p_,
const planner *plnr, int *dp)
{
const S *ego = (const S *) ego_;
const problem_dft *p = (const problem_dft *) p_;
return (1
&& plnr->nthr > 1
&& FINITE_RNK(p->vecsz->rnk)
&& p->vecsz->rnk > 0
&& pickdim(ego, p->vecsz, p->ri != p->ro, dp)
);
}
static int applicable(const solver *ego_, const problem *p_,
const planner *plnr, int *dp)
{
const S *ego = (const S *)ego_;
if (!applicable0(ego_, p_, plnr, dp)) return 0;
/* fftw2 behavior */
if (NO_VRANK_SPLITSP(plnr) && (ego->vecloop_dim != ego->buddies[0]))
return 0;
return 1;
}
static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
{
const S *ego = (const S *) ego_;
const problem_dft *p;
P *pln;
problem *cldp;
int vdim;
iodim *d;
plan **cldrn = (plan **) 0;
int i, nthr;
INT its, ots, block_size;
tensor *vecsz = 0;
static const plan_adt padt = {
X(dft_solve), awake, print, destroy
};
if (!applicable(ego_, p_, plnr, &vdim))
return (plan *) 0;
p = (const problem_dft *) p_;
d = p->vecsz->dims + vdim;
block_size = (d->n + plnr->nthr - 1) / plnr->nthr;
nthr = (int)((d->n + block_size - 1) / block_size);
plnr->nthr = (plnr->nthr + nthr - 1) / nthr;
its = d->is * block_size;
ots = d->os * block_size;
cldrn = (plan **)MALLOC(sizeof(plan *) * nthr, PLANS);
for (i = 0; i < nthr; ++i) cldrn[i] = (plan *) 0;
vecsz = X(tensor_copy)(p->vecsz);
for (i = 0; i < nthr; ++i) {
vecsz->dims[vdim].n =
(i == nthr - 1) ? (d->n - i*block_size) : block_size;
cldp = X(mkproblem_dft)(p->sz, vecsz,
p->ri + i*its, p->ii + i*its,
p->ro + i*ots, p->io + i*ots);
cldrn[i] = X(mkplan_d)(plnr, cldp);
if (!cldrn[i]) goto nada;
}
X(tensor_destroy)(vecsz);
pln = MKPLAN_DFT(P, &padt, apply);
pln->cldrn = cldrn;
pln->its = its;
pln->ots = ots;
pln->nthr = nthr;
pln->solver = ego;
X(ops_zero)(&pln->super.super.ops);
pln->super.super.pcost = 0;
for (i = 0; i < nthr; ++i) {
X(ops_add2)(&cldrn[i]->ops, &pln->super.super.ops);
pln->super.super.pcost += cldrn[i]->pcost;
}
return &(pln->super.super);
nada:
if (cldrn) {
for (i = 0; i < nthr; ++i)
X(plan_destroy_internal)(cldrn[i]);
X(ifree)(cldrn);
}
X(tensor_destroy)(vecsz);
return (plan *) 0;
}
static solver *mksolver(int vecloop_dim, const int *buddies, size_t nbuddies)
{
static const solver_adt sadt = { PROBLEM_DFT, mkplan, 0 };
S *slv = MKSOLVER(S, &sadt);
slv->vecloop_dim = vecloop_dim;
slv->buddies = buddies;
slv->nbuddies = nbuddies;
return &(slv->super);
}
void X(dft_thr_vrank_geq1_register)(planner *p)
{
/* FIXME: Should we try other vecloop_dim values? */
static const int buddies[] = { 1, -1 };
size_t i;
for (i = 0; i < NELEM(buddies); ++i)
REGISTER_SOLVER(p, mksolver(buddies[i], buddies, NELEM(buddies)));
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "api/api.h"
/* if F77_FUNC is not defined, then we don't know how to mangle identifiers
for the Fortran linker, and we must omit the f77 API. */
#if defined(F77_FUNC) || defined(WINDOWS_F77_MANGLING)
#include "api/x77.h"
#define F77(a, A) F77x(x77(a), X77(A))
#ifndef WINDOWS_F77_MANGLING
#if defined(F77_FUNC)
# define F77x(a, A) F77_FUNC(a, A)
# include "f77funcs.h"
#endif
#if defined(F77_FUNC_) && !defined(F77_FUNC_EQUIV)
# undef F77x
# define F77x(a, A) F77_FUNC_(a, A)
# include "f77funcs.h"
#endif
#else /* WINDOWS_F77_MANGLING */
/* Various mangling conventions common (?) under Windows. */
/* g77 */
# define WINDOWS_F77_FUNC(a, A) a ## __
# define F77x(a, A) WINDOWS_F77_FUNC(a, A)
# include "f77funcs.h"
/* Intel, etc. */
# undef WINDOWS_F77_FUNC
# define WINDOWS_F77_FUNC(a, A) a ## _
# include "f77funcs.h"
/* Digital/Compaq/HP Visual Fortran, Intel Fortran. stdcall attribute
is apparently required to adjust for calling conventions (callee
pops stack in stdcall). See also:
http://msdn.microsoft.com/library/en-us/vccore98/html/_core_mixed.2d.language_programming.3a_.overview.asp
*/
# undef WINDOWS_F77_FUNC
# if defined(__GNUC__)
# define WINDOWS_F77_FUNC(a, A) __attribute__((stdcall)) A
# elif defined(_MSC_VER) || defined(_ICC) || defined(_STDCALL_SUPPORTED)
# define WINDOWS_F77_FUNC(a, A) __stdcall A
# else
# define WINDOWS_F77_FUNC(a, A) A /* oh well */
# endif
# include "f77funcs.h"
#endif /* WINDOWS_F77_MANGLING */
#endif /* F77_FUNC */

View File

@@ -0,0 +1,44 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* Functions in the FFTW Fortran API, mangled according to the
F77(...) macro. This file is designed to be #included by
f77api.c, possibly multiple times in order to support multiple
compiler manglings (via redefinition of F77). */
FFTW_VOIDFUNC F77(plan_with_nthreads, PLAN_WITH_NTHREADS)(int *nthreads)
{
X(plan_with_nthreads)(*nthreads);
}
FFTW_VOIDFUNC F77(planner_nthreads, PLANNER_NTHREADS)(int *nthreads)
{
*nthreads = X(planner_nthreads)();
}
FFTW_VOIDFUNC F77(init_threads, INIT_THREADS)(int *okay)
{
*okay = X(init_threads)();
}
FFTW_VOIDFUNC F77(cleanup_threads, CLEANUP_THREADS)(void)
{
X(cleanup_threads)();
}

234
fftw-3.3.10/threads/hc2hc.c Normal file
View File

@@ -0,0 +1,234 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "threads/threads.h"
typedef struct {
plan_rdft super;
plan *cld;
plan **cldws;
int nthr;
INT r;
} P;
typedef struct {
plan **cldws;
R *IO;
} PD;
static void *spawn_apply(spawn_data *d)
{
PD *ego = (PD *) d->data;
plan_hc2hc *cldw = (plan_hc2hc *) (ego->cldws[d->thr_num]);
cldw->apply((plan *) cldw, ego->IO);
return 0;
}
static void apply_dit(const plan *ego_, R *I, R *O)
{
const P *ego = (const P *) ego_;
plan_rdft *cld;
cld = (plan_rdft *) ego->cld;
cld->apply((plan *) cld, I, O);
{
PD d;
d.IO = O;
d.cldws = ego->cldws;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*)&d);
}
}
static void apply_dif(const plan *ego_, R *I, R *O)
{
const P *ego = (const P *) ego_;
plan_rdft *cld;
{
PD d;
d.IO = I;
d.cldws = ego->cldws;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*)&d);
}
cld = (plan_rdft *) ego->cld;
cld->apply((plan *) cld, I, O);
}
static void awake(plan *ego_, enum wakefulness wakefulness)
{
P *ego = (P *) ego_;
int i;
X(plan_awake)(ego->cld, wakefulness);
for (i = 0; i < ego->nthr; ++i)
X(plan_awake)(ego->cldws[i], wakefulness);
}
static void destroy(plan *ego_)
{
P *ego = (P *) ego_;
int i;
X(plan_destroy_internal)(ego->cld);
for (i = 0; i < ego->nthr; ++i)
X(plan_destroy_internal)(ego->cldws[i]);
X(ifree)(ego->cldws);
}
static void print(const plan *ego_, printer *p)
{
const P *ego = (const P *) ego_;
int i;
p->print(p, "(rdft-thr-ct-%s-x%d/%D",
ego->super.apply == apply_dit ? "dit" : "dif",
ego->nthr, ego->r);
for (i = 0; i < ego->nthr; ++i)
if (i == 0 || (ego->cldws[i] != ego->cldws[i-1] &&
(i <= 1 || ego->cldws[i] != ego->cldws[i-2])))
p->print(p, "%(%p%)", ego->cldws[i]);
p->print(p, "%(%p%))", ego->cld);
}
static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
{
const hc2hc_solver *ego = (const hc2hc_solver *) ego_;
const problem_rdft *p;
P *pln = 0;
plan *cld = 0, **cldws = 0;
INT n, r, m, v, ivs, ovs, mcount;
int i, nthr, plnr_nthr_save;
INT block_size;
iodim *d;
static const plan_adt padt = {
X(rdft_solve), awake, print, destroy
};
if (plnr->nthr <= 1 || !X(hc2hc_applicable)(ego, p_, plnr))
return (plan *) 0;
p = (const problem_rdft *) p_;
d = p->sz->dims;
n = d[0].n;
r = X(choose_radix)(ego->r, n);
m = n / r;
mcount = (m + 2) / 2;
X(tensor_tornk1)(p->vecsz, &v, &ivs, &ovs);
block_size = (mcount + plnr->nthr - 1) / plnr->nthr;
nthr = (int)((mcount + block_size - 1) / block_size);
plnr_nthr_save = plnr->nthr;
plnr->nthr = (plnr->nthr + nthr - 1) / nthr;
cldws = (plan **) MALLOC(sizeof(plan *) * nthr, PLANS);
for (i = 0; i < nthr; ++i) cldws[i] = (plan *) 0;
switch (p->kind[0]) {
case R2HC:
for (i = 0; i < nthr; ++i) {
cldws[i] = ego->mkcldw(ego,
R2HC, r, m, d[0].os, v, ovs,
i*block_size,
(i == nthr - 1) ?
(mcount - i*block_size) : block_size,
p->O, plnr);
if (!cldws[i]) goto nada;
}
plnr->nthr = plnr_nthr_save;
cld = X(mkplan_d)(plnr,
X(mkproblem_rdft_d)(
X(mktensor_1d)(m, r * d[0].is, d[0].os),
X(mktensor_2d)(r, d[0].is, m * d[0].os,
v, ivs, ovs),
p->I, p->O, p->kind)
);
if (!cld) goto nada;
pln = MKPLAN_RDFT(P, &padt, apply_dit);
break;
case HC2R:
for (i = 0; i < nthr; ++i) {
cldws[i] = ego->mkcldw(ego,
HC2R, r, m, d[0].is, v, ivs,
i*block_size,
(i == nthr - 1) ?
(mcount - i*block_size) : block_size,
p->I, plnr);
if (!cldws[i]) goto nada;
}
plnr->nthr = plnr_nthr_save;
cld = X(mkplan_d)(plnr,
X(mkproblem_rdft_d)(
X(mktensor_1d)(m, d[0].is, r * d[0].os),
X(mktensor_2d)(r, m * d[0].is, d[0].os,
v, ivs, ovs),
p->I, p->O, p->kind)
);
if (!cld) goto nada;
pln = MKPLAN_RDFT(P, &padt, apply_dif);
break;
default:
A(0);
}
pln->cld = cld;
pln->cldws = cldws;
pln->nthr = nthr;
pln->r = r;
X(ops_zero)(&pln->super.super.ops);
for (i = 0; i < nthr; ++i) {
X(ops_add2)(&cldws[i]->ops, &pln->super.super.ops);
pln->super.super.could_prune_now_p |= cldws[i]->could_prune_now_p;
}
X(ops_add2)(&cld->ops, &pln->super.super.ops);
return &(pln->super.super);
nada:
if (cldws) {
for (i = 0; i < nthr; ++i)
X(plan_destroy_internal)(cldws[i]);
X(ifree)(cldws);
}
X(plan_destroy_internal)(cld);
return (plan *) 0;
}
hc2hc_solver *X(mksolver_hc2hc_threads)(size_t size, INT r,
hc2hc_mkinferior mkcldw)
{
static const solver_adt sadt = { PROBLEM_RDFT, mkplan, 0 };
hc2hc_solver *slv = (hc2hc_solver *)X(mksolver)(size, &sadt);
slv->r = r;
slv->mkcldw = mkcldw;
return slv;
}

View File

@@ -0,0 +1,96 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* openmp.c: thread spawning via OpenMP */
#include "threads/threads.h"
#if !defined(_OPENMP)
#error OpenMP enabled but not using an OpenMP compiler
#endif
int X(ithreads_init)(void)
{
return 0; /* no error */
}
/* Distribute a loop from 0 to loopmax-1 over nthreads threads.
proc(d) is called to execute a block of iterations from d->min
to d->max-1. d->thr_num indicate the number of the thread
that is executing proc (from 0 to nthreads-1), and d->data is
the same as the data parameter passed to X(spawn_loop).
This function returns only after all the threads have completed. */
void X(spawn_loop)(int loopmax, int nthr, spawn_function proc, void *data)
{
int block_size;
spawn_data d;
int i;
A(loopmax >= 0);
A(nthr > 0);
A(proc);
if (!loopmax) return;
/* Choose the block size and number of threads in order to (1)
minimize the critical path and (2) use the fewest threads that
achieve the same critical path (to minimize overhead).
e.g. if loopmax is 5 and nthr is 4, we should use only 3
threads with block sizes of 2, 2, and 1. */
block_size = (loopmax + nthr - 1) / nthr;
nthr = (loopmax + block_size - 1) / block_size;
if (X(spawnloop_callback)) { /* user-defined spawnloop backend */
spawn_data *sdata;
STACK_MALLOC(spawn_data *, sdata, sizeof(spawn_data) * nthr);
for (i = 0; i < nthr; ++i) {
spawn_data *d = &sdata[i];
d->max = (d->min = i * block_size) + block_size;
if (d->max > loopmax)
d->max = loopmax;
d->thr_num = i;
d->data = data;
}
X(spawnloop_callback)(proc, sdata, sizeof(spawn_data), nthr, X(spawnloop_callback_data));
STACK_FREE(sdata);
return;
}
#pragma omp parallel for private(d)
for (i = 0; i < nthr; ++i) {
d.max = (d.min = i * block_size) + block_size;
if (d.max > loopmax)
d.max = loopmax;
d.thr_num = i;
d.data = data;
proc(&d);
}
}
void X(threads_cleanup)(void)
{
}
/* FIXME [Matteo Frigo 2015-05-25] What does "thread-safe"
mean for openmp? */
void X(threads_register_planner_hooks)(void)
{
}

View File

@@ -0,0 +1,222 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "threads/threads.h"
typedef struct {
solver super;
int vecloop_dim;
const int *buddies;
size_t nbuddies;
} S;
typedef struct {
plan_rdft super;
plan **cldrn;
INT its, ots;
int nthr;
const S *solver;
} P;
typedef struct {
INT its, ots;
R *I, *O;
plan **cldrn;
} PD;
static void *spawn_apply(spawn_data *d)
{
PD *ego = (PD *) d->data;
int thr_num = d->thr_num;
plan_rdft *cld = (plan_rdft *) ego->cldrn[d->thr_num];
cld->apply((plan *) cld,
ego->I + thr_num * ego->its, ego->O + thr_num * ego->ots);
return 0;
}
static void apply(const plan *ego_, R *I, R *O)
{
const P *ego = (const P *) ego_;
PD d;
d.its = ego->its;
d.ots = ego->ots;
d.cldrn = ego->cldrn;
d.I = I; d.O = O;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*) &d);
}
static void awake(plan *ego_, enum wakefulness wakefulness)
{
P *ego = (P *) ego_;
int i;
for (i = 0; i < ego->nthr; ++i)
X(plan_awake)(ego->cldrn[i], wakefulness);
}
static void destroy(plan *ego_)
{
P *ego = (P *) ego_;
int i;
for (i = 0; i < ego->nthr; ++i)
X(plan_destroy_internal)(ego->cldrn[i]);
X(ifree)(ego->cldrn);
}
static void print(const plan *ego_, printer *p)
{
const P *ego = (const P *) ego_;
const S *s = ego->solver;
int i;
p->print(p, "(rdft-thr-vrank>=1-x%d/%d", ego->nthr, s->vecloop_dim);
for (i = 0; i < ego->nthr; ++i)
if (i == 0 || (ego->cldrn[i] != ego->cldrn[i-1] &&
(i <= 1 || ego->cldrn[i] != ego->cldrn[i-2])))
p->print(p, "%(%p%)", ego->cldrn[i]);
p->putchr(p, ')');
}
static int pickdim(const S *ego, const tensor *vecsz, int oop, int *dp)
{
return X(pickdim)(ego->vecloop_dim, ego->buddies, ego->nbuddies,
vecsz, oop, dp);
}
static int applicable0(const solver *ego_, const problem *p_,
const planner *plnr, int *dp)
{
const S *ego = (const S *) ego_;
const problem_rdft *p = (const problem_rdft *) p_;
return (1
&& plnr->nthr > 1
&& FINITE_RNK(p->vecsz->rnk)
&& p->vecsz->rnk > 0
&& pickdim(ego, p->vecsz, p->I != p->O, dp)
);
}
static int applicable(const solver *ego_, const problem *p_,
const planner *plnr, int *dp)
{
const S *ego = (const S *)ego_;
if (!applicable0(ego_, p_, plnr, dp)) return 0;
/* fftw2 behavior */
if (NO_VRANK_SPLITSP(plnr) && (ego->vecloop_dim != ego->buddies[0]))
return 0;
return 1;
}
static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
{
const S *ego = (const S *) ego_;
const problem_rdft *p;
P *pln;
problem *cldp;
int vdim;
iodim *d;
plan **cldrn = (plan **) 0;
int i, nthr;
INT its, ots, block_size;
tensor *vecsz;
static const plan_adt padt = {
X(rdft_solve), awake, print, destroy
};
if (!applicable(ego_, p_, plnr, &vdim))
return (plan *) 0;
p = (const problem_rdft *) p_;
d = p->vecsz->dims + vdim;
block_size = (d->n + plnr->nthr - 1) / plnr->nthr;
nthr = (int)((d->n + block_size - 1) / block_size);
plnr->nthr = (plnr->nthr + nthr - 1) / nthr;
its = d->is * block_size;
ots = d->os * block_size;
cldrn = (plan **)MALLOC(sizeof(plan *) * nthr, PLANS);
for (i = 0; i < nthr; ++i) cldrn[i] = (plan *) 0;
vecsz = X(tensor_copy)(p->vecsz);
for (i = 0; i < nthr; ++i) {
vecsz->dims[vdim].n =
(i == nthr - 1) ? (d->n - i*block_size) : block_size;
cldp = X(mkproblem_rdft)(p->sz, vecsz,
p->I + i*its, p->O + i*ots, p->kind);
cldrn[i] = X(mkplan_d)(plnr, cldp);
if (!cldrn[i]) goto nada;
}
X(tensor_destroy)(vecsz);
pln = MKPLAN_RDFT(P, &padt, apply);
pln->cldrn = cldrn;
pln->its = its;
pln->ots = ots;
pln->nthr = nthr;
pln->solver = ego;
X(ops_zero)(&pln->super.super.ops);
pln->super.super.pcost = 0;
for (i = 0; i < nthr; ++i) {
X(ops_add2)(&cldrn[i]->ops, &pln->super.super.ops);
pln->super.super.pcost += cldrn[i]->pcost;
}
return &(pln->super.super);
nada:
if (cldrn) {
for (i = 0; i < nthr; ++i)
X(plan_destroy_internal)(cldrn[i]);
X(ifree)(cldrn);
}
X(tensor_destroy)(vecsz);
return (plan *) 0;
}
static solver *mksolver(int vecloop_dim, const int *buddies, size_t nbuddies)
{
static const solver_adt sadt = { PROBLEM_RDFT, mkplan, 0 };
S *slv = MKSOLVER(S, &sadt);
slv->vecloop_dim = vecloop_dim;
slv->buddies = buddies;
slv->nbuddies = nbuddies;
return &(slv->super);
}
void X(rdft_thr_vrank_geq1_register)(planner *p)
{
size_t i;
/* FIXME: Should we try other vecloop_dim values? */
static const int buddies[] = { 1, -1 };
for (i = 0; i < NELEM(buddies); ++i)
REGISTER_SOLVER(p, mksolver(buddies[i], buddies, NELEM(buddies)));
}

View File

@@ -0,0 +1,501 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/* threads.c: Portable thread spawning for loops, via the X(spawn_loop)
function. The first portion of this file is a set of macros to
spawn and join threads on various systems. */
#include "threads/threads.h"
#include "api/api.h"
#if defined(USING_POSIX_THREADS)
#include <pthread.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
/* implementation of semaphores and mutexes: */
#if (defined(_POSIX_SEMAPHORES) && (_POSIX_SEMAPHORES >= 200112L))
/* If optional POSIX semaphores are supported, use them to
implement both semaphores and mutexes. */
# include <semaphore.h>
# include <errno.h>
typedef sem_t os_sem_t;
static void os_sem_init(os_sem_t *s) { sem_init(s, 0, 0); }
static void os_sem_destroy(os_sem_t *s) { sem_destroy(s); }
static void os_sem_down(os_sem_t *s)
{
int err;
do {
err = sem_wait(s);
} while (err == -1 && errno == EINTR);
CK(err == 0);
}
static void os_sem_up(os_sem_t *s) { sem_post(s); }
/*
The reason why we use sem_t to implement mutexes is that I have
seen mysterious hangs with glibc-2.7 and linux-2.6.22 when using
pthread_mutex_t, but no hangs with sem_t or with linux >=
2.6.24. For lack of better information, sem_t looks like the
safest choice.
*/
typedef sem_t os_mutex_t;
static void os_mutex_init(os_mutex_t *s) { sem_init(s, 0, 1); }
#define os_mutex_destroy os_sem_destroy
#define os_mutex_lock os_sem_down
#define os_mutex_unlock os_sem_up
#else
/* If optional POSIX semaphores are not defined, use pthread
mutexes for mutexes, and simulate semaphores with condition
variables */
typedef pthread_mutex_t os_mutex_t;
static void os_mutex_init(os_mutex_t *s)
{
pthread_mutex_init(s, (pthread_mutexattr_t *)0);
}
static void os_mutex_destroy(os_mutex_t *s) { pthread_mutex_destroy(s); }
static void os_mutex_lock(os_mutex_t *s) { pthread_mutex_lock(s); }
static void os_mutex_unlock(os_mutex_t *s) { pthread_mutex_unlock(s); }
typedef struct {
pthread_mutex_t m;
pthread_cond_t c;
volatile int x;
} os_sem_t;
static void os_sem_init(os_sem_t *s)
{
pthread_mutex_init(&s->m, (pthread_mutexattr_t *)0);
pthread_cond_init(&s->c, (pthread_condattr_t *)0);
/* wrap initialization in lock to exploit the release
semantics of pthread_mutex_unlock() */
pthread_mutex_lock(&s->m);
s->x = 0;
pthread_mutex_unlock(&s->m);
}
static void os_sem_destroy(os_sem_t *s)
{
pthread_mutex_destroy(&s->m);
pthread_cond_destroy(&s->c);
}
static void os_sem_down(os_sem_t *s)
{
pthread_mutex_lock(&s->m);
while (s->x <= 0)
pthread_cond_wait(&s->c, &s->m);
--s->x;
pthread_mutex_unlock(&s->m);
}
static void os_sem_up(os_sem_t *s)
{
pthread_mutex_lock(&s->m);
++s->x;
pthread_cond_signal(&s->c);
pthread_mutex_unlock(&s->m);
}
#endif
#define FFTW_WORKER void *
static void os_create_thread(FFTW_WORKER (*worker)(void *arg),
void *arg)
{
pthread_attr_t attr;
pthread_t tid;
pthread_attr_init(&attr);
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
pthread_create(&tid, &attr, worker, (void *)arg);
pthread_attr_destroy(&attr);
}
static void os_destroy_thread(void)
{
pthread_exit((void *)0);
}
/* support for static mutexes */
typedef pthread_mutex_t os_static_mutex_t;
#define OS_STATIC_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
static void os_static_mutex_lock(os_static_mutex_t *s) { pthread_mutex_lock(s); }
static void os_static_mutex_unlock(os_static_mutex_t *s) { pthread_mutex_unlock(s); }
#elif defined(__WIN32__) || defined(_WIN32) || defined(_WINDOWS)
/* hack: windef.h defines INT for its own purposes and this causes
a conflict with our own INT in ifftw.h. Divert the windows
definition into another name unlikely to cause a conflict */
#define INT magnus_ab_INTegro_seclorum_nascitur_ordo
#include <windows.h>
#include <process.h>
#include <intrin.h>
#undef INT
typedef HANDLE os_mutex_t;
static void os_mutex_init(os_mutex_t *s)
{
*s = CreateMutex(NULL, FALSE, NULL);
}
static void os_mutex_destroy(os_mutex_t *s)
{
CloseHandle(*s);
}
static void os_mutex_lock(os_mutex_t *s)
{
WaitForSingleObject(*s, INFINITE);
}
static void os_mutex_unlock(os_mutex_t *s)
{
ReleaseMutex(*s);
}
typedef HANDLE os_sem_t;
static void os_sem_init(os_sem_t *s)
{
*s = CreateSemaphore(NULL, 0, 0x7FFFFFFFL, NULL);
}
static void os_sem_destroy(os_sem_t *s)
{
CloseHandle(*s);
}
static void os_sem_down(os_sem_t *s)
{
WaitForSingleObject(*s, INFINITE);
}
static void os_sem_up(os_sem_t *s)
{
ReleaseSemaphore(*s, 1, NULL);
}
#define FFTW_WORKER unsigned __stdcall
typedef unsigned (__stdcall *winthread_start) (void *);
static void os_create_thread(winthread_start worker,
void *arg)
{
_beginthreadex((void *)NULL, /* security attrib */
0, /* stack size */
worker, /* start address */
arg, /* parameters */
0, /* creation flags */
(unsigned *)NULL); /* tid */
}
static void os_destroy_thread(void)
{
_endthreadex(0);
}
/* windows does not have statically-initialized mutexes---fake a
spinlock */
typedef volatile LONG os_static_mutex_t;
#define OS_STATIC_MUTEX_INITIALIZER 0
static void os_static_mutex_lock(os_static_mutex_t *s)
{
while (InterlockedExchange(s, 1) == 1) {
YieldProcessor();
Sleep(0);
}
}
static void os_static_mutex_unlock(os_static_mutex_t *s)
{
LONG old = InterlockedExchange(s, 0);
A(old == 1);
}
#else
#error "No threading layer defined"
#endif
/************************************************************************/
/* Main code: */
struct worker {
os_sem_t ready;
os_sem_t done;
struct work *w;
struct worker *cdr;
};
static struct worker *make_worker(void)
{
struct worker *q = (struct worker *)MALLOC(sizeof(*q), OTHER);
os_sem_init(&q->ready);
os_sem_init(&q->done);
return q;
}
static void unmake_worker(struct worker *q)
{
os_sem_destroy(&q->done);
os_sem_destroy(&q->ready);
X(ifree)(q);
}
struct work {
spawn_function proc;
spawn_data d;
struct worker *q; /* the worker responsible for performing this work */
};
static os_mutex_t queue_lock;
static os_sem_t termination_semaphore;
static struct worker *worker_queue;
#define WITH_QUEUE_LOCK(what) \
{ \
os_mutex_lock(&queue_lock); \
what; \
os_mutex_unlock(&queue_lock); \
}
static FFTW_WORKER worker(void *arg)
{
struct worker *ego = (struct worker *)arg;
struct work *w;
for (;;) {
/* wait until work becomes available */
os_sem_down(&ego->ready);
w = ego->w;
/* !w->proc ==> terminate worker */
if (!w->proc) break;
/* do the work */
w->proc(&w->d);
/* signal that work is done */
os_sem_up(&ego->done);
}
/* termination protocol */
os_sem_up(&termination_semaphore);
os_destroy_thread();
/* UNREACHABLE */
return 0;
}
static void enqueue(struct worker *q)
{
WITH_QUEUE_LOCK({
q->cdr = worker_queue;
worker_queue = q;
});
}
static struct worker *dequeue(void)
{
struct worker *q;
WITH_QUEUE_LOCK({
q = worker_queue;
if (q)
worker_queue = q->cdr;
});
if (!q) {
/* no worker is available. Create one */
q = make_worker();
os_create_thread(worker, q);
}
return q;
}
static void kill_workforce(void)
{
struct work w;
w.proc = 0;
WITH_QUEUE_LOCK({
/* tell all workers that they must terminate.
Because workers enqueue themselves before signaling the
completion of the work, all workers belong to the worker queue
if we get here. Also, all workers are waiting at
os_sem_down(ready), so we can hold the queue lock without
deadlocking */
while (worker_queue) {
struct worker *q = worker_queue;
worker_queue = q->cdr;
q->w = &w;
os_sem_up(&q->ready);
os_sem_down(&termination_semaphore);
unmake_worker(q);
}
});
}
static os_static_mutex_t initialization_mutex = OS_STATIC_MUTEX_INITIALIZER;
int X(ithreads_init)(void)
{
os_static_mutex_lock(&initialization_mutex); {
os_mutex_init(&queue_lock);
os_sem_init(&termination_semaphore);
WITH_QUEUE_LOCK({
worker_queue = 0;
});
} os_static_mutex_unlock(&initialization_mutex);
return 0; /* no error */
}
/* Distribute a loop from 0 to loopmax-1 over nthreads threads.
proc(d) is called to execute a block of iterations from d->min
to d->max-1. d->thr_num indicate the number of the thread
that is executing proc (from 0 to nthreads-1), and d->data is
the same as the data parameter passed to X(spawn_loop).
This function returns only after all the threads have completed. */
void X(spawn_loop)(int loopmax, int nthr, spawn_function proc, void *data)
{
int block_size;
int i;
A(loopmax >= 0);
A(nthr > 0);
A(proc);
if (!loopmax) return;
/* Choose the block size and number of threads in order to (1)
minimize the critical path and (2) use the fewest threads that
achieve the same critical path (to minimize overhead).
e.g. if loopmax is 5 and nthr is 4, we should use only 3
threads with block sizes of 2, 2, and 1. */
block_size = (loopmax + nthr - 1) / nthr;
nthr = (loopmax + block_size - 1) / block_size;
if (X(spawnloop_callback)) { /* user-defined spawnloop backend */
spawn_data *sdata;
STACK_MALLOC(spawn_data *, sdata, sizeof(spawn_data) * nthr);
for (i = 0; i < nthr; ++i) {
spawn_data *d = &sdata[i];
d->max = (d->min = i * block_size) + block_size;
if (d->max > loopmax)
d->max = loopmax;
d->thr_num = i;
d->data = data;
}
X(spawnloop_callback)(proc, sdata, sizeof(spawn_data), nthr, X(spawnloop_callback_data));
STACK_FREE(sdata);
}
else {
struct work *r;
STACK_MALLOC(struct work *, r, sizeof(struct work) * nthr);
/* distribute work: */
for (i = 0; i < nthr; ++i) {
struct work *w = &r[i];
spawn_data *d = &w->d;
d->max = (d->min = i * block_size) + block_size;
if (d->max > loopmax)
d->max = loopmax;
d->thr_num = i;
d->data = data;
w->proc = proc;
if (i == nthr - 1) {
/* do the work ourselves */
proc(d);
} else {
/* assign a worker to W */
w->q = dequeue();
/* tell worker w->q to do it */
w->q->w = w; /* Dirac could have written this */
os_sem_up(&w->q->ready);
}
}
for (i = 0; i < nthr - 1; ++i) {
struct work *w = &r[i];
os_sem_down(&w->q->done);
enqueue(w->q);
}
STACK_FREE(r);
}
}
void X(threads_cleanup)(void)
{
kill_workforce();
os_mutex_destroy(&queue_lock);
os_sem_destroy(&termination_semaphore);
}
static os_static_mutex_t install_planner_hooks_mutex = OS_STATIC_MUTEX_INITIALIZER;
static os_mutex_t planner_mutex;
static int planner_hooks_installed = 0;
static void lock_planner_mutex(void)
{
os_mutex_lock(&planner_mutex);
}
static void unlock_planner_mutex(void)
{
os_mutex_unlock(&planner_mutex);
}
void X(threads_register_planner_hooks)(void)
{
os_static_mutex_lock(&install_planner_hooks_mutex); {
if (!planner_hooks_installed) {
os_mutex_init(&planner_mutex);
X(set_planner_hooks)(lock_planner_mutex, unlock_planner_mutex);
planner_hooks_installed = 1;
}
} os_static_mutex_unlock(&install_planner_hooks_mutex);
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef __THREADS_H__
#define __THREADS_H__
#include "kernel/ifftw.h"
#include "dft/ct.h"
#include "rdft/hc2hc.h"
typedef struct {
int min, max, thr_num;
void *data;
} spawn_data;
typedef void *(*spawn_function) (spawn_data *);
void X(spawn_loop)(int loopmax, int nthreads,
spawn_function proc, void *data);
int X(ithreads_init)(void);
void X(threads_cleanup)(void);
typedef void (*spawnloop_function)(spawn_function, spawn_data *, size_t, int, void *);
extern spawnloop_function X(spawnloop_callback);
extern void *X(spawnloop_callback_data);
/* configurations */
void X(dft_thr_vrank_geq1_register)(planner *p);
void X(rdft_thr_vrank_geq1_register)(planner *p);
void X(rdft2_thr_vrank_geq1_register)(planner *p);
ct_solver *X(mksolver_ct_threads)(size_t size, INT r, int dec,
ct_mkinferior mkcldw,
ct_force_vrecursion force_vrecursionp);
hc2hc_solver *X(mksolver_hc2hc_threads)(size_t size, INT r, hc2hc_mkinferior mkcldw);
void X(threads_conf_standard)(planner *p);
void X(threads_register_hooks)(void);
void X(threads_unregister_hooks)(void);
void X(threads_register_planner_hooks)(void);
#endif /* __THREADS_H__ */

View File

@@ -0,0 +1,233 @@
/*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 Massachusetts Institute of Technology
*
* This program 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 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include "threads/threads.h"
typedef struct {
solver super;
int vecloop_dim;
const int *buddies;
size_t nbuddies;
} S;
typedef struct {
plan_rdft2 super;
plan **cldrn;
INT its, ots;
int nthr;
const S *solver;
} P;
typedef struct {
INT its, ots;
R *r0, *r1, *cr, *ci;
plan **cldrn;
} PD;
static void *spawn_apply(spawn_data *d)
{
PD *ego = (PD *) d->data;
INT its = ego->its;
INT ots = ego->ots;
int thr_num = d->thr_num;
plan_rdft2 *cld = (plan_rdft2 *) ego->cldrn[d->thr_num];
cld->apply((plan *) cld,
ego->r0 + thr_num * its, ego->r1 + thr_num * its,
ego->cr + thr_num * ots, ego->ci + thr_num * ots);
return 0;
}
static void apply(const plan *ego_, R *r0, R *r1, R *cr, R *ci)
{
const P *ego = (const P *) ego_;
PD d;
d.its = ego->its;
d.ots = ego->ots;
d.cldrn = ego->cldrn;
d.r0 = r0; d.r1 = r1; d.cr = cr; d.ci = ci;
X(spawn_loop)(ego->nthr, ego->nthr, spawn_apply, (void*) &d);
}
static void awake(plan *ego_, enum wakefulness wakefulness)
{
P *ego = (P *) ego_;
int i;
for (i = 0; i < ego->nthr; ++i)
X(plan_awake)(ego->cldrn[i], wakefulness);
}
static void destroy(plan *ego_)
{
P *ego = (P *) ego_;
int i;
for (i = 0; i < ego->nthr; ++i)
X(plan_destroy_internal)(ego->cldrn[i]);
X(ifree)(ego->cldrn);
}
static void print(const plan *ego_, printer *p)
{
const P *ego = (const P *) ego_;
const S *s = ego->solver;
int i;
p->print(p, "(rdft2-thr-vrank>=1-x%d/%d)", ego->nthr, s->vecloop_dim);
for (i = 0; i < ego->nthr; ++i)
if (i == 0 || (ego->cldrn[i] != ego->cldrn[i-1] &&
(i <= 1 || ego->cldrn[i] != ego->cldrn[i-2])))
p->print(p, "%(%p%)", ego->cldrn[i]);
p->putchr(p, ')');
}
static int pickdim(const S *ego, const tensor *vecsz, int oop, int *dp)
{
return X(pickdim)(ego->vecloop_dim, ego->buddies, ego->nbuddies,
vecsz, oop, dp);
}
static int applicable0(const solver *ego_, const problem *p_,
const planner *plnr, int *dp)
{
const S *ego = (const S *) ego_;
const problem_rdft2 *p = (const problem_rdft2 *) p_;
if (FINITE_RNK(p->vecsz->rnk)
&& p->vecsz->rnk > 0
&& plnr->nthr > 1
&& pickdim(ego, p->vecsz, p->r0 != p->cr, dp)) {
if (p->r0 != p->cr)
return 1; /* can always operate out-of-place */
return(X(rdft2_inplace_strides)(p, *dp));
}
return 0;
}
static int applicable(const solver *ego_, const problem *p_,
const planner *plnr, int *dp)
{
const S *ego = (const S *)ego_;
if (!applicable0(ego_, p_, plnr, dp)) return 0;
/* fftw2 behavior */
if (NO_VRANK_SPLITSP(plnr) && (ego->vecloop_dim != ego->buddies[0]))
return 0;
return 1;
}
static plan *mkplan(const solver *ego_, const problem *p_, planner *plnr)
{
const S *ego = (const S *) ego_;
const problem_rdft2 *p;
P *pln;
problem *cldp;
int vdim;
iodim *d;
plan **cldrn = (plan **) 0;
int i, nthr;
INT its, ots, block_size;
tensor *vecsz;
static const plan_adt padt = {
X(rdft2_solve), awake, print, destroy
};
if (!applicable(ego_, p_, plnr, &vdim))
return (plan *) 0;
p = (const problem_rdft2 *) p_;
d = p->vecsz->dims + vdim;
block_size = (d->n + plnr->nthr - 1) / plnr->nthr;
nthr = (int)((d->n + block_size - 1) / block_size);
plnr->nthr = (plnr->nthr + nthr - 1) / nthr;
X(rdft2_strides)(p->kind, d, &its, &ots);
its *= block_size; ots *= block_size;
cldrn = (plan **)MALLOC(sizeof(plan *) * nthr, PLANS);
for (i = 0; i < nthr; ++i) cldrn[i] = (plan *) 0;
vecsz = X(tensor_copy)(p->vecsz);
for (i = 0; i < nthr; ++i) {
vecsz->dims[vdim].n =
(i == nthr - 1) ? (d->n - i*block_size) : block_size;
cldp = X(mkproblem_rdft2)(p->sz, vecsz,
p->r0 + i*its, p->r1 + i*its,
p->cr + i*ots, p->ci + i*ots,
p->kind);
cldrn[i] = X(mkplan_d)(plnr, cldp);
if (!cldrn[i]) goto nada;
}
X(tensor_destroy)(vecsz);
pln = MKPLAN_RDFT2(P, &padt, apply);
pln->cldrn = cldrn;
pln->its = its;
pln->ots = ots;
pln->nthr = nthr;
pln->solver = ego;
X(ops_zero)(&pln->super.super.ops);
pln->super.super.pcost = 0;
for (i = 0; i < nthr; ++i) {
X(ops_add2)(&cldrn[i]->ops, &pln->super.super.ops);
pln->super.super.pcost += cldrn[i]->pcost;
}
return &(pln->super.super);
nada:
if (cldrn) {
for (i = 0; i < nthr; ++i)
X(plan_destroy_internal)(cldrn[i]);
X(ifree)(cldrn);
}
X(tensor_destroy)(vecsz);
return (plan *) 0;
}
static solver *mksolver(int vecloop_dim, const int *buddies, size_t nbuddies)
{
static const solver_adt sadt = { PROBLEM_RDFT2, mkplan, 0 };
S *slv = MKSOLVER(S, &sadt);
slv->vecloop_dim = vecloop_dim;
slv->buddies = buddies;
slv->nbuddies = nbuddies;
return &(slv->super);
}
void X(rdft2_thr_vrank_geq1_register)(planner *p)
{
/* FIXME: Should we try other vecloop_dim values? */
static const int buddies[] = { 1, -1 };
size_t i;
for (i = 0; i < NELEM(buddies); ++i)
REGISTER_SOLVER(p, mksolver(buddies[i], buddies, NELEM(buddies)));
}