Skip to content

Latest commit

 

History

History
110 lines (66 loc) · 7.45 KB

File metadata and controls

110 lines (66 loc) · 7.45 KB
layout stdlib-reference

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 {#decl-N}

R : int {#decl-R}

C : int {#decl-C}

Parameters

value : half {#decl-value}

value : vector<half, N> {#decl-value}

value : matrix<half, R, C> {#decl-value}

value : uint16_t {#decl-value}

value : vector<uint16_t, N> {#decl-value}

value : matrix<uint16_t, R, C> {#decl-value}

value : int16_t {#decl-value}

value : vector<int16_t, N> {#decl-value}

value : matrix<int16_t, R, C> {#decl-value}

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.