Emulated f64

Emulated f64

10 members

Double precision on targets that have none, carried in pairs of f32 lanes.

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

FP64_GUARD_NAME Constant
The fixed name ('_fp64') of the guard texture binding that fp64Lower adds to every module whose lowered code calls a guarded df64 helper.
Fp64Flavor Type
Which arithmetic primitives back the emulated-double (df64) helper functions that fp64Lower injects.
Fp64FlavorSignals Interface
The device-identification signals recommendFp64Flavor and isAppleGpu read to pick the df64 flavour a device needs: 'integer' on Apple GPUs, where Metal runs underneath, and 'float' everywhere else.
fp64Guard Function
Pin the slot of the fp64 guard texture.
Fp64GuardHandle Interface
The value fp64Guard returns: a binding declaration for the _fp64 guard texture, pinned to the caller's chosen.
fp64Lower Function
Rewrite every f64 value in a module into its two-f32 emulation, so that no backend has to spell the type.
Fp64LowerOptions Interface
Options for fp64Lower.
isAppleGpu Function
True when any signal identifies an Apple GPU / Metal-backed context.
recommendFp64Flavor Function
Pick the df64 flavour a device needs for correct results, from whatever identifying signals a host has.
splitF64 Function
Split a JavaScript double into the high and low f32 pair an f64T value carries on the GPU.

Edit this page Report a problem