O'Reilly logo

C++ AMP by Kate Gregory, Ade Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. NBody Case Study

This chapter studies a particular example of C++ AMP in action in order to show the concepts that were introduced in the previous chapter and to look ahead to some concepts that will be discussed in the following chapters. The NBody example demonstrates one solution to the n-body problem: how to simulate a large number of stars moving under the influence of gravity. In order to calculate the motion of each star, its interaction with every other star must be calculated, so the amount of computation required scales as n2, where n

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required