I have created a very simple fractal generator using brook+, because i am stuck with hd 3870. However the results were surprising as 3870 turned out to be 5-20 times faster than my dual core cpu (intel 6400) depending the resolution settings etc. Note that 3870 used an unoptimized kernel and that the cpu used 2 threads.

You can download my program here: http://depositfiles.com/files/llys7tzdz

(If anyone wants to help me to optimize the kernel i would be gratefull as i am new to gpgpu)

In order to build it and use it, you will need glut32.dll on system32 folder, visual c++ ati stream sdk v1.4 of cource and some other opengl libraries installed in your microsoft sdk folder.

It supports real time panning and zooming even with 3870.

Use + and - for zooming, the arrows for panning and < and > to change the iterations.

If anyone wants to see the source or the executable let me know

You can use the code if you want, don't ask for permision

So is anybody intrested in running it on a 5850 or 5870 and tell me some results?

I am also posting some of the source

code to calculate the fractal: (similar to the sample provided by amd but the glut and opengl which show the fractal to the user make things far more interesting)

kernel void mandelbrot(float maxIterations, float scale, float offsetx, float offsety, float halfsize, out float mandelbrotStream<> )

{

float2 vPos = indexof(mandelbrotStream).xy;

float2 pointt = vPos;

float x, y, x2, y2;

float iteration;

pointt.x = (2.0f / scale) * ((pointt.x - halfsize) / halfsize) + offsetx;

pointt.y = (2.0f / scale) * ((pointt.y - halfsize) / halfsize) + offsety;

x = pointt.x;

y = pointt.y;

x2 = x*x;

y2 = y*y;

for(iteration = 0.0f; (x2+y2 < 4.0f) && (iteration < maxIterations); iteration += 1.0f)

{

y = 2.0f*(x*y) + pointt.y;

x = (x2 - y2) + pointt.x;

x2 = x*x;

y2 = y*y;

}

mandelbrotStream = iteration/maxIterations;

}

{

float mandelbrotStream< size, size >;

mandelbrot(maxIterations, scale, offsetx, offsety, (float)(size / 2), mandelbrotStream);

streamWrite(mandelbrotStream, mandelbrotArray);

}

code to display the fractal:

glDrawPixels(size, size, GL_BLUE, GL_FLOAT, mandelbrotArray);