Skip to content

Compose thrust::find_if from a look-back prefix scan algorithm? #1640

Answered by jrhemstad
lilohuang asked this question in Thrust
Discussion options

You must be logged in to vote

The existing implementation of thrust::find_if for the CUDA platform breaks up the sequence into separate intervals

Indeed, find_if uses the same implementation code path as all_of and other logical algorithms that attempt to early exit.

I wrote up quite a long time ago how this can lead to pretty poor performance: #720

It's definitely on our radar to reinvestigate the implementation of those algorithms. That will likely happen as part of or after #26.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lilohuang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Thrust
Labels
None yet
2 participants