Skip to content

Commit

Permalink
fix: force float for gaussian blur
Browse files Browse the repository at this point in the history
  • Loading branch information
StRigaud committed Jul 25, 2023
1 parent 70bc52f commit 88ce412
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions clic/src/tier1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,11 +606,17 @@ gaussian_blur_func(const Device::Pointer & device,
float sigma_y,
float sigma_z) -> Array::Pointer
{
tier0::create_like(src, dst);
tier0::create_like(src, dst, dType::FLOAT);
Array::Pointer temp = src;
if (temp->dtype() != dType::FLOAT)
{
temp = Array::create(dst);
tier1::copy_func(device, src, temp);
}
const KernelInfo kernel = { "gaussian_blur_separable", kernel::gaussian_blur_separable };
tier0::execute_separable_func(device,
kernel,
src,
temp,
dst,
{ sigma_x, sigma_y, sigma_z },
{ sigma2kernelsize(sigma_x), sigma2kernelsize(sigma_y), sigma2kernelsize(sigma_z) });
Expand Down

0 comments on commit 88ce412

Please sign in to comment.