Skip to content

Commit 161e4fb

Browse files
committed
Improve comment about magic seeding constants
1 parent 52e462e commit 161e4fb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/katgpucbf/fgpu/engine.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,9 @@ def __init__(self, output: Output, engine: "Engine", context: AbstractContext, d
501501
engine.n_samples,
502502
self.spectra,
503503
output.spectra_per_heap,
504-
# Magic constant is random, and just to ensure the seed isn't the same
505-
# as other engines that also use the sync_time for seeding
504+
# The magic constant was chosen at random. It ensures that the
505+
# seed won't be the same as in other types of engine that also use
506+
# sync_time as the basis for seeding.
506507
seed=int(engine.time_converter.sync_time) ^ 0x9CC11336C8B170B7,
507508
sequence_first=engine.feng_id,
508509
sequence_step=engine.n_ants,

src/katgpucbf/xbgpu/engine.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ def __init__(
362362
n_batches=engine.heaps_per_fengine_per_chunk,
363363
n_ants=engine.n_ants,
364364
n_channels_per_substream=engine.n_channels_per_substream,
365-
# Magic constant is random, and just to ensure the seed isn't the same
366-
# as other engines that also use the sync_time for seeding
365+
# The magic constant was chosen at random. It ensures that the
366+
# seed won't be the same as in other types of engine that also use
367+
# sync_time as the basis for seeding.
367368
seed=int(engine.time_converter.sync_time) ^ 0xFA9D9B2093B458D5,
368369
sequence_first=engine.channel_offset_value,
369370
sequence_step=engine.n_channels,

0 commit comments

Comments
 (0)