Easiest way to use FMA instruction
kinke
kinke at gmx.net
Fri Jan 10 12:09:40 UTC 2020
On Friday, 10 January 2020 at 00:02:52 UTC, Johan wrote:
> For LDC:
> [...]
Simpler variant:
```
import ldc.intrinsics;
...
const result = llvm_fma(a, b, c);
```
This LLVM intrinsic is also used in LDC's Phobos for
std.math.fma(); unfortunately, upstream Phobos just has a
`real`-version, so the float/double versions aren't enabled yet:
https://github.com/ldc-developers/phobos/blob/26d14c1a292267a32ce64fa7f219acc3d3cca274/std/math.d#L8370-L8376
More information about the Digitalmars-d-learn
mailing list