2 * Copyright 2008-2013 NVIDIA Corporation
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <thrust/detail/config.h>
18 #include <thrust/system/cuda/detail/copy.h>
19 #include <thrust/system/cuda/detail/copy_device_to_device.h>
20 #include <thrust/system/cuda/detail/copy_cross_system.h>
32 template<typename System,
33 typename InputIterator,
34 typename OutputIterator>
35 OutputIterator copy(execution_policy<System> &system,
38 OutputIterator result)
40 return thrust::system::cuda::detail::copy_device_to_device(system,first,last,result);
44 template<typename System1,
46 typename InputIterator,
47 typename OutputIterator>
48 OutputIterator copy(cross_system<System1,System2> systems,
51 OutputIterator result)
53 return thrust::system::cuda::detail::copy_cross_system(systems,first,last,result);
57 template<typename System,
58 typename InputIterator,
60 typename OutputIterator>
61 OutputIterator copy_n(execution_policy<System> &system,
64 OutputIterator result)
66 return thrust::system::cuda::detail::copy_device_to_device(system,first,first+n,result);
70 template<typename System1,
72 typename InputIterator,
74 typename OutputIterator>
75 OutputIterator copy_n(cross_system<System1,System2> systems,
78 OutputIterator result)
80 return thrust::system::cuda::detail::copy_cross_system_n(systems,first,n,result);