boost::compute::gather
// In header: <boost/compute/algorithm/gather.hpp> template<typename InputIterator, typename MapIterator, typename OutputIterator> void gather(MapIterator first, MapIterator last, InputIterator input, OutputIterator result, command_queue & queue = system::default_queue());