[gegl/soc-2013-opecl-ops] Using FLT_MAX and FLT_MIN insted of 1.0 and -1.0 in box-min and box-max
- From: Carlos Zubieta <czubieta src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2013-opecl-ops] Using FLT_MAX and FLT_MIN insted of 1.0 and -1.0 in box-min and box-max
- Date: Wed, 31 Jul 2013 16:49:24 +0000 (UTC)
commit e7a8fb48987398e09a1281b7a6a36479a699e5af
Author: Carlos Zubieta <czubieta dev gmail com>
Date: Tue Jul 30 18:57:44 2013 -0500
Using FLT_MAX and FLT_MIN insted of 1.0 and -1.0 in box-min and box-max
opencl/box-max.cl | 4 ++--
opencl/box-max.cl.h | 4 ++--
opencl/box-min.cl | 4 ++--
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 b780ece..2e97237 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 983625d..7a64f1d 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 f0978de..1828afa 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 1233258..8df03c9 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]