Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Advice for a TBB beginner

jonathan_beck
Beginner
109 Views
Hi, I am a student at DigiPen.edu and I want to use multi-threading in a game I am making. Typically the game loop will run 30-60 times a second, and I want to be able to have different parts of the code (AI/Physics/Assets) run on threads and then synch up each loop.

Should I use OpenCL?

Can anyone suggest advice on how to do this? Useful tutorials or docs to read?
Also I am wondering does TBB work with AMD processors?
Thanks!
Jonathan
0 Kudos
2 Replies
ARCH_R_Intel
Employee
109 Views
I don't have any experience with OpenCL. I was the original architect for TBB (Alexey Kukanov is the current architect), so I'm a bit biased towards TBB. Yes, TBB works with AMD processors.

I have written a game that uses TBB and does about 30-75 frames/sec depending on the hardware. The sources can be downloaded from http://seismic-duck.svn.sourceforge.net/viewvc/seismic-duck/. Download the tarball to get the whole set of sources.The sources include both TBB and Cilk Plus implementations undef #ifdefs. TBB is the default implementation unless you compile it with the Intel >=12.0 compiler. The game has two physics engines that run concurrently with a seismogram renderer. Furthermore one of the physics engines (wavefield modeler and renderer) is parallelized too. There are some old blogs, starting with http://software.intel.com/en-us/blogs/2010/04/21/parallelism-patterns-in-seismic-duck-part-1-backgro... on how the wavefield calculations were parallelized, which is perhaps idiosyncratic to wavefield modelers, but might serve as general inspiration.

The binaries and installer are available at http://home.comcast.net/~arch.robison/seismic_duck.html .
jonathan_beck
Beginner
109 Views
Awesome!!!
Thank you greatly.
Reply