![]() |
Mali OpenCL SDK v1.1.0
|
Go to the source code of this file.
Macros | |
#define | MAX_ITER 255 |
Functions | |
float4 | createStartX (int x) |
Create a float4 containing the x positions of x and the 3 adjacent pixels. | |
__kernel void | mandelbrot (__global uchar *restrict output, const int width, const int height) |
Mandelbrot kernel function. | |
#define MAX_ITER 255 |
Definition at line 16 of file mandelbrot.cl.
float4 createStartX | ( | int | x | ) |
Create a float4 containing the x positions of x and the 3 adjacent pixels.
[in] | x | First pixel position to use. |
Definition at line 23 of file mandelbrot.cl.
__kernel void mandelbrot | ( | __global uchar *restrict | output, |
const int | width, | ||
const int | height | ||
) |
Mandelbrot kernel function.
Evaluates whether a set of four adjacent pixels are part of the Mandelbrot set. The output is an array where each value represents how many iterations were required to be able to decide whether the point in imaginary space is part of the Mandelbrot set or not. A value of MAX_ITER represents a point that is part of the Mandelbrot set. All other values represent points that are not part of the Mandelbrot set. A value is in the Mandelbrot set if the results of the calculations remain bounded.
[out] | output | Output data buffer. Must be width * height * sizeof(cl_uchar) in size. |
[in] | width | Width of the data required. |
[in] | height | Height of the data required. |
Definition at line 41 of file mandelbrot.cl.