]> Creatis software - gdcm.git/blobdiff - Testing/TestInline.cxx
Comments
[gdcm.git] / Testing / TestInline.cxx
index 60bbc61864840e2581e3ef0d6bf9828cf72f3f70..38611daeb098edf45a07a991d05c3b220a23c72f 100755 (executable)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestInline.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/24 01:16:20 $
-  Version:   $Revision: 1.2 $
+  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
@@ -36,6 +36,8 @@
 #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);
@@ -55,28 +57,6 @@ double     passDirect(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)   \
 {             \
@@ -169,7 +149,7 @@ int TestInline(int argc, char *argv[])
    if (argc > 1)
       nbLoop = atoi(argv[1]);
    else
-      nbLoop = 100000000;      
+      nbLoop = 10000000;      
 
    clock_t r1, r2;
    struct tms tms1, tms2;
@@ -177,7 +157,7 @@ int TestInline(int argc, char *argv[])
    double a = 1, b = 2;
    double tmp;
    
-   uint16_t x, y;    
+   uint16_t x=1, y=2;    
  // ----------------------------------------
  
    std::cout << "Use a macro "<< std::endl;