imageRows = (unsigned int) image->rows;
iRadius = (cl_int) (image->rows > image->columns ? image->rows : image->columns) * 0.002f * fabs(radius); // Normalized radius, 100% gives blur radius of 20% of the largest dimension
- passes = ((1.0f * imageColumns) * imageColumns * iRadius) / 4000000000.0f;
+ passes = (((1.0f * imageColumns) * imageColumns * iRadius) + 3999999999) / 4000000000.0f;
passes = (passes < 1) ? 1: passes;
/* set the kernel arguments */
(void) OpenCLThrowMagickException(device,exception, GetMagickModule(), ResourceLimitWarning, "clEnv->library->clEnqueueNDRangeKernel failed.", ".");
goto cleanup;
}
+ clEnv->library->clFlush(queue);
RecordProfileData(device,blurRowKernel,event);
}
}
(void) OpenCLThrowMagickException(device,exception, GetMagickModule(), ResourceLimitWarning, "clEnv->library->clEnqueueNDRangeKernel failed.", ".");
goto cleanup;
}
+ clEnv->library->clFlush(queue);
RecordProfileData(device,blurColumnKernel,event);
}
}