The CPU has a few (1 to 8 typically) processor cores that can each do their own thing. They are designed to do general tasks and lots of different operations, a lot of their time will be spent on the logic of working out what needs to be done rather than doing maths. They have all sorts of special tricks to speed things up like on the fly they can change the order of the operations in the code.
The GPU has lots of cores (hundreds or thousands) that all run the same code on different sections of the same big block of data. They are designed to tasks that are mathematically complicated and require lots of calculation and memory access but far less control logic.
It’s also worth mentioning DSPs (Digital Signal Processors), they have been around for far longer than GPUs and are somewhere in between GPUs and CPUs. They are designed like a GPU to do maths heavy tasks with lots of memory access and minimal control logic and other IO. The difference is that like a CPU they only have a few independent cores rather than lots of grouped ones sharing the same memory.
They can all be made to do the same job, is purely a question of how well they can do it. A CPU is a generalist device, a GPU is a highly optimised device that gains performance in one type of task at the cost of performance at others.
Latest Answers