thrust icon indicating copy to clipboard operation
thrust copied to clipboard

add missing easy algorithms

Open jaredhoberock opened this issue 13 years ago • 1 comments

We're missing these algorithms (which look simple to add):

find_end find_first_of adjacent_find search search_n rotate rotate_copy lexicographical_compare

Parallel rotate() seems like it demands some temporary memory, though one could be clever and conserve the amount required.

We can build a naive search() with find_if(), but a better one would cache the needle in shared memory and perform Boyer-Moore-esque optimizations [1].

[1] http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm

Forwarded from http://code.google.com/p/thrust/issues/detail?id=422

jaredhoberock avatar May 07 '12 20:05 jaredhoberock

NVC++ implements adjacent_find with thrust::mismatch and search with thrust::find_if. But it would be nice to have proper parallel implementations. NVC++ implements the others sequentially.

dkolsen-pgi avatar Apr 23 '21 22:04 dkolsen-pgi