GPU Computing and Graphics Processing Units: A Comprehensive Guide

GPU Computing

GPU computing is the use of a GPU (graphics processing unit) together with a CPU to accelerate general-purpose scientific and engineering applications. Pioneered five years ago by NVIDIA, GPU computing has quickly become an industry standard. GPU computing offers unprecedented application performance by offloading compute-intensive portions of the application to the GPU, while the remainder of the code still runs on the CPU. From a user’s perspective, applications simply run significantly faster.K4OMi0rCXlAAAAAElFTkSuQmCC CPU + GPU is a powerful combination because CPUs consist of a few cores optimized for serial processing, while GPUs consist of thousands of smaller, more efficient cores designed for parallel performance. Serial portions of the code run on the CPU while parallel portions run on the GPU.

Features

  • Highest level performance and the smoothest experience possible from the moment you start playing.
  • Enables developers to add amazing graphics effects.
  • Dedicated ray tracing hardware enables fast real-time ray tracing with physically accurate shadows, reflection, refractions, and global elimination.
  • Provides variable rate shading and faster frame rates.

Algorithm: Create Segment

  1. Check whether any segment is open; if so display error message: ‘Segment is still open’ and go to step 9.
  2. Read the name of the new segment.
  3. Check whether the new segment name is valid; if not display error message: ‘Not a valid segment name’ and go to step 9.
  4. Check whether the new segment name is already existing in the same-name list; if so display error message: ‘Segment name already exists’ and go to step 9.
  5. Initialize the start of the segment at the next free storage area in the display file.
  6. Initialize the size of this segment equal to zero.
  7. Initialize all attributes of the segment to their default values.
  8. Indicate that the new segment is now open.
  9. Stop.

Integer Core Unit

The core unit is the administrative center of the processor. The core unit fetches both integer and floating-point instructions. It contains the integer register file and executes load, store, integer, bit, and control-transfer operations. Its pipelined organization with extensive bypassing and scoreboarding maximizes performance.

Floating-Point Unit

The floating-point unit contains the floating-point register file. This file can be accessed as 8 x 128-bit registers, 16 x 64-bit registers, or 32 x 32-bit registers. Three additional registers (KR KI, and T) hold intermediate floating-point results. The floating-point unit contains both the floating-point adder and the floating-point multiplier. Both units support 64 and 32-bit floating-point values in IEEE Standard 754 format.

Graphics Unit

The graphics unit has 64-bit integer logic that supports 3-D graphics drawing algorithms. This unit can operate in parallel with the core unit. It contains the special-purpose MERGE register and performs additions on integers stored in the floating-point register file.

Memory Management Unit

The on-chip MMU of 1860 microprocessors performs the translation of addresses from the linear logical address space to the linear physical address for both data and instruction access.

Caches

In addition to the page translation caches (TLBs), the i860 microprocessor contains separate on-chip caches for data and instructions.

Algorithm: Rename Segment

  1. Check whether both old and new segment names are valid; if not, display error message ‘Not valid segment names’ and go to step 6.
  2. Check whether any of the two segments are open. If open, display error message ‘Segments still open’ and go to step 6.
  3. Check whether the new name we are going to give to the old segment is not already existing in the display file. If yes, display error message ‘Segment already exists’ and go to step 6.
  4. Copy the old segment table entry into the new position.
  5. Delete the old segment.
  6. Stop.

Gauraud Shading

This model is also known as the intensity of interpolation method because of its characteristics working procedure. Intensity computation of the surface is done as follows: i) The average unit normal is calculated at every vertex. ii) The illumination model is applied at every vertex to decide the intensity of the vertex. iii) Perform linear interpolation between two vertices to obtain the normal vertex at the shared vertex by averaging the normal of each vector sharing the vertex. Advantages: i) Can be combined with a hidden surface removal algorithm to render the visible surface of the polygon along the scan line. ii) Eliminates intensity discontinuity at the edge. Disadvantages: i) Creates mach band effects. ii) Surfaces with sharp intensity drop cannot be rendered properly.

Phong Shading

This model is also known as the normal vector interpolation shading. This algorithm interpolates the normal vector rather than intensity and applies the illumination model at the interpolated normal vector at each pixel. Advantages: i) Highlights are displayed more realistically. ii) Provides more accurate shading. Disadvantages: i) Needs more calculation. ii) Computationally expensive.

Halftone Shading

Halftone shading is a technique used to create the illusion of continuous-tone images using a limited number of discrete dots or tones. One commonly used algorithm is the error diffusion algorithm. It involves converting the image to grayscale, initializing an output image, and then iterating over each pixel. The algorithm calculates the error between the original grayscale value and the closest available shade, distributes the error to neighboring pixels, and updates the pixel value based on the error diffusion. This process is repeated for all pixels in the image, resulting in a halftone image with varying intensities or colors. Other variations and algorithms exist, such as dithering. Halftoning is used to reproduce photographs for newspapers and magazines. This process is called Halftoning, and the reproduced image is called Halftone.

Interpolation Algorithm

If the curve passes through the control points, it is called interpolation. Interpolation curves are used in animation and specifying camera motion. It is also used in digitizing the coordinates. If the curve does not pass through the control points and approximates the shape, it is called approximation or extrapolation. Such curves are used to estimate the shape of the object surface.

Approximation Algorithm

If the curve does not pass through the control points and approximates the shape, it is called approximation or extrapolation. Such curves are used to estimate the shape of the object surface.

Parallel Projection

It is achieved by assigning parallel rays from the object vertices and projecting the object on the view plane. All projection vectors are parallel to each other. Types Of parallel projection: i) Orthographic projection: All the projectors are parallel to each other and perpendicular to the view plane, it is called orthographic parallel projection. ii) Multiview projection: the plane of projection is parallel to the surface of the object. iii) Axonometric projection: the axonometric orthographic projection can display more than one face of an object. a) Diametric: Two principal axes are foreshortened equally. b) Trimetric: All three principal axes are foreshortened unequally. c) Isometric: All three principal axes are foreshortened equally. iv) Oblique projection: if projectors are parallel to each other but are not perpendicular to the view plane, it is called oblique parallel projection.