summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorTéo Mazars <teo.mazars@ensimag.fr>2013-10-31 11:50:51 +0100
committerTéo Mazars <teo.mazars@ensimag.fr>2013-10-31 12:00:50 +0100
commit05031bfbd5c81714ce4071fc1691af3f0c91b5f5 (patch)
treeeceacb98da3641fa18edd1cfc1a8fc2fb0490aeb /opencl
parentc9f2bbc785853d01c3d99ba5938ad18675da4f51 (diff)
opencl: use -FLT_MAX instead of FLT_MIN as minimal value
Diffstat (limited to 'opencl')
-rw-r--r--opencl/box-max.cl4
-rw-r--r--opencl/box-max.cl.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/opencl/box-max.cl b/opencl/box-max.cl
index 2e972378..2beba523 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 94d3d340..1afac133 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"