Skip to content

GPUCommonAlgorithm: partitionPoint - #15985

Merged
davidrohr merged 1 commit into
AliceO2Group:devfrom
f3sch:gpu/algo/part
Oct 20, 2026
Merged

davidrohr merged 1 commit into
AliceO2Group:devfrom
f3sch:gpu/algo/part

Conversation

@f3sch

@f3sch f3sch commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Device code has no std::partition_point, and kernels write the binary search by hand (e.g. the last ROF at or before a cluster in ITS/tracking/GPU/cuda/TrackingKernels.cu). Add
GPUCommonAlgorithm::partitionPoint(first, count, pred), std::partition_point over the indices [first, first + count), callable from host and device code; lower and upper bounds are its predicates key(i) < value and !(value < key(i)).

Device code has no std::partition_point, and kernels write the binary
search by hand (e.g. the last ROF at or before a cluster in
ITS/tracking/GPU/cuda/TrackingKernels.cu). Add
GPUCommonAlgorithm::partitionPoint(first, count, pred), std::partition_point
over the indices [first, first + count), callable from host and device
code; lower and upper bounds are its predicates key(i) < value and
!(value < key(i)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
@f3sch
f3sch requested a review from davidrohr as a code owner October 19, 2026 13:17
@davidrohr
davidrohr merged commit 8cc0b98 into AliceO2Group:dev Oct 20, 2026
11 checks passed
@f3sch
f3sch deleted the gpu/algo/part branch October 20, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants