You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix comments and docstrings that no longer match the code
Comments only; no behaviour change.
Stale claims corrected:
- ext/cuda/operators_finite_difference.jl: the launch-config comment said the
kernel "uses block and grid indices instead of computing cartesian indices
from a linear index" (it does the opposite now), that the block size is
`(n_face_levels, Ni, 1)` (it is `(n_face_levels, threads_dim_y, 1)`), and that
the path is used only when a block holds 32-256 threads (that guard is gone).
Rewrote to describe the current launch configuration, noted that masked spaces
are supported too, explained the `threads_dim_y` heuristic, and dropped the
dead commented-out `32 <= n_face_levels * Ni <= 256` line.
- Both files referred to a `us::UniversalSize` argument that does not exist. The
kernel reads the horizontal extents off the output layout's type parameters
via `vijh_params`; the "compile-time constant divisor" point still holds, so
it is now stated in terms of what the code actually does.
- ext/cuda/operators_fd_eager.jl: "A `SetBoundaryOperator` only ever outputs to
faces" is false since `return_space(::SetBoundaryOperator, space) = space` --
the conversion also puts one on a center output (DivergenceF2C +
SetDivergence) and on a face input (GradientF2C + SetValue). The reason for
gating `idx` on the compile-time staggering is unchanged and kept.
- src/MatrixFields/operator_matrices.jl: "the boundary row is empty (`rzero`)".
`rzero` returns a zero-filled row of the same bandwidth, not an empty row;
it is the multiply's band clipping that makes the wider row harmless.
- src/Operators/finitedifference.jl: six comments described inlined stencils as
belonging to "(deleted)" operators. `LeftBiasedC2F`/`RightBiasedC2F` are still
exported operators -- only their `stencil_interior` methods went away -- so
that wording was misleading; the 3rd-order variants really were removed, which
is now said explicitly.
Outdated signatures and documentation:
- All twelve docstring signatures in operators_fd_eager.jl were missing the
`hidx` argument added to `calc_level_val`/`get_op_row`/`project_row2_for_mul`,
or the `mask` argument added to `eager_copyto_stencil_kernel!`.
- `SetBoundaryOperator`'s docstring listed only `SetValue`, though it accepts
`SetGradient`, `SetCurl` and `SetDivergence` and projects the first two onto
the `Covariant3`/`Contravariant123` axes. All four are now documented with
their projection semantics, along with the space-preserving behaviour and the
fact that a side without a condition is left untouched. The four `@ref`
targets are all listed in docs/src/operators.md, so the docs build resolves
them.
Verified: docstring parses and renders, and CPU MatrixFields/operator_matrices.jl
(275+41) and finitedifference/unit_column.jl still pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLMKMmk7JezBvagh3AybPQ
0 commit comments