Squashed 'FFTS/Sources/FFTS/' content from commit d11c3e7

git-subtree-dir: FFTS/Sources/FFTS
git-subtree-split: d11c3e76200e619d35e2d898a28a1c5641a366f4
This commit is contained in:
2024-10-25 21:05:50 -05:00
commit 535f02ff99
152 changed files with 88392 additions and 0 deletions

4
tests/Makefile.am Normal file
View File

@@ -0,0 +1,4 @@
noinst_PROGRAMS = test
test_SOURCES = test.c
test_LDADD = $(top_builddir)/src/libffts.la

591
tests/Makefile.in Normal file
View File

@@ -0,0 +1,591 @@
# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = test$(EXEEXT)
subdir = tests
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_classpath.m4 \
$(top_srcdir)/m4/ax_check_java_home.m4 \
$(top_srcdir)/m4/ax_java_options.m4 \
$(top_srcdir)/m4/ax_jni_include_dir.m4 \
$(top_srcdir)/m4/ax_prog_jar.m4 \
$(top_srcdir)/m4/ax_prog_javac.m4 \
$(top_srcdir)/m4/ax_prog_javac_works.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_test_OBJECTS = test.$(OBJEXT)
test_OBJECTS = $(am_test_OBJECTS)
test_DEPENDENCIES = $(top_builddir)/src/libffts.la
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 =
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__depfiles_maybe = depfiles
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 = $(test_SOURCES)
DIST_SOURCES = $(test_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
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@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JAR = @JAR@
JAVA = @JAVA@
JAVAC = @JAVAC@
JAVACFLAGS = @JAVACFLAGS@
JAVAFLAGS = @JAVAFLAGS@
JAVAPREFIX = @JAVAPREFIX@
JAVA_PATH_NAME = @JAVA_PATH_NAME@
JNI_CPPFLAGS = @JNI_CPPFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
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@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
_ACJNI_JAVAC = @_ACJNI_JAVAC@
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_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
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@
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@
test_SOURCES = test.c
test_LDADD = $(top_builddir)/src/libffts.la
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
.PRECIOUS: 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__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
test$(EXEEXT): $(test_OBJECTS) $(test_DEPENDENCIES) $(EXTRA_test_DEPENDENCIES)
@rm -f test$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(test_OBJECTS) $(test_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test.Po@am__quote@
.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 $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(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 $(PROGRAMS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
# 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:

55
tests/cpu_test.c Normal file
View File

@@ -0,0 +1,55 @@
/*
This file is part of FFTS -- The Fastest Fourier Transform in the South
Copyright (c) 2018, Jukka Ojanen <jukka.ojanen@kolumbus.fi>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the organization nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ANTHONY M. BLAKE BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../src/ffts_cpu.h"
#include <stdio.h>
int main()
{
int cpu_flags, extra_flags;
cpu_flags = ffts_cpu_detect(&extra_flags);
if (!cpu_flags)
return 1;
printf("SSE : %s\n", (cpu_flags & FFTS_CPU_X86_SSE) ? "yes" : "no");
printf("SSE2 : %s\n", (cpu_flags & FFTS_CPU_X86_SSE2) ? "yes" : "no");
printf("SSE3 : %s\n", (cpu_flags & FFTS_CPU_X86_SSE3) ? "yes" : "no");
printf("SSSE3 : %s\n", (cpu_flags & FFTS_CPU_X86_SSSE3) ? "yes" : "no");
printf("SSE4.1 : %s\n", (cpu_flags & FFTS_CPU_X86_SSE4_1) ? "yes" : "no");
printf("SSE4.2 : %s\n", (cpu_flags & FFTS_CPU_X86_SSE4_2) ? "yes" : "no");
printf("AVX : %s\n", (cpu_flags & FFTS_CPU_X86_AVX) ? "yes" : "no");
printf("AVX2 : %s\n", (cpu_flags & FFTS_CPU_X86_AVX2) ? "yes" : "no");
printf("AVX512 : %s\n", (cpu_flags & FFTS_CPU_X86_AVX512) ? "yes" : "no");
return 0;
}

192
tests/test.c Normal file
View File

@@ -0,0 +1,192 @@
/*
This file is part of FFTS.
Copyright (c) 2012, Anthony M. Blake
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the organization nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ANTHONY M. BLAKE BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../include/ffts.h"
#include "../src/ffts_attributes.h"
#ifdef __ARM_NEON__
#endif
#ifdef HAVE_SSE
#include <xmmintrin.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795028841971693993751058209
#endif
static float impulse_error(int N, int sign, float *data)
{
#ifdef __ANDROID__
double delta_sum = 0.0f;
double sum = 0.0f;
#else
long double delta_sum = 0.0f;
long double sum = 0.0f;
#endif
int i;
for (i = 0; i < N; i++) {
#ifdef __ANDROID__
double re, im;
if (sign < 0) {
re = cos(2 * M_PI * (double) i / (double) N);
im = -sin(2 * M_PI * (double) i / (double) N);
} else {
re = cos(2 * M_PI * (double) i / (double) N);
im = sin(2 * M_PI * (double) i / (double) N);
}
#else
long double re, im;
if (sign < 0) {
re = cosl(2 * M_PI * (long double) i / (long double) N);
im = -sinl(2 * M_PI * (long double) i / (long double) N);
} else {
re = cosl(2 * M_PI * (long double) i / (long double) N);
im = sinl(2 * M_PI * (long double) i / (long double) N);
}
#endif
sum += re * re + im * im;
re = re - data[2*i];
im = im - data[2*i+1];
delta_sum += re * re + im * im;
}
#ifdef __ANDROID__
return (float) (sqrt(delta_sum) / sqrt(sum));
#else
return (float) (sqrtl(delta_sum) / sqrtl(sum));
#endif
}
int test_transform(int n, int sign)
{
ffts_plan_t *p;
#ifdef HAVE_SSE
float FFTS_ALIGN(32) *input = _mm_malloc(2 * n * sizeof(float), 32);
float FFTS_ALIGN(32) *output = _mm_malloc(2 * n * sizeof(float), 32);
#else
float FFTS_ALIGN(32) *input = valloc(2 * n * sizeof(float));
float FFTS_ALIGN(32) *output = valloc(2 * n * sizeof(float));
#endif
int i;
for (i = 0; i < n; i++) {
input[2*i + 0] = 0.0f;
input[2*i + 1] = 0.0f;
}
input[2] = 1.0f;
p = ffts_init_1d(i, sign);
if (!p) {
printf("Plan unsupported\n");
return 0;
}
ffts_execute(p, input, output);
printf(" %3d | %9d | %10E\n", sign, n, impulse_error(n, sign, output));
ffts_free(p);
return 1;
}
int main(int argc, char *argv[])
{
if (argc == 3) {
ffts_plan_t *p;
int i;
/* test specific transform with test pattern and display output */
int n = atoi(argv[1]);
int sign = atoi(argv[2]);
#ifdef HAVE_SSE
float FFTS_ALIGN(32) *input = _mm_malloc(2 * n * sizeof(float), 32);
float FFTS_ALIGN(32) *output = _mm_malloc(2 * n * sizeof(float), 32);
#else
float FFTS_ALIGN(32) *input = valloc(2 * n * sizeof(float));
float FFTS_ALIGN(32) *output = valloc(2 * n * sizeof(float));
#endif
for (i = 0; i < n; i++) {
input[2*i + 0] = (float) i;
input[2*i + 1] = 0.0f;
}
/* input[2] = 1.0f; */
p = ffts_init_1d(i, sign);
if (!p) {
printf("Plan unsupported\n");
return 0;
}
ffts_execute(p, input, output);
for (i = 0; i < n; i++)
printf("%d %d %f %f\n", i, sign, output[2*i], output[2*i+1]);
ffts_free(p);
#ifdef HAVE_SSE
_mm_free(input);
_mm_free(output);
#else
free(input);
free(output);
#endif
} else {
int n, power2;
/* test various sizes and display error */
printf(" Sign | Size | L2 Error\n");
printf("------+-----------+-------------\n");
for (n = 1, power2 = 2; n <= 18; n++, power2 <<= 1) {
test_transform(power2, -1);
}
for (n = 1, power2 = 2; n <= 18; n++, power2 <<= 1) {
test_transform(power2, 1);
}
}
return 0;
}

431
tests/trig_test.c Normal file
View File

@@ -0,0 +1,431 @@
/*
This file is part of FFTS -- The Fastest Fourier Transform in the South
Copyright (c) 2018, Jukka Ojanen <jukka.ojanen@kolumbus.fi>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the organization nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL ANTHONY M. BLAKE BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../src/ffts_internal.h"
#include "../src/ffts_trig.h"
#ifdef HAVE_MPFR_H
#include <mpfr.h>
#endif
#ifdef _OPENMP
#include <omp.h>
#endif
#include <stdio.h>
/* 32 bit FNV-1a initial hash */
#define FNV1A_32_INIT ((uint32_t) 0x811c9dc5)
/* 32 bit magic FNV-1a prime */
#define FNV_32_PRIME ((uint32_t) 0x01000193)
#define MAX_LEN 29
/* perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a buffer */
static uint32_t
fnv_32a_buf(const void *buffer, size_t buffer_len, uint32_t hash_value)
{
const unsigned char *bp = (const unsigned char*) buffer;
const unsigned char *be = bp + buffer_len;
while (bp < be) {
hash_value ^= (uint32_t) *bp++;
hash_value *= FNV_32_PRIME;
}
return hash_value;
}
#ifdef HAVE_MPFR_H
union float_bits {
int32_t i;
float f;
};
union double_bits {
int64_t i;
double d;
};
static uint64_t distance_between_doubles(double lhs, double rhs)
{
union double_bits l, r;
l.d = lhs;
r.d = rhs;
return (l.i >= r.i) ? (l.i - r.i) : (r.i - l.i);
}
static uint32_t distance_between_floats(float lhs, float rhs)
{
union float_bits l, r;
l.f = lhs;
r.f = rhs;
return (l.i >= r.i) ? (l.i - r.i) : (r.i - l.i);
}
static int test_float(int i)
{
mpfr_t pi, *cop, *rop, *sop;
int j, len, threads;
ffts_cpx_32f *table = NULL;
volatile int mismatch;
uint32_t hash;
#ifdef _OPENMP
threads = omp_get_max_threads();
#else
threads = 1;
#endif
fprintf(stdout, "Using %d threads\r\n", threads);
cop = (mpfr_t*) malloc(threads * sizeof(*rop));
rop = (mpfr_t*) malloc(threads * sizeof(*rop));
sop = (mpfr_t*) malloc(threads * sizeof(*rop));
if (!cop || !rop || !sop) {
fprintf(stderr, "out of memory\n");
return 1;
}
mpfr_set_default_prec(256);
mpfr_init(pi);
mpfr_const_pi(pi, MPFR_RNDN);
for (j = 0; j < threads; j++) {
mpfr_init(cop[j]);
mpfr_init(rop[j]);
mpfr_init(sop[j]);
}
fprintf(stdout, "Verify single precision trig table using MPFR:\r\n");
mismatch = 0;
for (len = (1 << i); len > 0; i--, len >>= 1) {
fprintf(stdout, "%9d: ", len);
fflush(stdout);
if (!table) {
size_t buffer_len = len * sizeof(*table);
if (buffer_len < (size_t) len) {
fprintf(stdout, "out of memory\r\n");
continue;
}
table = (ffts_cpx_32f*) ffts_aligned_malloc(buffer_len);
if (!table) {
fprintf(stdout, "out of memory\r\n");
continue;
}
}
ffts_generate_cosine_sine_pow2_32f(table, len);
hash = fnv_32a_buf(table, len * sizeof(*table), FNV1A_32_INIT);
#ifdef _OPENMP
#pragma omp parallel for shared(mismatch)
#endif
for (j = 1; j <= len/2; j++) {
float c, s;
#ifdef _OPENMP
int tid = omp_get_thread_num();
#else
int tid = 0;
#endif
if (mismatch)
continue;
mpfr_mul_si(rop[tid], pi, -j, MPFR_RNDN);
mpfr_div_ui(rop[tid], rop[tid], 2 * len, MPFR_RNDN);
mpfr_sin_cos(sop[tid], cop[tid], rop[tid], MPFR_RNDN);
c = mpfr_get_flt(cop[tid], MPFR_RNDN);
s = mpfr_get_flt(sop[tid], MPFR_RNDN);
if (distance_between_floats(c, table[j][0]) || distance_between_floats(s, table[j][1])) {
mismatch = 1;
}
}
fprintf(stdout, "%s (checksum: %u)\r\n", mismatch ? "incorrect" : "ok", hash);
if (mismatch)
break;
}
free(cop);
free(rop);
free(sop);
return mismatch;
}
static int test_double(int i)
{
mpfr_t pi, *cop, *rop, *sop;
int j, len, threads;
ffts_cpx_64f *table = NULL;
volatile int mismatch;
uint32_t hash;
#ifdef _OPENMP
threads = omp_get_max_threads();
#else
threads = 1;
#endif
fprintf(stdout, "Using %d threads\r\n", threads);
cop = (mpfr_t*) malloc(threads * sizeof(*rop));
rop = (mpfr_t*) malloc(threads * sizeof(*rop));
sop = (mpfr_t*) malloc(threads * sizeof(*rop));
if (!cop || !rop || !sop) {
fprintf(stderr, "out of memory\n");
return 1;
}
mpfr_set_default_prec(256);
mpfr_init(pi);
mpfr_const_pi(pi, MPFR_RNDN);
for (j = 0; j < threads; j++) {
mpfr_init(cop[j]);
mpfr_init(rop[j]);
mpfr_init(sop[j]);
}
fprintf(stdout, "Verify double precision trig table using MPFR:\r\n");
mismatch = 0;
for (len = (1 << i); len > 0; i--, len >>= 1) {
fprintf(stdout, "%9d: ", len);
fflush(stdout);
if (!table) {
size_t buffer_len = len * sizeof(*table);
if (buffer_len < (size_t) len) {
fprintf(stdout, "out of memory\r\n");
continue;
}
table = (ffts_cpx_64f*) ffts_aligned_malloc(buffer_len);
if (!table) {
fprintf(stdout, "out of memory\r\n");
continue;
}
}
ffts_generate_cosine_sine_pow2_64f(table, len);
hash = fnv_32a_buf(table, len * sizeof(*table), FNV1A_32_INIT);
#ifdef _OPENMP
#pragma omp parallel for shared(mismatch)
#endif
for (j = 1; j <= len/2; j++) {
double c, s;
#ifdef _OPENMP
int tid = omp_get_thread_num();
#else
int tid = 0;
#endif
if (mismatch)
continue;
mpfr_mul_si(rop[tid], pi, -j, MPFR_RNDN);
mpfr_div_ui(rop[tid], rop[tid], 2 * len, MPFR_RNDN);
mpfr_sin_cos(sop[tid], cop[tid], rop[tid], MPFR_RNDN);
c = mpfr_get_d(cop[tid], MPFR_RNDN);
s = mpfr_get_d(sop[tid], MPFR_RNDN);
if (distance_between_doubles(c, table[j][0]) || distance_between_doubles(s, table[j][1])) {
mismatch = 1;
}
}
fprintf(stdout, "%s (checksum: %u)\r\n", mismatch ? "incorrect" : "ok", hash);
if (mismatch)
break;
}
free(cop);
free(rop);
free(sop);
return mismatch;
}
#else
/* generated using MPFR */
static const uint32_t cosine_sine_pow2_32f_checksum[MAX_LEN+1] = {
4163796632, /* 1 */
752475004, /* 2 */
3588569144, /* 4 */
637367864, /* 8 */
2237388720, /* 16 */
1881651208, /* 32 */
356152060, /* 64 */
3819835580, /* 128 */
1180132788, /* 256 */
1716628348, /* 512 */
2422051204, /* 1024 */
3873830812, /* 2048 */
1376829016, /* 4096 */
2571876996, /* 8192 */
759289276, /* 16384 */
3423626720, /* 32768 */
3366809140, /* 65536 */
674354300, /* 131072 */
3992680156, /* 262144 */
1545599748, /* 524288 */
586444388, /* 1048576 */
2907181276, /* 2097152 */
3274911900, /* 4194304 */
1532398892, /* 8388608 */
2501994432, /* 16777216 */
1992951192, /* 33554432 */
2929058012, /* 67108864 */
2962003792, /* 134217728 */
934675412, /* 268435456 */
673507348 /* 536870912 */
};
static const uint32_t cosine_sine_pow2_64f_checksum[MAX_LEN+1] = {
2244568568, /* 1 */
2674442040, /* 2 */
637646452, /* 4 */
365964188, /* 8 */
492049596, /* 16 */
1537563784, /* 32 */
2795637248, /* 64 */
1166550632, /* 128 */
2310849600, /* 256 */
2701603684, /* 512 */
766126000, /* 1024 */
3596199488, /* 2048 */
3189251260, /* 4096 */
2366118336, /* 8192 */
3948192124, /* 16384 */
789942316, /* 32768 */
4160790692, /* 65536 */
1400150244, /* 131072 */
3473642232, /* 262144 */
3445250900, /* 524288 */
401920132, /* 1048576 */
800848444, /* 2097152 */
1239474840, /* 4194304 */
3699857428, /* 8388608 */
2185444492, /* 16777216 */
2780078060, /* 33554432 */
1398729992, /* 67108864 */
372663520, /* 134217728 */
254558992, /* 268435456 */
2451140808 /* 536870912 */
};
static int test_float(int i)
{
ffts_cpx_32f *table = NULL;
int len, mismatch = 0;
uint32_t hash;
fprintf(stdout, "Verify single precision trig table using FNV-1a checksum:\r\n");
for (len = (1 << i); len > 0; i--, len >>= 1) {
fprintf(stdout, "%9d: ", len);
fflush(stdout);
if (!table) {
size_t buffer_len = len * sizeof(*table);
if (buffer_len < (size_t) len) {
fprintf(stdout, "out of memory\r\n");
continue;
}
table = (ffts_cpx_32f*) ffts_aligned_malloc(buffer_len);
if (!table) {
fprintf(stdout, "out of memory\r\n");
continue;
}
}
ffts_generate_cosine_sine_pow2_32f(table, len);
hash = fnv_32a_buf(table, len * sizeof(*table), FNV1A_32_INIT);
mismatch = (hash != cosine_sine_pow2_32f_checksum[i]);
fprintf(stdout, "%s\r\n", mismatch ? "incorrect" : "ok");
if (mismatch)
break;
}
ffts_aligned_free(table);
return mismatch;
}
static int test_double(int i)
{
ffts_cpx_64f *table = NULL;
int len, mismatch = 0;
uint32_t hash;
fprintf(stdout, "Verify double precision trig table using FNV-1a checksum:\r\n");
for (len = (1 << i); len > 0; i--, len >>= 1) {
fprintf(stdout, "%9d: ", len);
fflush(stdout);
if (!table) {
size_t buffer_len = len * sizeof(*table);
if (buffer_len < (size_t) len) {
fprintf(stdout, "out of memory\r\n");
continue;
}
table = (ffts_cpx_64f*) ffts_aligned_malloc(buffer_len);
if (!table) {
fprintf(stdout, "out of memory\r\n");
continue;
}
}
ffts_generate_cosine_sine_pow2_64f(table, len);
hash = fnv_32a_buf(table, len * sizeof(*table), FNV1A_32_INIT);
mismatch = (hash != cosine_sine_pow2_64f_checksum[i]);
fprintf(stdout, "%s\r\n", mismatch ? "incorrect" : "ok");
if (mismatch)
break;
}
ffts_aligned_free(table);
return mismatch;
}
#endif
int main(int argc, char *argv[])
{
int i;
if (argc == 2) {
i = atoi(argv[1]);
if (i > MAX_LEN)
i = MAX_LEN;
} else {
i = MAX_LEN;
}
test_float(i);
test_double(i);
return 0;
}