Sunday, January 10, 2010

GPU update

A few updates in the GPU world for the last month:
Tony Albrecht from Sony released his slides on Pitfalls of Object Oriented Programming, which describes how to write optimal C++ code. (I'm a strong believer in C++ for all problems). Tony demonstrates how to convert 'typical' C++ code for managing a scene graph into optimal code getting a 6x speedup from using a custom allocator to ensure linear SOA data, removing conditionals (doing more calculations since compute is faster than branch), flattening the scene hierarchy, and prefetching data. It's a great read! (a bit light on some details though!)
Finally, this excellent video of a DirectCompute fluid simulation was released by Jan, you can get the fluid source code from his website.

2 comments:

Simon Wittber said...

"I'm a strong believer in C++ for all problems".

You're joking right? C is obviously the one true language! C++ is just syntactic sugar.

:-)

Adrian said...

Yeah, OK, so that was a bit of an overstatement :). C++ is syntactic sugar at no extra price is the key point. (I find myself talking to more people on the C vs C++ debate side rather than C++ vs some high level language side..)