Program: gdcm
Module: $RCSfile: TestInline.cxx,v $
Language: C++
- Date: $Date: 2005/10/23 14:49:51 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2005/11/02 09:40:11 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <iostream>
#include <time.h>
+#ifdef CMAKE_HAVE_SYS_TIMES_H
#include <sys/times.h>
+#else
+#include <sys/timeb.h>
+#endif
void frswap (double &a, double &b);
void fpswap (double *a, double *b);
double passRef(double &a, double &b);
double passPtr(double *a, double *b);
-/*
-//To perform a full check, just put the two 'static' functions
-//hifpswap and hNoifpswap in a .h
-
- static inline void hifpswap(double *a, double *b)
- {
- double tmp;
- tmp = *a;
- *a = *b;
- *b = tmp;
- }
-
- static void hNoifpswap(double *a, double *b)
- {
- double tmp;
- tmp = *a;
- *a = *b;
- *b = tmp;
- }
-
-*/
-
#define \
mswap(a, b) \
{ \
if (argc > 1)
nbLoop = atoi(argv[1]);
else
- nbLoop = 100000000;
+ nbLoop = 10000000;
clock_t r1, r2;
struct tms tms1, tms2;
double a = 1, b = 2;
double tmp;
- uint16_t x, y;
+ uint16_t x=1, y=2;
// ----------------------------------------
std::cout << "Use a macro "<< std::endl;