Refinement on the GPU: the normal matrix's budget counts J's copy in the parameter atoms' order

Since the transpose product reads J from a per-atom ordered copy (jt) and each entry's row from
row_at, an entry holds two float4 and three int (param, entry, row_at) on the card; row_of stays on
the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdHHZ4cogS1mrGUtfN7
This commit is contained in:
leonarski_fandClaude Opus 5.5 committed 2026-11-17 16:59:38 +01:00
1 parent 25bb143daa
commit 3d88ebea65
1 file changed
+1 -1
@@ -37,7 +37,7 @@ size_t RestraintNormalMatrixGPU::DeviceBytes(const RestraintSet &set, size_t n_a
return n_atoms * 4 * sizeof(float) // the positions
+ set.records.size() * (sizeof(RestraintRecord) + sizeof(int)) + set.plane_atoms.size() * sizeof(int)
+ rows * (sizeof(int) + 2 * sizeof(float)) // row starts, J v
+ entries * (4 * sizeof(float) + 3 * sizeof(int)) + params * sizeof(int) // J, its index
+ entries * (8 * sizeof(float) + 3 * sizeof(int)) + params * sizeof(int) // J, its transposed copy, index
+ n * 15 * sizeof(float) // seven vectors, diagonal
+ n * (2 * sizeof(float) + 2 * sizeof(int)) + 2 * block_atoms.size() * sizeof(int) // h, the blocks
+ inverse * 2 * sizeof(float) // their inverses