PDA

View Full Version : dead simple Hello World type request



justcurious
02-16-2010, 03:01 PM
I posted this in the wrong section (technical questions). My request is a sample program (like Hello World) which does some kind of dead-simple Monte Carlo simulation in a highly parallel way; let's say it calculates the number of times a random integer from 0-99 will be 42. Obviously that should be 1/100, what I'm interested in is sample code showing this through a Monte Carlo method.

Obviously the example Im asking for is exactly as useful as a Hello World program, and I'm requesting it for exactly the same reason. Thank you for any help you might have, since I am just getting started and having so much trouble trying to go top-down from the specification. Thanks again.

dbs2
02-20-2010, 04:49 AM
Googling for "opencl hello world" returns a bunch of simple examples. The tricky part about what you want to do is generating the right set of random numbers. That's not trivial, but if you just build a very simple random number generator you can do it.