fma
Description
Fused multiply-add.
Signature
T fma<T>( T a, T b, T c) where T : __BuiltinFloatingPointType; vector<T, N> fma<T, N:int>( vector<T, N> a, vector<T, N> b, vector<T, N> c) where T : __BuiltinFloatingPointType; matrix<T, N, M> fma<T, N:int, M:int>( matrix<T, N, M> a, matrix<T, N, M> b, matrix<T, N, M> c) where T : __BuiltinFloatingPointType;
Generic Parameters
T: __BuiltinFloatingPointType
N : int
M : int
Parameters
a : T
The first value to multiply.
b : T
The second value to multiply.
c : T
The value to add to the product of a and b.
a : vector<T, N>
The first value to multiply.
b : vector<T, N>
The second value to multiply.
c : vector<T, N>
The value to add to the product of a and b.
a : matrix<T, N, M>
The first value to multiply.
b : matrix<T, N, M>
The second value to multiply.
c : matrix<T, N, M>
The value to add to the product of a and b.
Return value
Availability and Requirements
Defined for the following targets:
hlsl
Available in all stages.
glsl
Available in all stages.
cpp
Available in all stages.
cuda
Available in all stages.
metal
Available in all stages.
wgsl
Available in all stages.
spirv
Available in all stages.