Parallel Programming with NVIDIA CUDA Programmers have been
interested in leveraging the highly parallel processing power of
video cards to speed up applications that are not graphic in
nature for a long time. Here, I explain how to do this with the
CUDA API from NVIDIA. If your GPU is not from NVIDIA, you are
not out of luck, as the same can be achieved with other APIs,
such as the ATI-based Stream SDK or OpenCL. With GPGPU, general-
purpose applications are executed directly on the streaming
processors of video cards. Under the stream processing paradigm,
a data set is named a stream. You can think of it much like
“file streams” provided by an OS's pipe function. Streams can be
any isolated piece of data, such as a stream of business events
or a set of scientific data. Parallel operations are applied on
streams with operators, such as split, compute or merge. Figure
1 shows several streams of data and compute operators in
parallel. Stream processing has been used successfully for
general programming, includi