Chestnut by astromme

Chestnut uses the power of your graphics card to perform simulations and visualizations. Chestnut sits between C and Python with the conceptual simplicity of C's imperitive programming style but without the pitfalls of pointers and legacy syntax. Built on top CUDA, Chestnut can run on almost any modern system with a NVidia graphics card. Read on for a simple example to get you started.

Example

IntArray2d numbers[10, 5];

foreach number in numbers
  number = 100*random();
end

Int sum = reduce(numbers);

print(numbers);
print("Average = %s", reduced/numbers.length);
In this example a 2d array is created that is 10 items wide by 5 items high for a total of 50 items. We fill this array with random numbers by using a parallel context. Each number has its own private thread which are all executed in parallel. Finally, a built in parallel function is used to display the average of the numbers.

Contact

Andrew Stromme http://andrewstromme.com

Download

You can download the Chestnut sources in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/astromme/Chestnut