[gegl] opencl,contrast-curve: Fix float literal format



commit a70537cd76b7d27f68db8253c685b853c308c7c6
Author: Jan Vesely <jan vesely rutgers edu>
Date:   Wed Apr 26 18:05:45 2017 -0400

    opencl,contrast-curve: Fix float literal format
    
    Fixes: ** (lt-gegl:22253): WARNING **: build program failure
    input.cl:164:30: error: invalid digit 'f' in octal constant
    
    Signed-off-by: Jan Vesely <jan vesely rutgers edu>

 opencl/contrast-curve.cl   |    4 ++--
 opencl/contrast-curve.cl.h |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/opencl/contrast-curve.cl b/opencl/contrast-curve.cl
index 15f816c..5cfdce9 100644
--- a/opencl/contrast-curve.cl
+++ b/opencl/contrast-curve.cl
@@ -24,8 +24,8 @@ __kernel void cl_contrast_curve(__global const float2 *in,
   int gid     = get_global_id(0);
   float2 in_v = in[gid];
 
-  int idx = (int) fmin(num_sampling_points - 1,
-                       fmax(0f,
+  int idx = (int) fmin(num_sampling_points - 1.0f,
+                       fmax(0.0f,
                             in_v.x * num_sampling_points));
 
   out[gid] = (float2) (curve[idx], in_v.y);
diff --git a/opencl/contrast-curve.cl.h b/opencl/contrast-curve.cl.h
index a6903c7..b0f9010 100644
--- a/opencl/contrast-curve.cl.h
+++ b/opencl/contrast-curve.cl.h
@@ -25,8 +25,8 @@ static const char* contrast_curve_cl_source =
 "  int gid     = get_global_id(0);                                             \n"
 "  float2 in_v = in[gid];                                                      \n"
 "                                                                              \n"
-"  int idx = (int) fmin(num_sampling_points - 1,                               \n"
-"                       fmax(0f,                                               \n"
+"  int idx = (int) fmin(num_sampling_points - 1.0f,                            \n"
+"                       fmax(0.0f,                                             \n"
 "                            in_v.x * num_sampling_points));                   \n"
 "                                                                              \n"
 "  out[gid] = (float2) (curve[idx], in_v.y);                                   \n"


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