FP64_GUARD_NAME
On this page

FP64_GUARD_NAME

Constant in Emulated 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'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

const FP64_GUARD_NAME: "_fp64"

Description

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.

See also

Source

src/core/fp64/df64-lib.ts, line 133, at commit 26de7be8

Edit this page Report a problem