From 9889af2c744d3016021e91eb4a6c9e03a23397e8 Mon Sep 17 00:00:00 2001 From: enge Date: Thu, 23 Jan 2014 09:34:41 +0000 Subject: 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 --- tools/Makefile.am | 2 +- tools/bench/Makefile.am | 2 +- tools/bench/benchtime.h | 13 ++++++------- tools/bench/mpcbench.c | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index b91ddf6..5730d54 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,6 +1,6 @@ ## tools/Makefile.am -- Process this file with automake to produce Makefile.in ## -## Copyright (C) 2014 INRIA +## Copyright (C) 2014 CNRS ## ## This file is part of GNU MPC. ## diff --git a/tools/bench/Makefile.am b/tools/bench/Makefile.am index a6ebd50..aa60f95 100644 --- a/tools/bench/Makefile.am +++ b/tools/bench/Makefile.am @@ -1,6 +1,6 @@ ## tools/bench/Makefile.am -- Process this file with automake to produce Makefile.in ## -## Copyright (C) 2014 INRIA +## Copyright (C) 2014 CNRS ## ## This file is part of GNU MPC. ## 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 */ diff --git a/tools/bench/mpcbench.c b/tools/bench/mpcbench.c index f00a182..5cfd89d 100644 --- a/tools/bench/mpcbench.c +++ b/tools/bench/mpcbench.c @@ -1,6 +1,6 @@ /* mpcbench.c -- perform the benchmark on the complex numbers. -Copyright (C) 2014, INRIA +Copyright (C) 2014 CNRS This file is part of GNU MPC. -- cgit v1.2.1