Commit a70537cd authored by Jan Vesely's avatar Jan Vesely Committed by Øyvind "pippin" Kolås

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: default avatarJan Vesely <jan.vesely@rutgers.edu>
parent f9cd9f68
...@@ -24,8 +24,8 @@ __kernel void cl_contrast_curve(__global const float2 *in, ...@@ -24,8 +24,8 @@ __kernel void cl_contrast_curve(__global const float2 *in,
int gid = get_global_id(0); int gid = get_global_id(0);
float2 in_v = in[gid]; float2 in_v = in[gid];
int idx = (int) fmin(num_sampling_points - 1, int idx = (int) fmin(num_sampling_points - 1.0f,
fmax(0f, fmax(0.0f,
in_v.x * num_sampling_points)); in_v.x * num_sampling_points));
out[gid] = (float2) (curve[idx], in_v.y); out[gid] = (float2) (curve[idx], in_v.y);
......
...@@ -25,8 +25,8 @@ static const char* contrast_curve_cl_source = ...@@ -25,8 +25,8 @@ static const char* contrast_curve_cl_source =
" int gid = get_global_id(0); \n" " int gid = get_global_id(0); \n"
" float2 in_v = in[gid]; \n" " float2 in_v = in[gid]; \n"
" \n" " \n"
" int idx = (int) fmin(num_sampling_points - 1, \n" " int idx = (int) fmin(num_sampling_points - 1.0f, \n"
" fmax(0f, \n" " fmax(0.0f, \n"
" in_v.x * num_sampling_points)); \n" " in_v.x * num_sampling_points)); \n"
" \n" " \n"
" out[gid] = (float2) (curve[idx], in_v.y); \n" " out[gid] = (float2) (curve[idx], in_v.y); \n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment