aboutsummaryrefslogtreecommitdiff
path: root/test.cl
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-02-12 21:12:55 +1300
committerDavid Phillips <david@sighup.nz>2017-02-12 21:12:58 +1300
commit08a1b94987bebacaf8c5d7c42f08c83e25daa6f6 (patch)
tree4a012ef6545c8989238d2e8e37efbb2f4cc0828b /test.cl
parent6605c05adf8775eddb1d4045b408895e0183f931 (diff)
downloadfractal-gen-opencl-08a1b94987bebacaf8c5d7c42f08c83e25daa6f6.tar.xz
Give test.cl a more meaningful name
Diffstat (limited to 'test.cl')
-rw-r--r--test.cl25
1 files changed, 0 insertions, 25 deletions
diff --git a/test.cl b/test.cl
deleted file mode 100644
index 2652108..0000000
--- a/test.cl
+++ /dev/null
@@ -1,25 +0,0 @@
-__kernel void fractal_gen(
- __global unsigned char *buffer,
- const unsigned int size,
- const unsigned int iterations)
-{
- unsigned int x = get_global_id(0);
- unsigned int y = get_global_id(1);
- unsigned int i = 0;
-
- float a = -2.5+(((float)x)/(float)size)*3.5;
- float b = -1.75+(((float)y)/(float)size)*3.5;
-
- float2 z = (0.0, 0.0);
-
- for (i = 0; i < iterations; i++) {
- // if abs(z) > 2
- if (z.x*z.x + z.y*z.y > 4)
- break;
-
- float oldx = z.x;
- z.x = z.x*z.x - z.y*z.y + a;
- z.y = 2*oldx*z.y + b;
- }
- buffer[(size*y)+x] = (i*255)/iterations;
-}