summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
diff options
context:
space:
mode:
authorTom Rondeau2011-06-05 15:36:47 -0400
committerTom Rondeau2011-06-05 15:36:47 -0400
commit233f960474f86bc8cc519ce7257b29d8615c4000 (patch)
tree1a4c846119a01a5a195a9e9ee5b854384b0b6535 /gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
parent024c79a7fb13c08bae7b97079a245f711ecf12a7 (diff)
parenta23a0a46c3bf446cbe09d71bc8e10b061256ef56 (diff)
downloadgnuradio-233f960474f86bc8cc519ce7257b29d8615c4000.tar.gz
gnuradio-233f960474f86bc8cc519ce7257b29d8615c4000.tar.bz2
gnuradio-233f960474f86bc8cc519ce7257b29d8615c4000.zip
Merge branch 'master' into turbo
Diffstat (limited to 'gnuradio-core/src/tests/benchmark_dotprod_ccc.cc')
-rw-r--r--gnuradio-core/src/tests/benchmark_dotprod_ccc.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnuradio-core/src/tests/benchmark_dotprod_ccc.cc b/gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
index 5d53a9f89..8ef26a40d 100644
--- a/gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
+++ b/gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
@@ -56,7 +56,8 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name)
{
int i;
gr_complex coeffs[NTAPS];
- gr_complex input[BLOCK_SIZE + NTAPS];
+ //gr_complex input[BLOCK_SIZE + NTAPS]; // not always 16-bit aligned
+ gr_complex *input = new gr_complex[BLOCK_SIZE + NTAPS];
long n;
gr_complex result;
#ifdef HAVE_SYS_RESOURCE_H
@@ -86,7 +87,7 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name)
exit (1);
}
#else
- clock_start= (double) clock() * (1000000. / CLOCKS_PER_SEC);
+ clock_start= (double) clock() / CLOCKS_PER_SEC;
#endif
// do the actual work
@@ -116,7 +117,7 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name)
double total = user + sys;
#else
- clock_end = (double) clock() * (1000000. / CLOCKS_PER_SEC);
+ clock_end = (double) clock() / CLOCKS_PER_SEC;
double total = clock_end - clock_start;
#endif
@@ -126,6 +127,7 @@ benchmark (fir_maker_t filter_maker, const char *implementation_name)
implementation_name, NTAPS, (double) TOTAL_TEST_SIZE, total, macs / total);
delete f;
+ delete [] input;
}
static void