summaryrefslogtreecommitdiff
path: root/AutoImagesGPU.cl
diff options
context:
space:
mode:
authorpommicket <leonardomtenenbaum@gmail.com>2015-09-09 17:10:28 -0400
committerpommicket <leonardomtenenbaum@gmail.com>2015-09-09 17:10:28 -0400
commit9d05e1e048db3125054ad4bf15f1e9fe3f3e99b4 (patch)
tree5cf0995b066206b421fe6995426df225e4642768 /AutoImagesGPU.cl
parent15832f03f8b23996313e16b9cbfacb180dec56ba (diff)
Created AutoArtGPU
Diffstat (limited to 'AutoImagesGPU.cl')
-rw-r--r--AutoImagesGPU.cl33
1 files changed, 33 insertions, 0 deletions
diff --git a/AutoImagesGPU.cl b/AutoImagesGPU.cl
new file mode 100644
index 0000000..b8c10db
--- /dev/null
+++ b/AutoImagesGPU.cl
@@ -0,0 +1,33 @@
+
+__kernel void AutoImage(__global float *output)
+{
+
+ unsigned int id;
+ int width;
+ int xInt;
+ int yInt;
+ float x;
+ float y;
+ int channel;
+
+ id = get_global_id(0);
+ width = <WIDTH>;
+
+ xInt = (id/3) % width;
+ yInt = (id/3) / width;
+
+ x = (float)xInt;
+ y = (float)yInt;
+
+
+
+ channel = id % 3;
+
+ if (channel == 0)
+ output[id] = <RFUNCTION>;
+ else if (channel == 1)
+ output[id] = <GFUNCTION>;
+ else
+ output[id] = <BFUNCTION>;
+
+}