cleanup: drop using-namespace-std from public headers, enable BigInteger moves, complete tuner emitter#124
Merged
Merged
Conversation
…plete tuner emitter - Remove `using namespace std;` from all 17 public headers and qualify std names explicitly. The root header injected the entire std namespace into every consumer translation unit — a real interop hazard for any downstream code with its own `vector`/`min`/`copy` and a known source of ambiguous-overload breakage. App/test .cpp files keep their own local using-directives. - BigInteger: rule of five, all defaulted. The user-declared copy ctor/dtor/copy-assign (identical to the compiler-generated ones) suppressed the implicit move operations, so std::move(BigInteger) deep-copied the limb vector everywhere — including the q/r moves in the division paths. Verified by data-pointer-transfer probe. - dispatch_tuner --emit-header now carries the 21 post-2026-06 division band macros (NEWTON_RATIO20/RATIO2/RATIO35/MID/BALANCED, QSIZED_MAIN/ SMALL, BZ_RECURSION, CYCLIC_NTT) so a regenerated platform profile keeps the complete band set instead of silently dropping the new bands. They pass through the build's values and are marked not-auto- tuned; division_floor_probe remains the manual sweep tool. - Normalize the last 3 CRLF files (Shift.h, Builder.h, Constants.h); the repo is now uniformly LF. (Several headers in this diff show as full-file rewrites for the same reason.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes audit recommendation (c) — final piece of the audit follow-up series (#121 tests, #122 squaring, #123 dedups):
using namespace std;removed from all 17 public headers, std names qualified explicitly. The root header injected std into every consumer TU at global scope — interop hazard, classic source of ambiguous overloads. App/test.cppfiles keep their own local using-directives.BigIntegerrule of five, all defaulted. The hand-written copy ctor/dtor/copy-assign (byte-identical to the compiler-generated ones) suppressed implicit moves, sostd::move(BigInteger)deep-copied the limb vector — including the q/r moves in division paths. Verified by data-pointer-transfer probe.dispatch_tuner --emit-headercompleted: now emits the 21 post-2026-06 division band macros (RATIO20/RATIO2/RATIO35/MID/BALANCED, QSIZED_MAIN/SMALL, BZ_RECURSION, CYCLIC_NTT) so regenerated platform profiles keep the full band set. Pass-through values, explicitly commented as not-auto-tuned (division_floor_proberemains the manual sweep tool).git diff -wis the readable view.)Test plan
mult_correctness+div_correctnessfull matricesdivperf_simpleunchangedgrep -r "using namespace std" include/→ 0🤖 Generated with Claude Code