diff options
author | Carlos Zubieta <czubieta.dev@gmail.com> | 2013-07-30 18:57:44 -0500 |
---|---|---|
committer | Téo Mazars <teo.mazars@ensimag.fr> | 2013-10-31 11:41:43 +0100 |
commit | bbe0bb8e71623b7fdf5d7ee83b3817501fd5e1f8 (patch) | |
tree | c2a54632152745de4a2edead026208578accccf2 /opencl | |
parent | 8a6eedf9c5b8676c0c1e2be5ba0b91553dde301f (diff) |
Using FLT_MAX and FLT_MIN insted of 1.0 and -1.0 in box-min and box-max
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/box-max.cl | 4 | ||||
-rw-r--r-- | opencl/box-max.cl.h | 4 | ||||
-rw-r--r-- | opencl/box-min.cl | 4 | ||||
-rw-r--r-- | opencl/box-min.cl.h | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/opencl/box-max.cl b/opencl/box-max.cl index b780ecea..2e972378 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)(-1000000000.0f); + max = (float4)(FLT_MIN); 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)(-1000000000.0f); + max = (float4)(FLT_MIN); if(get_global_id(1) < width) { diff --git a/opencl/box-max.cl.h b/opencl/box-max.cl.h index 983625dd..7a64f1d6 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)(-1000000000.0f); \n" +" max = (float4)(FLT_MIN); \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)(-1000000000.0f); \n" +" max = (float4)(FLT_MIN); \n" " \n" " if(get_global_id(1) < width) \n" " { \n" diff --git a/opencl/box-min.cl b/opencl/box-min.cl index f0978de6..1828afab 100644 --- a/opencl/box-min.cl +++ b/opencl/box-min.cl @@ -10,7 +10,7 @@ __kernel void kernel_min_hor (__global const float4 *in, float4 min; float4 in_v; - min = (float4)(1000000000.0f); + min = (float4)(FLT_MAX); if (get_global_id(1) < width) { @@ -34,7 +34,7 @@ __kernel void kernel_max_ver (__global const float4 *aux, float4 min; float4 aux_v; - min = (float4)(1000000000.0f); + min = (float4)(FLT_MAX); if(get_global_id(1) < width) { diff --git a/opencl/box-min.cl.h b/opencl/box-min.cl.h index 12332587..8df03c96 100644 --- a/opencl/box-min.cl.h +++ b/opencl/box-min.cl.h @@ -11,7 +11,7 @@ static const char* box_min_cl_source = " float4 min; \n" " float4 in_v; \n" " \n" -" min = (float4)(1000000000.0f); \n" +" min = (float4)(FLT_MAX); \n" " \n" " if (get_global_id(1) < width) \n" " { \n" @@ -35,7 +35,7 @@ static const char* box_min_cl_source = " float4 min; \n" " float4 aux_v; \n" " \n" -" min = (float4)(1000000000.0f); \n" +" min = (float4)(FLT_MAX); \n" " \n" " if(get_global_id(1) < width) \n" " { \n" |