leonarski_fandClaude Opus 5.5 168a4e64a1 MolecularReplacement: prefetch the transform in the CPU rotation function, output unchanged
The CPU rotation function interpolates the molecular transform at points scattered over its grid, four
cache lines per point. Once the grid is far larger than the caches (835 MB for 4nwv: 16.9e9
interpolations over 17255 orientations) the loop waits on memory, at ~92 ns per interpolation per core
on an Apple M6. MolecularTransform::Prefetch() asks for the rows a point's corners lie on, 4
reflections ahead of the one being computed, through one portable helper (__builtin_prefetch under
GCC/Clang, nothing elsewhere). Same values, same order, so the output is bit-identical.

Only for a transform of 256 MB or more: a smaller one sits mostly in the caches, where the extra
address arithmetic only costs. In a standalone copy of the loop on the M6: 30% slower at 13-90 MB,
even at ~130-175 MB, 1.5x faster at 400 MB, 1.75-1.8x at 835 MB (prefetch distance 4 to 8 equally
good).

M6 Mac mini, 4nwv, alternating runs on a quiet machine, against the previous commit:
- rotation function 139.1/138.8 s -> 79.1/79.3/78.9 s
- wall 400.7/415.7 s -> 338.0/343.1/345.6 s
- --no-gpu: 450.4 s -> 385.4 s (rotation 140.3 -> 84.1 s)
- 9s02 (14k reflections, 13 MB transform, below the threshold): rotation 2.83 s -> 2.98 s, wall
  79.4 -> 80.4 s
p.hkl, p_model.cif/pdb, the maps and the MTZ/CIF reflection data are byte-identical in every run
(the files differ only in the git tag and command line in their headers). [MolecularReplacement]
tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018My7tqt8a4LyKKjP3FhScT
2026-10-18 12:51:48 +02:00
2026-10-16 15:34:43 +02:00
2026-08-13 17:03:10 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2026-10-06 14:03:18 +02:00
2026-09-02 21:17:31 +02:00
2026-10-17 18:17:46 +02:00
2026-10-16 15:34:43 +02:00
2026-03-26 20:50:33 +01:00
2026-06-23 20:29:49 +02:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2026-06-23 20:29:49 +02:00
2026-10-16 15:34:43 +02:00
2024-11-22 21:25:20 +01:00
2026-10-16 15:34:43 +02:00
2026-10-16 15:34:43 +02:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2025-10-25 22:05:47 +02:00
2026-07-03 19:18:56 +02:00
2026-10-16 15:34:43 +02:00
2026-08-13 17:03:10 +02:00
2026-10-06 14:03:18 +02:00
2026-08-25 08:21:39 +02:00
2026-09-22 06:48:37 +02:00
2026-08-26 22:47:00 +02:00
2026-10-16 15:34:43 +02:00
2026-10-17 18:17:46 +02:00

Jungfraujoch

Application to receive and analyse data from the PSI JUNGFRAU and EIGER detectors, together with rugnux, its program for processing stored diffraction data - rotation and serial, macromolecular and small-molecule - from images to merged reflections.

All documentation is now placed in docs/ subdirectory and for the current version hosted on Jungfraujoch Read The Docs page.

S
Description
Jungfraujoch Data Acquisition System, Rugnux Data Processing Application, and Diffraction Viewer
Readme GPL-3.0
3 GiB
2 Stars 3 Watchers 0 Forks
Languages
C++ 77.5%
HTML 5.6%
C 4.2%
Cuda 4%
TypeScript 3.4%
Other 5.2%