diff options
author | Daniel Sabo <DanielSabo@gmail.com> | 2013-11-02 22:15:29 -0700 |
---|---|---|
committer | Daniel Sabo <DanielSabo@gmail.com> | 2013-11-02 22:23:01 -0700 |
commit | c2b168076628ec5ea47c6864a2b80bfe75b34fc2 (patch) | |
tree | 0f88427ff040bd9fec741f9b15a8bb8b81860e67 /opencl | |
parent | 6b00f791a1ec2a94c232a553020fe3a68500fec8 (diff) |
opencl: Fix kernel compile warnings
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/colors.cl | 3 | ||||
-rw-r--r-- | opencl/colors.cl.h | 3 | ||||
-rw-r--r-- | opencl/random.cl | 24 | ||||
-rw-r--r-- | opencl/random.cl.h | 24 |
4 files changed, 52 insertions, 2 deletions
diff --git a/opencl/colors.cl b/opencl/colors.cl index 2f74d66d..689a0530 100644 --- a/opencl/colors.cl +++ b/opencl/colors.cl @@ -29,6 +29,9 @@ */ #define BABL_ALPHA_THRESHOLD 0.0f +float linear_to_gamma_2_2 (float value); +float gamma_2_2_to_linear (float value); + /* babl reference file: babl/base/util.h */ float linear_to_gamma_2_2 (float value) { diff --git a/opencl/colors.cl.h b/opencl/colors.cl.h index b5bc65ac..9431fc30 100644 --- a/opencl/colors.cl.h +++ b/opencl/colors.cl.h @@ -30,6 +30,9 @@ static const char* colors_cl_source = " */ \n" "#define BABL_ALPHA_THRESHOLD 0.0f \n" " \n" +"float linear_to_gamma_2_2 (float value); \n" +"float gamma_2_2_to_linear (float value); \n" +" \n" "/* babl reference file: babl/base/util.h */ \n" "float linear_to_gamma_2_2 (float value) \n" "{ \n" diff --git a/opencl/random.cl b/opencl/random.cl index 77f53203..e6e33405 100644 --- a/opencl/random.cl +++ b/opencl/random.cl @@ -24,6 +24,28 @@ #define RANDOM_DATA_SIZE (15083+15091+15101) #define PRIME_SIZE 533u +inline uint _gegl_cl_random_int (__global const int *cl_random_data, + __global const long *cl_random_primes, + int seed, int x, int y, int z, int n); + +uint gegl_cl_random_int (__global const int *cl_random_data, + __global const long *cl_random_primes, + int seed, int x, int y, int z, int n); + +int gegl_cl_random_int_range (__global const int *cl_random_data, + __global const long *cl_random_primes, + int seed, int x, int y, int z, int n, + int min, int max); + +float gegl_cl_random_float (__global const int *cl_random_data, + __global const long *cl_random_primes, + int seed, int x, int y, int z, int n); + +float gegl_cl_random_float_range (__global const int *cl_random_data, + __global const long *cl_random_primes, + int seed, int x, int y, int z, int n, + float min, float max); + inline uint _gegl_cl_random_int (__global const int *cl_random_data, __global const long *cl_random_primes, @@ -79,7 +101,7 @@ gegl_cl_random_int_range (__global const int *cl_random_data, } -#define G_RAND_FLOAT_TRANSFORM 0.00001525902189669642175 +#define G_RAND_FLOAT_TRANSFORM 0.00001525902189669642175f float gegl_cl_random_float (__global const int *cl_random_data, diff --git a/opencl/random.cl.h b/opencl/random.cl.h index a0e7a631..6b789514 100644 --- a/opencl/random.cl.h +++ b/opencl/random.cl.h @@ -25,6 +25,28 @@ static const char* random_cl_source = "#define RANDOM_DATA_SIZE (15083+15091+15101) \n" "#define PRIME_SIZE 533u \n" " \n" +"inline uint _gegl_cl_random_int (__global const int *cl_random_data, \n" +" __global const long *cl_random_primes, \n" +" int seed, int x, int y, int z, int n); \n" +" \n" +"uint gegl_cl_random_int (__global const int *cl_random_data, \n" +" __global const long *cl_random_primes, \n" +" int seed, int x, int y, int z, int n); \n" +" \n" +"int gegl_cl_random_int_range (__global const int *cl_random_data, \n" +" __global const long *cl_random_primes, \n" +" int seed, int x, int y, int z, int n, \n" +" int min, int max); \n" +" \n" +"float gegl_cl_random_float (__global const int *cl_random_data, \n" +" __global const long *cl_random_primes, \n" +" int seed, int x, int y, int z, int n); \n" +" \n" +"float gegl_cl_random_float_range (__global const int *cl_random_data, \n" +" __global const long *cl_random_primes, \n" +" int seed, int x, int y, int z, int n, \n" +" float min, float max); \n" +" \n" "inline uint \n" "_gegl_cl_random_int (__global const int *cl_random_data, \n" " __global const long *cl_random_primes, \n" @@ -80,7 +102,7 @@ static const char* random_cl_source = "} \n" " \n" " \n" -"#define G_RAND_FLOAT_TRANSFORM 0.00001525902189669642175 \n" +"#define G_RAND_FLOAT_TRANSFORM 0.00001525902189669642175f \n" " \n" "float \n" "gegl_cl_random_float (__global const int *cl_random_data, \n" |