Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mandelbrot for language benchmark game #12

Open
flip111 opened this issue Jan 21, 2020 · 3 comments
Open

Mandelbrot for language benchmark game #12

flip111 opened this issue Jan 21, 2020 · 3 comments

Comments

@flip111
Copy link

flip111 commented Jan 21, 2020

I saw there is already a mandelbrot implementation though that one seems to have some additional stuff to it like a GUI and keyboard controls.

It would be great to have just the mandelbrot as described here so there is something to compare to.

I'm not sure how the mandelbrot from the language benchmark game can be written out as a pretty bitmap. That would be useful too to showcase futhark to do something cool and to do it fast.

Are there any other futhark examples that can be compiled into a library (preferably just a single fut file) that can do something cool as a showcase?

@athas
Copy link
Member

athas commented Jan 22, 2020

Why is that useful? It's almost the same program as the one we have, only with a slightly different color function (but that isn't where the time is spent).

If you don't want the GUI, you can benchmark it simply with futhark bench --backend=opencl mandelbrot.fut.

If you want to compile it as a library, just do futhark opencl --library mandelbrot32.fut. The GUI stuff is implemented as an add-on in mandelbrot-gui.fut; most of the Futhark code just computes an image.

@flip111
Copy link
Author

flip111 commented Jan 22, 2020

I was just looking for a nice showcase of futhark. This was the main thing. Mandelbrot seemed like a good one because it gives some great visuals and there is also code written in other languages to compare it to. It then would help if the code produces the exact same picture.

Thanks for the compilation instructions for the library, i will try to build this library and then call it to generate a mandelbrot function.

What about mandelbrote64.fut? Is it faster or is it more precise?

@athas
Copy link
Member

athas commented Jan 22, 2020

It is more precise (uses double precision), but on most GPUs it will be significantly slower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants