3 ms·
Yes. There aren't to my knowledge any CPUs with special instructions for complex numbers, they're implemented as wrappers ontop of the standard stuff.
by problems 9y ago
Yes. There aren't to my knowledge any CPUs with special instructions for complex numbers, they're implemented as wrappers ontop of the standard stuff.
- goatlover 9y agoIf we're talking about CPUs, then structures and functions are just bundles of existing bit patterns and machine instructions. Reducing things to just their primitives ignores how useful abstractions are for humans. Not everyone thinks it's a good use of their time to reinvent classes & objects or closures with structures and function pointers. Thus why those abstractions are part of so many programming languages (to answer the expressed bafflement one level above my initial reply). Some C or assembly fans act like abstractions should end at that level, for some strange reason.
- problems 9y agoI didn't say anything about it not being a useful abstraction, just that it is essentially just an abstraction.
- deleted 9y ago[deleted]
- weinzierl 9y agoARM has special instructions for complex numbers[1]. Modern CPU architectures usually have vector instructions which should cover most common complex number operations as well. [1] Look for the instructions prefixed with FC = Floating-point Complex https://developer.arm.com/docs/dui0801/latest/a64-simd-vector-instructions https://developer.arm.com/docs/dui0801/latest/a64-simd-vecto...
- deleted 9y ago[deleted]
- humanrebar 9y ago> There aren't to my knowledge any CPUs with special instructions for complex numbers There are lots of processors out there besides CPUs. You could even design a new processor or program an FPGA to do complex math. Fast Fourier transforms deal with imaginary math, for example. You can do those in a number of ways, including on a CPU or GPU, but it's not unheard of for companies to use either custom hardware or programmable hardware to meet performance needs.
- gpderetta 9y agoIntel CPUs have specific vector instructions specifically meant to accelerate operations on complex numbers (ADDSUBPS for example).