OutputIterator InputIterator InputIterator OutputIterator command_queue & An iterator pointing to the end of the result range. Copies the values from the range [first, last) to the range beginning at result. The copy() function is one of the few Boost.Compute algorithms which can take both device and host iterators as arguments. For example, to copy values from a vector on the host to a vector on the device: std::vector<int> host_vector = ... boost::compute::vector<int> device_vector = ... // copy all values in host_vector to device_vector boost::compute::copy(host_vector.begin(), host_vector.end(), device_vector.begin()); The generic copy() function can be used for a variety of data transfer tasks and provides a standard interface to the following OpenCL functions: clEnqueueReadBuffer() clEnqueueWriteBuffer() clEnqueueCopyBuffer() Unlike the aforementioned OpenCL functions, copy() will also work with non-contiguous data-structures (e.g. std::list<T>) as well as with "fancy" iterators (e.g. transform_iterator). See also: copy_n(), copy_if(), copy_async() future<OutputIterator> InputIterator InputIterator OutputIterator command_queue & A future containing an iterator pointing to the end of the result range. Copies the values from the range [first, last) to the range beginning at result. The copy is performed asynchronously.