summaryrefslogtreecommitdiff
path: root/tools/bench/benchtime.h
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2014-01-23 09:34:41 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2014-01-23 09:34:41 +0000
commit9889af2c744d3016021e91eb4a6c9e03a23397e8 (patch)
tree582c263e756229a9204f51dbeceb295149baabb2 /tools/bench/benchtime.h
parent55b3e4b0d00c266607fd2d2e2f01f4f9e8196dd6 (diff)
downloadmpc-9889af2c744d3016021e91eb4a6c9e03a23397e8.tar.gz
bench: Avoid warning message with -Wunused-but-set-parameter.
Uses gcc attributes, which might need to be protected by a configure check. Fix copyright notices. git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1429 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tools/bench/benchtime.h')
-rw-r--r--tools/bench/benchtime.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/bench/benchtime.h b/tools/bench/benchtime.h
index 42a9dae..a857c06 100644
--- a/tools/bench/benchtime.h
+++ b/tools/bench/benchtime.h
@@ -1,6 +1,6 @@
/* benchtime.h -- compute the timings for the benchmark.
-Copyright (C) 2014, INRIA
+Copyright (C) 2014 INRIA - CNRS
This file is part of GNU MPC.
@@ -22,19 +22,18 @@ along with this program. If not, see http://www.gnu.org/licenses/ .
/* compute the time to run accurately niter calls of the function for any number of inputs */
#define DECLARE_ACCURATE_TIME_NOP(func, funccall) \
unsigned long int ACCURATE_TIME_NOP##func( unsigned long int niter, int n, mpc_t* z, mpc_t* x, mpc_t* y, int nop);\
-unsigned long int ACCURATE_TIME_NOP##func( unsigned long int niter, int n, mpc_t* z, mpc_t* x, mpc_t* y, int nop)\
+unsigned long int ACCURATE_TIME_NOP##func( unsigned long int niter, int n, mpc_t* z, mpc_t* x, \
+__attribute__ ((__unused__)) mpc_t* y, \
+__attribute__ ((__unused__)) int nop)\
{ \
- unsigned long int ti, i; int kn; \
+ unsigned long int i; int kn; \
unsigned long int t0 = get_cputime (); \
for (i = niter, kn=0; i > 0; i--) \
{ \
funccall; \
kn++; if (kn==n) kn = 0; \
} \
- ti = get_cputime () - t0; \
- /* following lines are append to avoid warnings but minimize the number of macros*/\
- if (nop==2) y = NULL; \
- return ti; \
+ return get_cputime () - t0; \
}
/* address of the function to time accurately niter calls of func */