Content deleted Content added
m →Flow control: Spelling mistake. |
m →GPGPU programming concepts: +links |
||
Line 28:
GPUs are designed specifically for graphics and thus are very restrictive in terms of operations and programming. Because of their nature GPUs are only effective at tackling problems that can be solved using [[Stream processing]] and the hardware can only be used in certain ways.
===[[Stream processing]]===
GPUs can only process independent vertices and fragments, but can process many of them in parallel. This is especially effective when the programmer wants to process many vertices or fragments in the same way. In this sense, GPUs are [[stream processing|stream processors]] - processors that can operate in parallel by running a single [[Kernel (computer science)|kernel]] on many records in a stream at once.
A stream is simply a set of records that require similar computation. Streams provide data parallelism. Kernels are the functions that are applied to each element in the stream. In the GPUs, vertices and fragments are the elements in streams and vertex and fragment shaders are the kernels to be run on them. Since GPUs process elements independently there is no way to have shared or static data. For each element we can only read from the input, perform operations on it, and write to the output. It is permissible to have multiple inputs, and with recent improvements in graphics cards, multiple outputs, but never a piece of memory that is both readable and writable.
|