Commit cc42ca92c58458c52ce24d64b76b6bfc9b6eafad

Authored by David Mayerich
1 parent 5d42469a

addressed warnings

stim/cuda/ivote/down_sample.cuh
@@ -36,12 +36,12 @@ namespace stim{ @@ -36,12 +36,12 @@ namespace stim{
36 36
37 /// Applies a Gaussian blur to a 2D image stored on the GPU 37 /// Applies a Gaussian blur to a 2D image stored on the GPU
38 template<typename T> 38 template<typename T>
39 - void gpu_down_sample(T* gpuI, T* gpuI0, T resize, unsigned int x, unsigned int y){ 39 + void gpu_down_sample(T* gpuI, T* gpuI0, T resize, size_t x, size_t y){
40 40
41 41
42 - unsigned int sigma_ds = 1/resize;  
43 - unsigned int x_ds = (x/sigma_ds + (x %sigma_ds == 0 ? 0:1));  
44 - unsigned int y_ds = (y/sigma_ds + (y %sigma_ds == 0 ? 0:1)); 42 + unsigned int sigma_ds = (unsigned int)(1.0f/resize);
  43 + size_t x_ds = (x/sigma_ds + (x %sigma_ds == 0 ? 0:1));
  44 + size_t y_ds = (y/sigma_ds + (y %sigma_ds == 0 ? 0:1));
45 45
46 //get the number of pixels in the image 46 //get the number of pixels in the image
47 // unsigned int pixels_ds = x_ds * y_ds; 47 // unsigned int pixels_ds = x_ds * y_ds;
stim/cuda/templates/gradient.cuh
@@ -52,9 +52,6 @@ namespace stim{ @@ -52,9 +52,6 @@ namespace stim{
52 52
53 template<typename T> 53 template<typename T>
54 void gpu_gradient_2d(T* gpuGrad, T* gpuI, unsigned int x, unsigned int y){ 54 void gpu_gradient_2d(T* gpuGrad, T* gpuI, unsigned int x, unsigned int y){
55 -  
56 - //get the number of pixels in the image  
57 - unsigned int pixels = x * y;  
58 55
59 //get the maximum number of threads per block for the CUDA device 56 //get the maximum number of threads per block for the CUDA device
60 unsigned int max_threads = stim::maxThreadsPerBlock(); 57 unsigned int max_threads = stim::maxThreadsPerBlock();