From cc42ca92c58458c52ce24d64b76b6bfc9b6eafad Mon Sep 17 00:00:00 2001 From: David Date: Thu, 2 Feb 2017 10:00:11 -0600 Subject: [PATCH] addressed warnings --- stim/cuda/ivote/down_sample.cuh | 8 ++++---- stim/cuda/templates/gradient.cuh | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/stim/cuda/ivote/down_sample.cuh b/stim/cuda/ivote/down_sample.cuh index bde2527..be14528 100644 --- a/stim/cuda/ivote/down_sample.cuh +++ b/stim/cuda/ivote/down_sample.cuh @@ -36,12 +36,12 @@ namespace stim{ /// Applies a Gaussian blur to a 2D image stored on the GPU template - void gpu_down_sample(T* gpuI, T* gpuI0, T resize, unsigned int x, unsigned int y){ + void gpu_down_sample(T* gpuI, T* gpuI0, T resize, size_t x, size_t y){ - unsigned int sigma_ds = 1/resize; - unsigned int x_ds = (x/sigma_ds + (x %sigma_ds == 0 ? 0:1)); - unsigned int y_ds = (y/sigma_ds + (y %sigma_ds == 0 ? 0:1)); + unsigned int sigma_ds = (unsigned int)(1.0f/resize); + size_t x_ds = (x/sigma_ds + (x %sigma_ds == 0 ? 0:1)); + size_t y_ds = (y/sigma_ds + (y %sigma_ds == 0 ? 0:1)); //get the number of pixels in the image // unsigned int pixels_ds = x_ds * y_ds; diff --git a/stim/cuda/templates/gradient.cuh b/stim/cuda/templates/gradient.cuh index d0718b2..88dd259 100644 --- a/stim/cuda/templates/gradient.cuh +++ b/stim/cuda/templates/gradient.cuh @@ -52,9 +52,6 @@ namespace stim{ template void gpu_gradient_2d(T* gpuGrad, T* gpuI, unsigned int x, unsigned int y){ - - //get the number of pixels in the image - unsigned int pixels = x * y; //get the maximum number of threads per block for the CUDA device unsigned int max_threads = stim::maxThreadsPerBlock(); -- libgit2 0.21.4