From 5435830bbb2913e0f9aa0a3f625803a07cb6ce8d Mon Sep 17 00:00:00 2001 From: David Mayerich Date: Sat, 10 Sep 2016 10:36:40 -0500 Subject: [PATCH] linux chrono fixes --- stim/envi/binary.h | 2 +- stim/envi/bsq.h | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/stim/envi/binary.h b/stim/envi/binary.h index 2f0d7bb..b4a66bf 100644 --- a/stim/envi/binary.h +++ b/stim/envi/binary.h @@ -8,7 +8,7 @@ #include #include #include - +#include #ifdef _WIN32 #include #else diff --git a/stim/envi/bsq.h b/stim/envi/bsq.h index 983bb0f..06308ad 100644 --- a/stim/envi/bsq.h +++ b/stim/envi/bsq.h @@ -421,9 +421,9 @@ public: std::future rthread; std::future wthread; //create asynchronous threads for reading and writing - readlines(src[0], 0, N[0]); //read the first batch into the 0 source buffer - y_load += N[0]; //increment the loaded slice counter - int b = 1; + //readlines(src[0], 0, N[0]); //read the first batch into the 0 source buffer + //y_load += N[0]; //increment the loaded slice counter + //int b = 1; std::chrono::high_resolution_clock::time_point t_start, pt_start; //high-resolution timers std::chrono::high_resolution_clock::time_point t_end, pt_end; @@ -433,6 +433,10 @@ public: size_t rt_total = 0; //total time spent reading data size_t wt_total = 0; size_t data_rate; + + rt_total += readlines(src[0], 0, N[0]); //read the first batch into the 0 source buffer + y_load += N[0]; //increment the loaded slice counter + int b = 1; //initialize the double buffer to 0 while(y_proc < Y()){ //while there are still slices to be processed t_start = std::chrono::high_resolution_clock::now(); //start the timer for this batch if(y_load < Y()){ //if there are still slices to be loaded, load them -- libgit2 0.21.4