Commit 0389fcf1 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

scaling of FFTW3 is tested against results for FFTW2

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.
results differ by 1.e-4 or less with respect to the absolute values
after forward transform, but only for the small values
results are numerically identical after forward and backward transform
within the precision of the output of cxxfftwtest.
Differences can be attributed to numerical round-off errors.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libenv201008
SVN Revision: 3201
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent b3b03db9
......@@ -66,6 +66,8 @@ RANLIB=ranlib
# i.e. to use FFTW instead of FFTW3
# this option will disappear in the near future! Better not use it...
#FFTWFALLBACK=-DFFTWFALLBACK
#FFTWLIB=-ldrfftw -ldfftw
FFTWLIB=-lfftw3
#----------------------------------------------------------------------
......@@ -233,7 +235,7 @@ cfftwtest: cfftwtest.c
$(CC) -o $@ $< -ldrfftw -ldfftw -lm
cxxfftwtest: cxxfftwtest.cc libfourierxx.a
$(CXX) -o $@ $< -ltfxx -lfourierxx -laff -lfftw3 -lm \
$(CXX) -o $@ $< -ltfxx -lfourierxx -laff $(FFTWLIB) -lm \
$(CPPFLAGS) $(LDFLAGS)
#======================================================================
......
......@@ -99,7 +99,7 @@ namespace fourier {
{
Msize=n;
this->delete_plans();
#ifdef FFTWFALLBACK
#ifndef FFTWFALLBACK
this->delete_arrays();
#endif
}
......@@ -168,6 +168,8 @@ namespace fourier {
{
this->set_size(s.size());
#ifdef FFTWFALLBACK
FOURIER_debug(debug, "DRFFTWAFF::operator()",
"use fallback code (FFTW2)");
Tspectrum retval(this->Msize/2+1);
aff::Series<fftw_real> out(this->Msize);
aff::Series<fftw_real> in(this->Msize);
......@@ -202,6 +204,8 @@ namespace fourier {
}
*/
#else
FOURIER_debug(debug, "DRFFTWAFF::operator()",
"use recent code (FFTW3)");
Tspectrum retval(this->ssize());
this->create_plan_forward();
Mseries.copyin(s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment