ReflectOptions
Interface in Reflection
Options for reflect.
import type { ReflectOptions } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
interface ReflectOptions { readonly fp64Flavor?: Fp64Flavor; readonly console?: 'cpu' | 'gpu';}Instance properties
fp64Flavoroptionalread onlyFp64FlavorThe f64 emulation flavour the emit will use, the same
Fp64Flavorthe backend is given. It decides whether the module binds the_fp64guard, a 1x1 texture the emulated-double helpers read so that a fast-math compiler cannot reassociate their arithmetic: the'float'helpers (the default) read it and the'integer'helpers do not. Pass the same value the emit will get; a host that builds a bind group from a reflection computed with a different flavour is describing a different program than the one it runs.consoleoptionalread only'cpu' | 'gpu'Where a
consolecall is recorded:'gpu'reports the_consolebuffer the WGSL then binds (Rule 6.11, surface §66), as_fp64is reported. Pass the same valuecompile()got. Defaults to'cpu', which adds no binding.
See also
Source
src/core/reflect.ts, line 728, at commit 26de7be8