summaryrefslogtreecommitdiff
path: root/AutoImagesGPU.cl
diff options
context:
space:
mode:
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>;
+
+}