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">매개변수
vReadonlyNode<'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) | 지원 |
|
| GLSL ES 3.00 (WebGL2) | 지원 |
|
| CPU 오라클 | 지원 | Evaluated in f64 by the oracle. |
함께 보기
소스
src/core/ir/node.ts, 1930행, 커밋 26de7be8 기준