RSS/Atom feed Twitter
Site is read-only, email is disabled

[PATCH 1/1] noise-cell: remove static keywords

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

[PATCH 1/1] noise-cell: remove static keywords Jan Vesely 20 Apr 16:51
Jan Vesely
2014-04-20 16:51:58 UTC (over 10 years ago)

[PATCH 1/1] noise-cell: remove static keywords

static keyword is not supported by OpenCL 1.1. See Ch. 6.8 Restrictions, letter g)

Signed-off-by: Jan Vesely ---
opencl/noise-cell.cl | 8 ++++---- opencl/noise-cell.cl.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/opencl/noise-cell.cl b/opencl/noise-cell.cl index 1e55585..e3c223d 100644
--- a/opencl/noise-cell.cl
+++ b/opencl/noise-cell.cl
@@ -3,7 +3,7 @@
/* Random feature counts following the Poisson distribution with lambda equal to 7. */

-static const __constant char poisson[256] = { +const __constant char poisson[256] = { 7, 9, 12, 12, 8, 7, 5, 5, 6, 7, 8, 6, 10, 7, 6, 2, 8, 3, 9, 5, 13, 10, 9, 8, 8, 9, 3, 8, 9, 6, 8, 7, 4, 9, 6, 3, 10, 7, 7, 7, 6, 7, 4, 14, 7, 6, 11, 7, 7, 7, 12, 7, 10, 6, 8, 11, 3, 5, 7, 7, 8, 7, 9, 8, 5, 8, 11, 3, 4, 5, 8, @@ -17,7 +17,7 @@ static const __constant char poisson[256] = { 9, 10, 8, 8, 6, 4, 9, 9, 8, 11, 6, 8, 13, 8, 9, 12, 6, 9, 8 };

-static uint
+uint
philox (uint s,
uint t,
uint k)
@@ -38,13 +38,13 @@ philox (uint s,
return s;
}

-static float
+float
lcg (uint *hash)
{
return (*hash = *hash * 1664525u + 1013904223u) / 4294967296.0f; }

-static void
+void
search_box (float *closest, uint *feature, int s,
diff --git a/opencl/noise-cell.cl.h b/opencl/noise-cell.cl.h index 775f591..7ad09b4 100644
--- a/opencl/noise-cell.cl.h
+++ b/opencl/noise-cell.cl.h
@@ -4,7 +4,7 @@ static const char* noise_cell_cl_source = "/* Random feature counts following the Poisson distribution with \n" " lambda equal to 7. */ \n" " \n" -"static const __constant char poisson[256] = { \n" +"const __constant char poisson[256] = { \n" " 7, 9, 12, 12, 8, 7, 5, 5, 6, 7, 8, 6, 10, 7, 6, 2, 8, 3, 9, 5, 13, 10, 9, \n" " 8, 8, 9, 3, 8, 9, 6, 8, 7, 4, 9, 6, 3, 10, 7, 7, 7, 6, 7, 4, 14, 7, 6, 11, \n" " 7, 7, 7, 12, 7, 10, 6, 8, 11, 3, 5, 7, 7, 8, 7, 9, 8, 5, 8, 11, 3, 4, 5, 8, \n" @@ -18,7 +18,7 @@ static const char* noise_cell_cl_source = " 9, 10, 8, 8, 6, 4, 9, 9, 8, 11, 6, 8, 13, 8, 9, 12, 6, 9, 8 \n" "}; \n" " \n" -"static uint \n" +"uint \n" "philox (uint s, \n" " uint t, \n" " uint k) \n" @@ -39,13 +39,13 @@ static const char* noise_cell_cl_source = " return s; \n" "} \n" " \n" -"static float \n" +"float \n" "lcg (uint *hash) \n" "{ \n" " return (*hash = *hash * 1664525u + 1013904223u) / 4294967296.0f; \n" "} \n" " \n" -"static void \n" +"void \n" "search_box (float *closest, \n" " uint *feature, \n" " int s, \n"

1.9.0