mad
Description
Computes multiply-add.
Signature
/// Requires Capability Set 1: T mad<T>( T mvalue, T avalue, T bvalue) where T : __BuiltinFloatingPointType; /// Requires Capability Set 1: vector<T, N> mad<T, N:int>( vector<T, N> mvalue, vector<T, N> avalue, vector<T, N> bvalue) where T : __BuiltinFloatingPointType; /// Requires Capability Set 1: matrix<T, N, M> mad<T, N:int, M:int>( matrix<T, N, M> mvalue, matrix<T, N, M> avalue, matrix<T, N, M> bvalue) where T : __BuiltinFloatingPointType; /// Requires Capability Set 2: T mad<T>( T mvalue, T avalue, T bvalue) where T : __BuiltinIntegerType; /// Requires Capability Set 2: vector<T, N> mad<T, N:int>( vector<T, N> mvalue, vector<T, N> avalue, vector<T, N> bvalue) where T : __BuiltinIntegerType; /// Requires Capability Set 2: matrix<T, N, M> mad<T, N:int, M:int>( matrix<T, N, M> mvalue, matrix<T, N, M> avalue, matrix<T, N, M> bvalue) where T : __BuiltinIntegerType;
Generic Parameters
T: __BuiltinFloatingPointType
N : int
M : int
T: __BuiltinIntegerType
Parameters
mvalue : T
avalue : T
bvalue : T
mvalue : vector<T, N>
avalue : vector<T, N>
bvalue : vector<T, N>
mvalue : matrix<T, N, M>
avalue : matrix<T, N, M>
bvalue : matrix<T, N, M>
Availability and Requirements
Capability Set 1
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.
spirv
Available in all stages.
Capability Set 2
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.
spirv
Available in all stages.