Konstantin Ladutenko 8 years ago
parent
commit
7adc7765fe
2 changed files with 3 additions and 1 deletions
  1. 1 1
      src/nmie.cc
  2. 2 0
      tests/c++/speed-test.cc

+ 1 - 1
src/nmie.cc

@@ -53,7 +53,7 @@
 namespace nmie {
   //typedef float FloatType;
   //typedef double FloatType;
-  typedef boost::multiprecision::cpp_bin_float_100 FloatType;
+  typedef boost::multiprecision::cpp_bin_float_50 FloatType;
   
   //**********************************************************************************//
   // This function emulates a C call to calculate the scattering coefficients         //

+ 2 - 0
tests/c++/speed-test.cc

@@ -189,6 +189,7 @@ int main(int argc, char *argv[]) {
       for (int i = 0; i<repeats; ++i) {
     	nmie::nMie(L, x, m, nt, Theta, &Qextw, &Qscaw,
     			   &Qabsw, &Qbkw, &Qprw, &gw, &Albedow, S1w, S2w);
+	break;
       }
       clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time2);
       cpptime_nsec = diff(time1,time2).tv_nsec;
@@ -196,6 +197,7 @@ int main(int argc, char *argv[]) {
 
       printf("-- C++ time consumed %lg sec\n", (cpptime_nsec/1e9));
       repeats *= 10;
+      break;
     } while (cpptime_nsec < 1e8 && ctime_nsec < 1e8);
 
         printf("\n");