Commit 58e55e6bd55a13ba86dd116b2e31b8d57e851595
1 parent
6abbfbdc
fixed colormap.h CUDA dependence, fixed warning in envi_header
Showing
3 changed files
with
4 additions
and
4 deletions
Show diff stats
stim/envi/bip.h
... | ... | @@ -1089,7 +1089,7 @@ public: |
1089 | 1089 | } |
1090 | 1090 | |
1091 | 1091 | |
1092 | - #ifdef CUDA_FOUND | |
1092 | +#ifdef CUDA_FOUND | |
1093 | 1093 | /// Calculate the covariance matrix of Noise for masked pixels using cuBLAS |
1094 | 1094 | /// Note that cuBLAS only supports integer-sized arrays, so there may be issues with large spectra |
1095 | 1095 | bool coNoise_matrix_cublas(double* coN, double* avg, unsigned char *mask, bool PROGRESS = false){ | ... | ... |
stim/envi/envi_header.h
... | ... | @@ -446,8 +446,8 @@ struct envi_header |
446 | 446 | if(wavelength.size() == 0){ //if a wavelength vector doesn't exist, assume the passed value is a band |
447 | 447 | if(w < 0 || w > bands-1) return idx; //if the band is outside the given band range, return an empty vector |
448 | 448 | size_t low, high; //allocate space for the floor and ceiling |
449 | - low = std::floor(w); //calculate the floor | |
450 | - high = std::ceil(w); //calculate the ceiling | |
449 | + low = (size_t)std::floor(w); //calculate the floor | |
450 | + high = (size_t)std::ceil(w); //calculate the ceiling | |
451 | 451 | if(low == high) //if the floor and ceiling are the same |
452 | 452 | idx.push_back(low); //return a vector with one element (the given w matches a band exactly) |
453 | 453 | else{ | ... | ... |
stim/visualization/colormap.h
... | ... | @@ -4,13 +4,13 @@ |
4 | 4 | #include <string> |
5 | 5 | #include <stdlib.h> |
6 | 6 | #include <cmath> |
7 | -#include "cublas_v2.h" | |
8 | 7 | |
9 | 8 | #ifdef _WIN32 |
10 | 9 | #include <float.h> |
11 | 10 | #endif |
12 | 11 | |
13 | 12 | #ifdef __CUDACC__ |
13 | +#include "cublas_v2.h" | |
14 | 14 | #include <stim/cuda/cudatools/error.h> |
15 | 15 | #endif |
16 | 16 | ... | ... |