Commit 5435830bbb2913e0f9aa0a3f625803a07cb6ce8d

Authored by David Mayerich
1 parent 6db250f5

linux chrono fixes

Showing 2 changed files with 8 additions and 4 deletions   Show diff stats
stim/envi/binary.h
... ... @@ -8,7 +8,7 @@
8 8 #include <fstream>
9 9 #include <sys/stat.h>
10 10 #include <cstring>
11   -
  11 +#include <chrono>
12 12 #ifdef _WIN32
13 13 #include <Windows.h>
14 14 #else
... ...
stim/envi/bsq.h
... ... @@ -421,9 +421,9 @@ public:
421 421 std::future<size_t> rthread;
422 422 std::future<std::ostream&> wthread; //create asynchronous threads for reading and writing
423 423  
424   - readlines(src[0], 0, N[0]); //read the first batch into the 0 source buffer
425   - y_load += N[0]; //increment the loaded slice counter
426   - int b = 1;
  424 + //readlines(src[0], 0, N[0]); //read the first batch into the 0 source buffer
  425 + //y_load += N[0]; //increment the loaded slice counter
  426 + //int b = 1;
427 427  
428 428 std::chrono::high_resolution_clock::time_point t_start, pt_start; //high-resolution timers
429 429 std::chrono::high_resolution_clock::time_point t_end, pt_end;
... ... @@ -433,6 +433,10 @@ public:
433 433 size_t rt_total = 0; //total time spent reading data
434 434 size_t wt_total = 0;
435 435 size_t data_rate;
  436 +
  437 + rt_total += readlines(src[0], 0, N[0]); //read the first batch into the 0 source buffer
  438 + y_load += N[0]; //increment the loaded slice counter
  439 + int b = 1; //initialize the double buffer to 0
436 440 while(y_proc < Y()){ //while there are still slices to be processed
437 441 t_start = std::chrono::high_resolution_clock::now(); //start the timer for this batch
438 442 if(y_load < Y()){ //if there are still slices to be loaded, load them
... ...