summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/demos/fractal/Mandelbrot.cl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-29 14:20:39 +0100
committerMichael Bien <[email protected]>2010-01-29 14:20:39 +0100
commit58e06a15e821e9b7ca1bc31399b179deba7a4343 (patch)
tree46917d3c2a5c8a59156f9f74cc29e9edf9a7489f /src/com/mbien/opencl/demos/fractal/Mandelbrot.cl
parentda609ba8c21e607196daca60b7d994eb2cb6fe4c (diff)
Mandelbrot example uses now all available GPUs in parallel, parallelism level is modifiable at runtime.
Small modifications due to api changes.
Diffstat (limited to 'src/com/mbien/opencl/demos/fractal/Mandelbrot.cl')
-rw-r--r--src/com/mbien/opencl/demos/fractal/Mandelbrot.cl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/com/mbien/opencl/demos/fractal/Mandelbrot.cl b/src/com/mbien/opencl/demos/fractal/Mandelbrot.cl
index e6583f4..f4f39a1 100644
--- a/src/com/mbien/opencl/demos/fractal/Mandelbrot.cl
+++ b/src/com/mbien/opencl/demos/fractal/Mandelbrot.cl
@@ -7,14 +7,14 @@ kernel void mandelbrot(
global uint *output,
const int width, const int height,
const float x0, const float y0,
- const float x1, const float y1,
+ const float rangeX, const float rangeY,
global uint *colorMap, const int colorMapSize, const int maxIterations) {
unsigned int ix = get_global_id(0);
unsigned int iy = get_global_id(1);
- float r = x0 + ix * (x1-x0) / width;
- float i = y0 + iy * (y1-y0) / height;
+ float r = x0 + ix * rangeX / width;
+ float i = y0 + iy * rangeY / height;
float x = 0;
float y = 0;