Repository navigation
Bound the LUT-smearing profile loop instead of scanning it - #343
Open
madantimalsina wants to merge 1 commit into
Open
madantimalsina wants to merge 1 commit into
madantimalsina wants to merge 1 commit into
Conversation
In sum_light_signals the ENABLE_LUT_SMEARING branch iterated over every bin of the LUT time profile to find the bins landing inside the current time tick. The acceptance window is one tick wide (LIGHT_TICK_SIZE = 0.001 us = 1 ns) and profile bins are spaced 1 ns apart, so at most one bin can qualify: the loop ran ~100 iterations per surviving (detector, tick, track) to locate a single contributing bin. Solve the acceptance condition for iprof and iterate only that range. The original predicate is retained inside the narrowed loop, so the bounds can only skip iterations the previous code already rejected and the selected bins are unchanged. Bounds are padded by one bin on each side so rounding in the division cannot clip an edge bin.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In sum_light_signals the ENABLE_LUT_SMEARING branch iterated over every bin of the LUT time profile to find the bins landing inside the current time tick. The acceptance window is one tick wide (LIGHT_TICK_SIZE = 0.001 us = 1 ns) and profile bins are spaced 1 ns apart, so at most one bin can qualify: the loop ran ~100 iterations per surviving (detector, tick, track) to locate a single contributing bin.
Solve the acceptance condition for iprof and iterate only that range. The original predicate is retained inside the narrowed loop, so the bounds can only skip iterations the previous code already rejected and the selected bins are unchanged. Bounds are padded by one bin on each side so rounding in the division cannot clip an edge bin.