From 9bef85eaf7d5ab0a544d7d036cfd9181d5ad5383 Mon Sep 17 00:00:00 2001 From: David Mayerich Date: Fri, 28 Jul 2017 16:10:35 -0500 Subject: [PATCH] Put parenthesis around (std::min) in order to deal with a Windows macro error --- python/envi.py | 2 ++ stim/envi/bip.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python/envi.py b/python/envi.py index cbfc82a..22c54ec 100644 --- a/python/envi.py +++ b/python/envi.py @@ -339,6 +339,8 @@ class envi: outmask[i[0][0:idx], i[1][0:idx]] = self.mask[i[0][0:idx], i[1][0:idx]] return outmask + def close(self): + self.file.close() def __del__(self): self.file.close() \ No newline at end of file diff --git a/stim/envi/bip.h b/stim/envi/bip.h index 7262b11..3af4ea9 100644 --- a/stim/envi/bip.h +++ b/stim/envi/bip.h @@ -7,6 +7,7 @@ #include #include #include +#include //CUDA //#ifdef CUDA_FOUND @@ -1863,7 +1864,7 @@ public: size_t ratio_i; T* temp_spec = (T*) malloc(Z() * sizeof(T)); //allocate space to hold a single pixel while(xy < XY){ //while there are unprocessed spectra - bs = min(XY - xy, nS); //calculate the number of spectra to include in the batch + bs = (std::min)(XY - xy, nS); //calculate the number of spectra to include in the batch for(s = 0; s < bs; s++){ //for each spectrum in the batch pixel(temp_spec, xy + s); //read a pixel from disk memcpy(&batch[s * S], temp_spec, S * sizeof(T)); -- libgit2 0.21.4