From df44edf9ee04be25c2e949127609b12e4f5e9e93 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 7 Oct 2026 16:01:03 +0200 Subject: [PATCH] rugnux: gather the scaffold's shared helpers into one rugnux_internal block Now that every helper used by a single phase has moved to that phase's file, the helpers left in Rugnux.cpp's alternating anonymous and rugnux_internal blocks fit in one of each. Definitions are reordered only; nothing else changes. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi --- rugnux/Rugnux.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/rugnux/Rugnux.cpp b/rugnux/Rugnux.cpp index c4a2c9b49..916cbfceb 100644 --- a/rugnux/Rugnux.cpp +++ b/rugnux/Rugnux.cpp @@ -129,6 +129,12 @@ RotationScaleWalk WalkRotationScale(double first_fit, return walk; } +namespace { + // Images the pre-scan reads when the beam-stop pre-pass is off and only the spot width is wanted; + // with it on, that pre-pass's image count is used and one sample serves both. + constexpr int BEAM_CENTER_PROJECTION_IMAGES = 60; +} + namespace rugnux_internal { // A CUDA out-of-memory, or a host allocation that failed, says nothing about the image that // happened to be in flight and everything about the machine - the next image will hit it too. @@ -145,9 +151,6 @@ namespace rugnux_internal { || jf->Category() == JFJochExceptionCategory::MemAllocFailed); } -} - -namespace rugnux_internal { // The longest cell axis assumed where no cell is known yet. It has to be LARGE: a long axis makes // the tolerance below small, and the ceiling is the larger of it and the flat bound above, so a // large default is the one that changes nothing. @@ -172,15 +175,6 @@ namespace rugnux_internal { / (experiment.GetPixelSize_mm() * a_max); } -} - -namespace { - // Images the pre-scan reads when the beam-stop pre-pass is off and only the spot width is wanted; - // with it on, that pre-pass's image count is used and one sample serves both. - constexpr int BEAM_CENTER_PROJECTION_IMAGES = 60; -} - -namespace rugnux_internal { // Pick up to requested_images ordinals spread evenly across [0, images_to_process) for the // first pass of two-pass rotation indexing. std::vector select_equally_spaced_image_ordinals(int images_to_process, int requested_images) {