From 58e55e6bd55a13ba86dd116b2e31b8d57e851595 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 23 Aug 2016 18:36:03 -0500 Subject: [PATCH] fixed colormap.h CUDA dependence, fixed warning in envi_header --- stim/envi/bip.h | 2 +- stim/envi/envi_header.h | 4 ++-- stim/visualization/colormap.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stim/envi/bip.h b/stim/envi/bip.h index 2299003..c76f316 100644 --- a/stim/envi/bip.h +++ b/stim/envi/bip.h @@ -1089,7 +1089,7 @@ public: } - #ifdef CUDA_FOUND +#ifdef CUDA_FOUND /// Calculate the covariance matrix of Noise for masked pixels using cuBLAS /// Note that cuBLAS only supports integer-sized arrays, so there may be issues with large spectra bool coNoise_matrix_cublas(double* coN, double* avg, unsigned char *mask, bool PROGRESS = false){ diff --git a/stim/envi/envi_header.h b/stim/envi/envi_header.h index 98d456f..0ad108c 100644 --- a/stim/envi/envi_header.h +++ b/stim/envi/envi_header.h @@ -446,8 +446,8 @@ struct envi_header if(wavelength.size() == 0){ //if a wavelength vector doesn't exist, assume the passed value is a band if(w < 0 || w > bands-1) return idx; //if the band is outside the given band range, return an empty vector size_t low, high; //allocate space for the floor and ceiling - low = std::floor(w); //calculate the floor - high = std::ceil(w); //calculate the ceiling + low = (size_t)std::floor(w); //calculate the floor + high = (size_t)std::ceil(w); //calculate the ceiling if(low == high) //if the floor and ceiling are the same idx.push_back(low); //return a vector with one element (the given w matches a band exactly) else{ diff --git a/stim/visualization/colormap.h b/stim/visualization/colormap.h index 18fd905..b0807f3 100644 --- a/stim/visualization/colormap.h +++ b/stim/visualization/colormap.h @@ -4,13 +4,13 @@ #include #include #include -#include "cublas_v2.h" #ifdef _WIN32 #include #endif #ifdef __CUDACC__ +#include "cublas_v2.h" #include #endif -- libgit2 0.21.4