Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is floating-point operation? Why does the floating-point operation of graphics card always seem to be better than CPU?
What is floating-point operation? Why does the floating-point operation of graphics card always seem to be better than CPU?
Floating-point operations can be considered as operations with decimal points, as opposed to integer operations in computers (that is, fixed-point operations). In the real world, data cannot be just integers, but decimals. However, because the computer is a digital structure, it is difficult to perform decimal operation (it will be much better if it is an analog circuit computer). Therefore, in order to calculate decimals, the concept of floating point is introduced into computer standards, and decimals are expressed by a specific coding format (no decimal point). The concrete representation method can be found in IEEE754 standard, which is the general standard of floating-point operation data organization format at present.

As for the computing power of graphics card is stronger than that of CPU, in fact, in terms of simple data computing power, the computing power of GPU is higher than that of CPU, regardless of floating point or fixed point, which is caused by the different design structures of the two.

Generally speaking, most of the program processing that CPU is responsible for is linear, with fewer threads and high correlation between program instructions. In order to improve the performance, the CPU will be designed as an out-of-order processing structure, and because of the low concurrency of the program, there are not many processing units in the CPU. At present, the maximum instruction issue throughput of intel's CORE2 processor is only four, and the floating-point and integer arithmetic units are only single digits. On the other hand, the correlation of image operations processed by GPU is low. Generally, GPUs are designed in parallel processing mode, and there are many data operation units. At present, the maximum number of GPU units in nvidia is 240, and that in AMD is 800. So if simply superimposed, the computing power of GPU will greatly exceed that of CPU, but the application scope of the two is different. If you use GPU to process CPU programs, the efficiency will be greatly reduced.