Bolt  1.3
C++ template library with support for OpenCL
copy.h
Go to the documentation of this file.
1 /***************************************************************************
2 * © 2012,2014 Advanced Micro Devices, Inc. All rights reserved.
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 
16 ***************************************************************************/
17 
18 #if !defined( BOLT_AMP_COPY_H )
19 #define BOLT_AMP_COPY_H
20 #pragma once
21 
22 #include <bolt/amp/bolt.h>
23 #include <bolt/amp/device_vector.h>
24 
25 #include <string>
26 #include <iostream>
27 
32 namespace bolt {
33  namespace amp {
34 
84  template<typename InputIterator, typename OutputIterator>
85  OutputIterator copy(
86  const bolt::amp::control &ctl,
87  InputIterator first,
88  InputIterator last,
89  OutputIterator result);
90 
91  template<typename InputIterator, typename OutputIterator>
92  OutputIterator copy(
93  InputIterator first,
94  InputIterator last,
95  OutputIterator result);
96 
135  template<typename InputIterator, typename Size, typename OutputIterator>
136  OutputIterator copy_n(
137  const bolt::amp::control &ctl,
138  InputIterator first,
139  Size n,
140  OutputIterator result);
141 
142  template<typename InputIterator, typename Size, typename OutputIterator>
143  OutputIterator copy_n(
144  InputIterator first,
145  Size n,
146  OutputIterator result);
147 
206 template<typename DerivedPolicy, typename InputIterator, typename OutputIterator, typename Predicate>
207 OutputIterator copy_if(const bolt::amp::control &ctl,
208  InputIterator first,
209  InputIterator last,
210  OutputIterator result,
211  Predicate pred);
212 
213 template<typename InputIterator,
214  typename OutputIterator,
215  typename Predicate>
216  OutputIterator copy_if(InputIterator first,
217  InputIterator last,
218  OutputIterator result,
219  Predicate pred);
220 
221 
280 template<typename DerivedPolicy, typename InputIterator1, typename InputIterator2, typename OutputIterator, typename Predicate>
281 OutputIterator copy_if(const bolt::amp::control &ctl,
282  InputIterator1 first,
283  InputIterator1 last,
284  InputIterator2 stencil,
285  OutputIterator result,
286  Predicate pred);
287 
288 template<typename InputIterator1,
289  typename InputIterator2,
290  typename OutputIterator,
291  typename Predicate>
292  OutputIterator copy_if(InputIterator1 first,
293  InputIterator1 last,
294  InputIterator2 stencil,
295  OutputIterator result,
296  Predicate pred);
297 
300  };
301 };
302 
303 #include <bolt/amp/detail/copy.inl>
304 #endif