Computer Science, asked by bhukurt5108, 1 year ago

What type of calculations gpu can do faster than cpu?

Answers

Answered by manaswini12345
0
CPUs dedicate the majority of their core real-estate to scalar/superscalar operations, which means that they perform operations on one piece of data at a time (e.g. r1+r2=r3). This is efficient when the results of step one dictate the operations that you will perform in step two, but a missed opportunity when the same operation needs to be performed on many pieces of data.

GPUs, on the other hand, dedicate most of their core real-estate to a Single Instruction Multiple Data (SIMD) architecture, which means that they perform operations on arrays of vector data ([a0, a1, a2, a3, ...]+[b0, b1, b2, b3, ...]=[a0+b0, a1+b1, a2+b2, a3+b3, ...]. When sets of data need the same sequence of operations performed on them, they get scheduled in streams. GPUs contains hundreds (or thousands) of structures for processing performing SIMD operations, arranged in stream processors. This allows many pieces of data to be manipulated in parallel. Id est, hundreds or thousands of cryptographic or password operations can be performed on a GPU in the same time that it takes a CPU to perform a few dozen.

As a side-note, most CPUs do contain structures for performing single instructions on multiple pieces of data, through instruction set extensions, but there is generally only one of these structures within each core of  CPU. This means that a quad-core CPU will only have 4 vector units, while a graphics card can have 2048+ vector units.
Similar questions