DeterminismKind
이 페이지에서

DeterminismKind

타입, 도구 분류

Why an operation's result may differ by driver, in WGSL §15.7.4's own categories plus four of TypeShade's.

import type { DeterminismKind } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

type DeterminismKind =
'ulp' | 'absolute' | 'inherited' | 'unbounded' | 'filtered' | 'target' | 'emulated' | 'order';

설명

ulp and absolute are the spec’s numeric bounds (absolute also covers acos, asin and tanh, which the spec bounds by the worse of an absolute error and an inherited formula); inherited is an operation the spec defines by a formula the driver may reassociate or fuse, the matrix products included; unbounded is a derivative or determinant, where the spec asks only for a pragmatically useful result; filtered is a texture read whose footprint, filtering and level selection are implementation-defined, a gather included; target is an operation WGSL settles that the GLSL ES 3.00 spelling may answer differently on some input; emulated is an f64 operation, computed in f32 pairs whose error terms a driver may fold; order is a floating-point reduction of a kernel function’s loop, which every tier folds in Rule 7.2’s tree, so it has one answer on every tier but not the one the loop’s sequential reading gives.

소스

src/core/passes/determinism.ts, 67행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고