FP64_GUARD_NAME
상수, f64 에뮬레이션 분류
The fixed name ('_fp64') of the guard texture binding that fp64Lower adds to every module whose lowered code calls a guarded df64 helper.
import { FP64_GUARD_NAME } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
const FP64_GUARD_NAME: "_fp64"설명
A module whose only f64 work is
comparisons, widening and narrowing, negation, or scaling by a power-of-two literal calls
none, and gets no binding. The binding is a 1×1 texture_2d<f32> whose
single texel reads exactly 1.0; the emulated arithmetic multiplies its error terms by
that texel so a fast-math compiler cannot fold them away. See fp64Guard for
why it is a texture.
Use this constant to recognise the binding without hardcoding the string: check
whether a module already declares it (bindings.find(b => b.name === FP64_GUARD_NAME)),
or pick the matching binding out of reflect to know which resource the host must
supply the 1×1 texture for.
함께 보기
소스
src/core/fp64/df64-lib.ts, 133행, 커밋 c66579bf 기준