--- layout: stdlib-reference --- # asfloat16 ## Description Reinterpret bits as a float16 (HLSL SM 6.2). ## Signature
half asfloat16(half value);

vector<half, N> asfloat16<int N>(vector<half, N> value);

matrix<half, R, C> asfloat16<int R, int C>(matrix<half, R, C> value);

half asfloat16(uint16_t value);

vector<half, N> asfloat16<int N>(vector<uint16_t, N> value);

matrix<half, R, C> asfloat16<int R, int C>(matrix<uint16_t, R, C> value);

half asfloat16(int16_t value);

vector<half, N> asfloat16<int N>(vector<int16_t, N> value);

matrix<half, R, C> asfloat16<int R, int C>(matrix<int16_t, R, C> value);

## Generic Parameters #### N : int #### R : int #### C : int ## Parameters #### value : half #### value : [vector](../types/vector/index.html)\ #### value : [matrix](../types/matrix/index.html)\ #### value : uint16\_t #### value : [vector](../types/vector/index.html)\ #### value : [matrix](../types/matrix/index.html)\ #### value : int16\_t #### value : [vector](../types/vector/index.html)\ #### value : [matrix](../types/matrix/index.html)\ ## Availability and Requirements 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.