Commit 9bef85eaf7d5ab0a544d7d036cfd9181d5ad5383

Authored by David Mayerich
1 parent 777fef6c

Put parenthesis around (std::min) in order to deal with a Windows macro error

Showing 2 changed files with 4 additions and 1 deletions   Show diff stats
python/envi.py
... ... @@ -339,6 +339,8 @@ class envi:
339 339 outmask[i[0][0:idx], i[1][0:idx]] = self.mask[i[0][0:idx], i[1][0:idx]]
340 340 return outmask
341 341  
  342 + def close(self):
  343 + self.file.close()
342 344  
343 345 def __del__(self):
344 346 self.file.close()
345 347 \ No newline at end of file
... ...
stim/envi/bip.h
... ... @@ -7,6 +7,7 @@
7 7 #include <cstring>
8 8 #include <complex>
9 9 #include <utility>
  10 +#include <algorithm>
10 11  
11 12 //CUDA
12 13 //#ifdef CUDA_FOUND
... ... @@ -1863,7 +1864,7 @@ public:
1863 1864 size_t ratio_i;
1864 1865 T* temp_spec = (T*) malloc(Z() * sizeof(T)); //allocate space to hold a single pixel
1865 1866 while(xy < XY){ //while there are unprocessed spectra
1866   - bs = min(XY - xy, nS); //calculate the number of spectra to include in the batch
  1867 + bs = (std::min)(XY - xy, nS); //calculate the number of spectra to include in the batch
1867 1868 for(s = 0; s < bs; s++){ //for each spectrum in the batch
1868 1869 pixel(temp_spec, xy + s); //read a pixel from disk
1869 1870 memcpy(&batch[s * S], temp_spec, S * sizeof(T));
... ...