Following up on #188 / #195: a similar identifier-ambiguity pattern appears in docs/auto-diff-tutorial-2.md and warrants its own fix, since the right shape is different from the empty-struct stubs we used in coming-from-glsl.md.
What's ambiguous
NFloat is used pervasively as a scalar type — for example:
NFloat* weights;
NFloat learningRate;
…but is never declared, defined, or explained. A reader can plausibly mistake it for a built-in scalar type alongside float / half. (It looks like a user-defined typedef/alias for half or similar, given the surrounding context about f16 atomics.)
InterlockedAddF16Emulated(...) shows up the same way — used as if it were an HLSL intrinsic, but it's a user-defined helper. The naming pattern (InterlockedAdd*) makes it especially easy to mistake for a built-in.
Why a separate PR
The fix here probably isn't an empty struct stub — NFloat is a typedef-like alias and the natural fix is either a one-line typedef half NFloat; (or whatever the intended underlying type is) near the top of the tutorial, plus a brief sentence explaining what it represents. InterlockedAddF16Emulated likely needs a short signature stub or a sentence noting it's a helper the reader is expected to provide. Whoever picks this up should confirm the intended underlying type with the tutorial author before stubbing.
Found by
Audit performed during review of #195 (coming-from-glsl.md user-defined identifier sweep).
Following up on #188 / #195: a similar identifier-ambiguity pattern appears in
docs/auto-diff-tutorial-2.mdand warrants its own fix, since the right shape is different from the empty-struct stubs we used incoming-from-glsl.md.What's ambiguous
NFloatis used pervasively as a scalar type — for example:…but is never declared, defined, or explained. A reader can plausibly mistake it for a built-in scalar type alongside
float/half. (It looks like a user-defined typedef/alias forhalfor similar, given the surrounding context about f16 atomics.)InterlockedAddF16Emulated(...)shows up the same way — used as if it were an HLSL intrinsic, but it's a user-defined helper. The naming pattern (InterlockedAdd*) makes it especially easy to mistake for a built-in.Why a separate PR
The fix here probably isn't an empty struct stub —
NFloatis a typedef-like alias and the natural fix is either a one-linetypedef half NFloat;(or whatever the intended underlying type is) near the top of the tutorial, plus a brief sentence explaining what it represents.InterlockedAddF16Emulatedlikely needs a short signature stub or a sentence noting it's a helper the reader is expected to provide. Whoever picks this up should confirm the intended underlying type with the tutorial author before stubbing.Found by
Audit performed during review of #195 (
coming-from-glsl.mduser-defined identifier sweep).