← Back to Pull requests

Stop pushing and popping names in the prologue that no CCCL header spells #12806

Closed
unknown closed this pull request without merging on Nov 25, 2026 15:06 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 09:19 UTC
Author

Description

A macro can only break code that spells its name. No libcu++ or cudax header spells these names between <cuda/std/__cccl/prologue.h> and <cuda/std/__cccl/epilogue.h>, so this PR stops pushing and popping them around every header to keep the prologue cheap:

the __declspec modifiers appdomain, code_seg, dllexport, hybrid_patchable, jitintrinsic, naked, nothrow, novtable, no_sanitize_address, process, property, restrict, safebuffers, selectany, spectre, and uuid
the [[msvc::...]] attributes flatten, forceinline, forceinline_calls, noinline_calls, and no_tls_guard

  • __callback, which <sal.h> defines
  • dllexport is only spelled by _CCCL_VISIBILITY_EXPORT, which only the C parallel library uses, outside of any prologue. The other names only appear in comments and string literals. Only min and max remain, because <windows.h> defines them and the headers call functions like numeric_limits<T>::max().

    To double check, I defined each of the dropped names as a marker macro and preprocessed every public libcu++ and cudax header for host and device with nvcc 13.4. No marker ends up on a line of a CCCL header, while a control name like __stream shows up in 75 of them.

    The prologue, the epilogue, and prologue_epilogue.compile.pass.cpp are regenerated with libcudacxx/codegen/generate_prologue_epilogue.py.

    Checklist


  • New or existing tests cover these changes.

  • The documentation is up to date with these changes.
  • Diff: 190 lines (+142 / -48) across 2 files Reviewer: Jacobfaib Review duration: 347m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 190 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.314
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12806"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.9% (MEDIUM) · Higher = larger blast radius
    35.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.2% · Safe to merge
    14.2%
    Repository