[gegl] opencl: use -FLT_MAX instead of FLT_MIN as minimal value



commit 05031bfbd5c81714ce4071fc1691af3f0c91b5f5
Author: Téo Mazars <teo mazars ensimag fr>
Date:   Thu Oct 31 11:50:51 2013 +0100

    opencl: use -FLT_MAX instead of FLT_MIN as minimal value

 opencl/box-max.cl   |    4 ++--
 opencl/box-max.cl.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/opencl/box-max.cl b/opencl/box-max.cl
index 2e97237..2beba52 100644
--- a/opencl/box-max.cl
+++ b/opencl/box-max.cl
@@ -10,7 +10,7 @@ __kernel void kernel_max_hor (__global const float4     *in,
   float4 max;
   float4 in_v;
 
-  max = (float4)(FLT_MIN);
+  max = (float4)(-FLT_MAX);
 
   if (get_global_id(1) < width)
     {
@@ -34,7 +34,7 @@ __kernel void kernel_max_ver (__global const float4     *aux,
   float4 max;
   float4 aux_v;
 
-  max = (float4)(FLT_MIN);
+  max = (float4)(-FLT_MAX);
 
   if(get_global_id(1) < width)
     {
diff --git a/opencl/box-max.cl.h b/opencl/box-max.cl.h
index 94d3d34..1afac13 100644
--- a/opencl/box-max.cl.h
+++ b/opencl/box-max.cl.h
@@ -11,7 +11,7 @@ static const char* box_max_cl_source =
 "  float4 max;                                                                 \n"
 "  float4 in_v;                                                                \n"
 "                                                                              \n"
-"  max = (float4)(FLT_MIN);                                                    \n"
+"  max = (float4)(-FLT_MAX);                                                   \n"
 "                                                                              \n"
 "  if (get_global_id(1) < width)                                               \n"
 "    {                                                                         \n"
@@ -35,7 +35,7 @@ static const char* box_max_cl_source =
 "  float4 max;                                                                 \n"
 "  float4 aux_v;                                                               \n"
 "                                                                              \n"
-"  max = (float4)(FLT_MIN);                                                    \n"
+"  max = (float4)(-FLT_MAX);                                                   \n"
 "                                                                              \n"
 "  if(get_global_id(1) < width)                                                \n"
 "    {                                                                         \n"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]