summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
diff options
context:
space:
mode:
authorTom Rondeau2011-03-25 13:53:09 -0400
committerTom Rondeau2011-03-25 13:53:09 -0400
commit8cee6c5ffb0605273c8b73891851ba3f991b0622 (patch)
treea3bd421c8fddaec15484d4d653811974c8d5969a /gnuradio-core/src/tests/benchmark_dotprod_ccc.cc
parent972fc99ad6984e50731ec0dd97ccfec71829139b (diff)
parent64dac6a1f62fb8484e879f0d20ee60bc02da179c (diff)
downloadgnuradio-8cee6c5ffb0605273c8b73891851ba3f991b0622.tar.gz
gnuradio-8cee6c5ffb0605273c8b73891851ba3f991b0622.tar.bz2
gnuradio-8cee6c5ffb0605273c8b73891851ba3f991b0622.zip
Merge branch 'master' of gnuradio.org:gnuradio
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