Commit 39cd60f9 authored by Eric Wait's avatar Eric Wait

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

parent 2fe7ad0e
......@@ -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);
if (neighborhood == Vec<size_t>(1, 1, 1))
{
memcpy(imOut, imageIn, sizeof(PixelType)*dims.product());
return imOut;
}
cudaDeviceProp props;
cudaGetDeviceProperties(&props,device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment