TickerTape: Teaching Parallelism Concepts to Sophomores and Juniors Using Interactive Game Demos


It can be challenging to teach parallelism concepts that demonstrate effective programming algorithms and techniques in the college computer science (CS) curriculum. Faculty are in search of effective modules and examples to teach parallel programming to their students-- especially in undergraduate computer science courses where students are first getting started with multi-threading and data parallel programming. Game demo modules are an excellent way to teach parallelism concepts, as many CS students are already favorable towards games, and the interactive nature of games can make the material more engaging. Integrating existing game demos in the classroom is an efficient way to supplement courses where parallelism concepts are relevant. In addition, using industry-standard code profiling tools maximizes the learning impact and helps students understand and analyze the performance of their code and optimize for maximum benefits.

Intel's TickerTape is an "academic-ready" demo of a particle system aimed towards promoting data parallel programming to college sophomores and juniors. Particle systems are commonly used in games to improve visual fidelity and simulate effects such as sparks and explosions. The demo simulates leaves interacting with wind and falling to the ground under influence of gravity (see Figure 1). Onscreen controls allow the user to control the number of leaves in the demo, the number of threads used in the simulation and other environmental parameters to observe the effects of parallelized critical regions and algorithms in the application. Many of the computations involved in updating the leaf position and orientation are repetitive and are independent of other leaves. Thus, it is easy to parallelize these math-heavy physics calculations with parallel programming constructs and APIs such as OpenMP and Intel Threading Building Blocks.

TickerTape uses Streaming SIMD Extensions (SSE), DirectX10 and Intel Threading Building Blocks (Intel TBB) APIs. Intel Amplifier XE, a code profiling tool, was also used to identify hotspots in the application (see Figures 2 through 4).The source code accompanying the module includes Microsoft Visual Studio 2008 project files and presents three different implementations of the physics calculations: serial (single-threaded), parallel with OpenMP and parallel with Intel TBB (multi-threaded), each providing improved performance over the previous method due to parallel execution of the physics computations. The demo is designed for undergraduate students who have the basic understanding of C/C++ programming and are interested in knowing more about programming constructs and APIs for parallel programming on a multi-core processor.

To learn more about the original version of TickerTape and see the demo in action, visit: Visual Computing Developer Community

If you have questions about TickerTape or any of the demos listed below please respond directly on the corresponding demo webpage. Your support requests will be seen and responded to in a timely manner. You can also always feel free to send an email to gamedevinput@intel.com

Check out additional game demos from Intel:
Fireflies-- Scalable Ambient Effects (The sample can run in multithreaded as well as serial mode to better see the performance benefit of multithreading an ambient effect.)
Colony - A highly parallel crowd simulation technique (Tens of thousands of units are simulated using a novel ray-casting technique. This is achieved by utilizing Intel® Threading Building Blocks to distribute work across multiple threads and multiple frames and utilizing SIMD to ensure further instruction-level parallelism.)


Figure 1: Screenshot of the application
TickerTape.jpg


Figure 2: Profiling serial implementation of TickerTape with Intel Amplifier XE: Notice the hotspots in the functions consist of mostly serial work (red bars) which make up a majority of the time spent, with almost no parallel work being performed(bottom thread utilization view in green) 
AmplifierXE+Analysis+1.1.JPG


Figure 3: Profiling OpenMP implementation with Intel Amplifier XE: Some amount of parallel work being performed (orange and green regions at the top) and improved core utilization (bottom)
AmplifierXE+Analysis+1.2.JPG


Figure 4: Profiling tasking with TBB implementation: Most amount of parallel work being done in the hotspots (minimal red regions) and improved thread utilization (bottom)
AmplifierXE+Analysis+1.3.JPG

 

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.