summaryrefslogtreecommitdiff
path: root/tune
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-07-06 22:07:06 +0200
committerKevin Ryde <user42@zip.com.au>2001-07-06 22:07:06 +0200
commit7d31a914216006351fb01d27feb5b9da1918e413 (patch)
tree5e558c0e20edd5113a67fc11ed25b6d412ee16c4 /tune
parentb0272ff1cc1d3c91ec739006667291440fb47d3f (diff)
downloadgmp-7d31a914216006351fb01d27feb5b9da1918e413.tar.gz
* tune/speed.c,speed.h,common.c,many.pl (MPN_ZERO): Add measuring.
Diffstat (limited to 'tune')
-rw-r--r--tune/speed.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/tune/speed.c b/tune/speed.c
index 790a8a060..809ca5342 100644
--- a/tune/speed.c
+++ b/tune/speed.c
@@ -1,6 +1,5 @@
-/* Speed measuring program. */
+/* Speed measuring program.
-/*
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -18,8 +17,7 @@ License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA.
-*/
+MA 02111-1307, USA. */
/* Usage message is in the code below, run with no arguments to print it.
See README for interesting applications.
@@ -84,11 +82,12 @@ SPEED_EXTRA_PROTOS2
#endif
-#define MPN_FILL(ptr, size, n) \
- do { \
- mp_size_t i; \
- for (i = 0; i < size; i++) \
- ptr[i] = n; \
+#define MPN_FILL(ptr, size, n) \
+ do { \
+ mp_size_t __i; \
+ ASSERT ((size) >= 0); \
+ for (__i = 0; __i < (size); __i++) \
+ (ptr)[__i] = (n); \
} while (0)
#define CMP_ABSOLUTE 1
@@ -288,6 +287,8 @@ const struct routine_t {
{ "mpn_copyd", speed_mpn_copyd },
#endif
+ { "MPN_ZERO", speed_MPN_ZERO },
+
{ "modlimb_invert", speed_modlimb_invert, FLAG_NODATA },
{ "modlimb_invert_mul1", speed_modlimb_invert_mul1, FLAG_NODATA },
{ "modlimb_invert_loop", speed_modlimb_invert_loop, FLAG_NODATA },