min¶
Description¶
Minimum.
Signature¶
/// Requires Capability Set 1: T min<T>( T x, T y) where T : __BuiltinIntegerType; /// Requires Capability Set 1: vector<T, N> min<T, int N>( vector<T, N> x, vector<T, N> y) where T : __BuiltinIntegerType; /// Requires Capability Set 1: matrix<T, N, M> min<T, int N, int M>( matrix<T, N, M> x, matrix<T, N, M> y) where T : __BuiltinIntegerType; /// Requires Capability Set 1: T min<T>( T x, T y) where T : __BuiltinFloatingPointType; /// Requires Capability Set 1: vector<T, N> min<T, int N>( vector<T, N> x, vector<T, N> y) where T : __BuiltinFloatingPointType; /// Requires Capability Set 1: matrix<T, N, M> min<T, int N, int M>( matrix<T, N, M> x, matrix<T, N, M> y) where T : __BuiltinFloatingPointType; /// Requires Capability Set 1: T min<T>( T x, T y) where T : IComparable; /// Requires Capability Set 2: CoopVec<T, N> min<T, int N>( CoopVec<T, N> x, CoopVec<T, N> y) where T : __BuiltinFloatingPointType; /// Requires Capability Set 3: CoopVec<T, N> min<T, int N>( CoopVec<T, N> x, CoopVec<T, N> y) where T : __BuiltinIntegerType;
Generic Parameters¶
T: __BuiltinIntegerType¶
N : int¶
M : int¶
T: __BuiltinFloatingPointType¶
T: IComparable¶
Parameters¶
x : T¶
The first value to compare.
y : T¶
The second value to compare.
x : vector<T, N>¶
The first value to compare.
y : vector<T, N>¶
The second value to compare.
x : matrix<T, N, M>¶
The first value to compare.
y : matrix<T, N, M>¶
The second value to compare.
x : CoopVec<T, N>¶
The first value to compare.
y : CoopVec<T, N>¶
The second value to compare.
Return value¶
The smaller of the two values, element-wise if vector typed.
Remarks¶
For HLSL, GLSL, and metal targets, this is implemented with the min() intrinsic. For SPIR-V, it is implemented with the UMin or SMin instruction, depending on the signedness of the type.
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.
wgsl¶
Available in all stages.
spirv¶
Available in all stages.
llvm¶
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.
Requires capability: optix_coopvec.
spirv¶
Available in all stages.
Requires capability: spvCooperativeVectorNV.
Capability Set 3¶
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.
Requires capability: spvCooperativeVectorNV.