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