From 949bc93fdd834b2f0098f8f6f64e0ff9cec46e0b Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Mon, 20 Apr 2015 11:57:10 +0100 Subject: [PATCH] Fix ambiguous call to `pow` due to uncast float literal --- Source/EmberCL/DEOpenCLKernelCreator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/EmberCL/DEOpenCLKernelCreator.cpp b/Source/EmberCL/DEOpenCLKernelCreator.cpp index 1649f65..36bfe6c 100644 --- a/Source/EmberCL/DEOpenCLKernelCreator.cpp +++ b/Source/EmberCL/DEOpenCLKernelCreator.cpp @@ -291,7 +291,7 @@ string DEOpenCLKernelCreator::CreateGaussianDEKernel(size_t ss) if (doScf) os << - " real_t scfact = pow(densityFilter->m_Supersample / (densityFilter->m_Supersample + 1.0), (real_t)2.0);\n"; + " real_t scfact = pow(densityFilter->m_Supersample / (densityFilter->m_Supersample + (real_t)1.0), (real_t)2.0);\n"; } os << @@ -518,7 +518,7 @@ string DEOpenCLKernelCreator::CreateGaussianDEKernel(size_t ss) if (doScf) os << - " real_t scfact = pow(densityFilter->m_Supersample / (densityFilter->m_Supersample + 1.0), (real_t)2.0);\n"; + " real_t scfact = pow(densityFilter->m_Supersample / (densityFilter->m_Supersample + (real_t)1.0), (real_t)2.0);\n"; } //Compute the size of the temporary box which is the block width + 2 * filter width x block height + 2 * filter width. @@ -776,7 +776,7 @@ string DEOpenCLKernelCreator::CreateGaussianDEKernelNoLocalCache(size_t ss) " int densityBoxBottomY;\n"; if (doScf) - os << " real_t scfact = pow((real_t)densityFilter->m_Supersample / ((real_t)densityFilter->m_Supersample + 1.0), (real_t)2.0);\n"; + os << " real_t scfact = pow((real_t)densityFilter->m_Supersample / ((real_t)densityFilter->m_Supersample + (real_t)1.0), (real_t)2.0);\n"; } os <<