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

report container size

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.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3959
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 0689b37c
......@@ -88,7 +88,7 @@ using std::endl;
// a struct to store values of command line arguments
struct Options {
// be verbose
bool verbose;
bool verbose, verbsize;
// file format to be used
std::string fileformat;
// overwrite output files in case they already exist
......@@ -130,7 +130,7 @@ int main(int iargc, char* argv[])
char usage_text[]=
{
CXXFFTWARTEST_VERSION "\n"
"usage: cxxfftwartest input output [-v] [-o] [-type f]" "\n"
"usage: cxxfftwartest input output [-s] [-v] [-o] [-type f]" "\n"
" or: cxxfftwartest --help|-h" "\n"
" or: cxxfftwartest --xhelp" "\n"
};
......@@ -144,6 +144,7 @@ int main(int iargc, char* argv[])
"output output file name\n"
"\n"
"-v verbose mode\n"
"-s report container sizes\n"
"-o overwrite output file\n"
"-type f file format\n"
};
......@@ -162,6 +163,8 @@ int main(int iargc, char* argv[])
{"o",arg_no,"-"},
// 4: file type
{"type",arg_no,"sff"},
// 5: report container sizes
{"s",arg_no,"-"},
{NULL}
};
......@@ -198,6 +201,7 @@ int main(int iargc, char* argv[])
opt.verbose=cmdline.optset(2);
opt.overwrite=cmdline.optset(3);
opt.fileformat=cmdline.string_arg(4);
opt.verbsize=cmdline.optset(5);
// report program version if in verbose mode
if (opt.verbose)
......@@ -297,6 +301,11 @@ int main(int iargc, char* argv[])
for (int i=0; i<engine.nseries(); ++i)
{
engine.series(i).copyin(vecoftraces[i].series);
if (opt.verbsize)
{
cout << "engine series #" << i << " has " << engine.series(i).size()
<< " samples" << endl;
}
}
if (opt.verbose) { cout << "execute FFT array engine" << endl; }
......@@ -316,6 +325,15 @@ int main(int iargc, char* argv[])
fourier::fft::DRFFTWAFF::Tspectrum spectrum(coeff.size());
spectrum.copyin(coeff);
series=fft(spectrum,trace.wid2.dt);
if (opt.verbsize)
{
cout << "after return from engine for trace #" << i << endl;
cout << " size of engine spectrum: " << engine.spectrum(i).size()
<< endl;
cout << " size of copy of spectrum: " << spectrum.size()
<< endl;
cout << " returned series size: " << series.size() << endl;
}
}
/*----------------------------------------------------------------------*/
......
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