asfloat16¶
Description¶
Reinterpret bits as a float16 (HLSL SM 6.2).
Signature¶
half asfloat16(half value); vector<half, N> asfloat16<N:int>(vector<half, N> value); matrix<half, R, C> asfloat16<R:int, C:int>(matrix<half, R, C> value); /// Requires Capability Set 1: half asfloat16(uint16_t value); /// Requires Capability Set 1: vector<half, N> asfloat16<N:int>(vector<uint16_t, N> value); matrix<half, R, C> asfloat16<R:int, C:int>(matrix<uint16_t, R, C> value); /// Requires Capability Set 2: half asfloat16(int16_t value); /// Requires Capability Set 2: vector<half, N> asfloat16<N:int>(vector<int16_t, N> value); /// Requires Capability Set 3: matrix<half, R, C> asfloat16<R:int, C:int>(matrix<int16_t, R, C> value);
Generic Parameters¶
N : int¶
R : int¶
C : int¶
Parameters¶
value : half¶
value : vector<half, N>¶
value : matrix<half, R, C>¶
value : uint16_t¶
value : vector<uint16_t, N>¶
value : matrix<uint16_t, R, C>¶
value : int16_t¶
value : vector<int16_t, N>¶
value : matrix<int16_t, R, C>¶
Availability and Requirements¶
Capability Set 1¶
Defined for the following targets:
hlsl¶
Available in all stages.
glsl¶
Available in all stages.
cuda¶
Available in all stages.
spirv¶
Available in all stages.
Capability Set 2¶
Defined for the following targets:
hlsl¶
Available in all stages.
cuda¶
Available in all stages.
metal¶
Available in all stages.
spirv¶
Available in all stages.
Capability Set 3¶
Defined for the following targets:
hlsl¶
Available in all stages.
cuda¶
Available in all stages.
spirv¶
Available in all stages.