Files
Jungfraujoch/image_analysis/image_preprocessing
leonarski_fandClaude Opus 5.5 573a67f893 CPU preprocessing: pixel classification in a loop that vectorises, output unchanged
ImagePreprocessorCPU::AnalyzeBlock tested each pixel with a chain of branches and kept its extremes in
64-bit compares, so it ran scalar (11-14% of the samples on myoglobin and YAG --no-gpu). Each pixel is
now classified without a branch; the extremes are taken over keys that order as the values do (a
signed type's sign bit flipped), with a pixel that does not count masked to the key no maximum or
minimum moves on; and runs of whole mask words with no pixel masked - nearly all of a detector - take
a loop of their own that GCC vectorises (AVX2, all six pixel types). The counts are integers and the
extremes exact, so the statistics and the buffer are those of the pixel-by-pixel tests in any order:
checked against the old function on random blocks of every pixel type, mask density and block split.

YAG --no-gpu: p.hkl and MTZ data identical; user instructions -9%, cycles about even at load 14-33
(the loop is bound by writing the frame-sized buffer when 32 threads share the memory bus).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:52:15 +02:00
..
2026-08-25 08:21:39 +02:00
2026-04-25 19:59:21 +02:00
2026-09-10 13:51:16 +02:00
2026-09-29 15:57:32 +02:00