General-purpose computing on graphics processing units: Difference between revisions

Content deleted Content added
m Stream Processing: changed kernel link to Kernel (computer science)
Bluemoose (talk | contribs)
AWB assisted clean up + typo fix
Line 1:
'''General-Purpose Computing on Graphics Processing Units''' (GPGPU, also referred to as GPGP and to a lesser extent GP^2) is a recent trend in [[computer science]] that uses the [[Graphics_processing_unitGraphics processing unit|Graphics Processing Unit]] to perform the computations rather than the [[Central processing unit|CPU]]. The addition of programmable stages and higher precision arithmetic to the GPU [[rendering pipeline]] have allowed [[software developer]]s to use the GPU for non graphics related applications. Because of the extremely parallel nature of the graphics pipeline the GPU is especially useful for programs that can be casted as [[stream processing]] problems.
 
==GPU Improvements==
Line 5:
 
===Programmability===
Programmable [[vertex]] and fragment [[shaders]] were added to the graphics pipeline to enable game programmers to generate even more realistic effects. Vertex shaders allow the programmer to alter per-vertex attributes, such as position, color, texture coordinates, and normal vector. Fragment shaders are used to calculate the color of a fragment, or pre-pixel. Programmable fragment shaders allow the programmer to substitute, for example, a lighting model other than those provided by default by the graphics card, typically simple [[Gouraud shading]]. Shaders have enabled graphics programmers to create lens effects, [[displacement mapping]], and [[depth of field]].
 
===Data Types===
Line 21:
While 64 bit floating point values (double precision float) are commonly available on CPUs, these are not currently available on GPUs. Some applications require at least double precision floating point values and thus cannot currently be ported to GPUs. There have been efforts to emulate double precision floating point values on GPUs{{ref|doublePrecisionOnGPU}}.
 
[[NVIDIA_CorporationNVIDIA Corporation|NVIDIA]] GPUs currently support 32 bit values through the entire pipeline. [[ATI_TechnologiesATI Technologies|ATI]] cards currently support 24 bit values throughout the pipeline. The implementations of floating point on GPUs are generally not [[IEEE_floatingIEEE floating-point_standardpoint standard|IEEE]] compliant, and generally do not match across vendors. This has implications for correctness which are considered important to some scientific applications.
 
Operations on the GPU operate in a vectorized fashion: a single operation can be performed on up to four values at once. For instance, if one color <R1, G1, B1> is to be modulated by another color <R2, G2, B2>, the GPU can produce the resulting color <R1*R2, G1*G2, B1*B2> in a single operation. This functionality is useful in graphics because almost everything basic data type is a vector (either 2, 3, or 4 dimensional). Examples include vertices, colors, normal vectors, and texture coordinates. Many other applications can put this to good use, and because of this vector instructions ([[SIMD]]) have already been added to CPUs.
Line 62:
In regular programs it is possible to control the flow of the program using if-then-else statements and various forms of loops. Such flow control structures have only recently been added to GPUs. Conditional writes could be accomplished using a series of simpler instructions, but looping and conditional branching were not possible.
 
Recent GPUs allow branching, but usually with a performance penalty. Branching should generally be avoided in inner loops, whether in CPU or GPU code, and various techniques, such as static branch resultion, pre-computation, and Z-cull{{ref|survey}} can be used to acheiveachieve branching when hardware support does not exist.
 
===GPU Techniques===
Line 93:
 
==Applications==
 
The following are some of the non-graphics areas where GPUs have been used for general purpose computing:
*Physically based simulation - [[Game of life]], Cloth simulation, Incompressible fluid flow by solution of [[Navier-Stokes equations]]
*[[Segmentation (image processing)|Segmentation]] - 2D and 3D
*[[Level_setLevel set|Level-set]] methods
*[[Computed_tomographyComputed tomography|CT]] reconstruction
*[[Fast_Fourier_transformFast Fourier transform|Fast Fourier Transform]]
*[[Tone_mappingTone mapping|Tone mapping]]
*Sound Effects Processing
*Image/Video Processing
*[[Raytracing]]
*[[Global_illuminationGlobal illumination|Global Illumination]] - [[Photon_mappingPhoton mapping|Photon Mapping]], [[Radiosity]], [[Subsurface_scatteringSubsurface scattering|Subsurface Scattering]]
*Geometric Computing - [[Constructive_solid_geometryConstructive solid geometry|Constructive Solid Geometry (CSG)]], Distance Fields, [[Collision_detectionCollision detection|Collision Detection]], Transparency Computation, Shadow Generation
*[[Neural Networks]]
*[[Database]] operations
Line 115 ⟶ 114:
#{{note|survey}} [http://graphics.idav.ucdavis.edu/publications/print_pub?pub_id=844 Survey paper (Eurographics STAR, August 2005)]: John D. Owens, David Luebke, Naga Govindaraju, Mark Harris, Jens Krüger, Aaron E. Lefohn, and Tim Purcell. "A Survey of General-Purpose Computation on Graphics Hardware''. Eurographics 2005, State of the Art Reports, August 2005, pp. 21-51.
 
==See Alsoalso==
*[[Graphics_processing_unitGraphics processing unit|Graphics Processing Unit]]
*[[Stream_processorStream processor|Stream Processor]]
*[[Shader]]
*[[NVIDIA_CorporationNVIDIA Corporation|NVIDIA]]
*[[ATI_TechnologiesATI Technologies|ATI]]
 
==External links==
Line 131 ⟶ 130:
*[http://apcmag.com/apc/v3.nsf/0/5F125BA4653309A3CA25705A0005AD27 Hijacking the GPU] ([http://www.apcmag.com APC Magazine] article on GPGPU computing)
 
[[Category:Computational science]]
 
[[Category:Computer_graphicsComputer graphics]]
 
[[Category:Microprocessors|*GPGPU]]
[[Category:Computer_graphics]]
[[Category:Computational_science]]