Skip to content
Snippets Groups Projects
Commit 39cd60f9 authored by Eric Wait's avatar Eric Wait
Browse files

The median filter shouldn't move memory to the card if there is nothing to do.

parent 2fe7ad0e
No related branches found
Tags v1.0.2
No related merge requests found
...@@ -116,6 +116,12 @@ PixelType* cMedianFilter(const PixelType* imageIn, Vec<size_t> dims, Vec<size_t> ...@@ -116,6 +116,12 @@ PixelType* cMedianFilter(const PixelType* imageIn, Vec<size_t> dims, Vec<size_t>
neighborhood = neighborhood.clamp(Vec<size_t>(1,1,1),dims); neighborhood = neighborhood.clamp(Vec<size_t>(1,1,1),dims);
if (neighborhood == Vec<size_t>(1, 1, 1))
{
memcpy(imOut, imageIn, sizeof(PixelType)*dims.product());
return imOut;
}
cudaDeviceProp props; cudaDeviceProp props;
cudaGetDeviceProperties(&props,device); cudaGetDeviceProperties(&props,device);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment