bitcastF32
이 페이지에서

bitcastF32()

함수, 내장 함수 분류

Reinterpret the bit pattern of a u32 as an f32, the inverse of bitcastU32.

import { bitcastF32 } from 'typeshade'

시그니처, 설명, 예제는 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

const bitcastF32: (v: ReadonlyNode<"u32">) => Node<"f32">

매개변수

v ReadonlyNode<'u32'>

반환값

Node<'f32'>

설명

Emitted as bitcast<f32>(x) on WGSL and uintBitsToFloat(x) on GLSL. An f32 to u32 to f32 round-trip is a fast-math optimization barrier, since the integer domain is not subject to float reassociation or contraction; optBarrier packages that.

대상별 지원

대상지원비고
WGSL (WebGPU) 지원

bitcast<f32>(v).

GLSL ES 3.00 (WebGL2) 지원

uintBitsToFloat(v).

CPU 오라클 지원

Evaluated in f64 by the oracle.

함께 보기

소스

src/core/ir/node.ts, 1930행, 커밋 26de7be8 기준

이 페이지 편집 문제 보고