function
fma
fma(a: Int, b: Int, c: Int) -> Int
Performs fma
(fused multiply-add) on the inputs.
The result is (a * b) + c
.
Args:
- a (
Int
): The first input. - b (
Int
): The second input. - c (
Int
): The third input.
Returns:
(a * b) + c
.
fma[type: DType, simd_width: Int](a: SIMD[type, simd_width], b: SIMD[type, simd_width], c: SIMD[type, simd_width]) -> SIMD[$0, $1]
Performs elementwise fma
(fused multiply-add) on the inputs.
Each element in the result SIMD vector is , where , and are elements at index in a, b, and c respectively.
Parameters:
- type (
DType
): Thedtype
of the input SIMD vector. - simd_width (
Int
): The width of the input and output SIMD vector.
Args:
- a (
SIMD[type, simd_width]
): The first vector of inputs. - b (
SIMD[type, simd_width]
): The second vector of inputs. - c (
SIMD[type, simd_width]
): The third vector of inputs.
Returns:
Elementwise fma
of a, b and c.