Bolt  1.3
C++ template library with support for OpenCL
transform.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 
22 #pragma once
23 #if !defined( BOLT_AMP_TRANSFORM_H )
24 #define BOLT_AMP_TRANSFORM_H
25 
26 #include <amp.h>
27 #include "bolt/amp/functional.h"
28 
29 #include "bolt/amp/bolt.h"
30 #include <string>
31 #include <assert.h>
32 
37 namespace bolt
38 {
39  namespace amp
40  {
105  template<typename InputIterator, typename OutputIterator, typename UnaryFunction>
106  void transform(control &ctl,
107  InputIterator first,
108  InputIterator last,
109  OutputIterator result,
110  UnaryFunction op);
111 
112  template<typename InputIterator, typename OutputIterator, typename UnaryFunction>
113  void transform(InputIterator first,
114  InputIterator last,
115  OutputIterator result,
116  UnaryFunction op);
117 
118 
119 
120 
172  template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename BinaryFunction>
173  void transform(control &ctl,
174  InputIterator1 first1,
175  InputIterator1 last1,
176  InputIterator2 first2,
177  OutputIterator result,
178  BinaryFunction op);
179 
180  template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename BinaryFunction>
181  void transform(InputIterator1 first1,
182  InputIterator1 last1,
183  InputIterator2 first2,
184  OutputIterator result,
185  BinaryFunction op);
186 
187 
188 
189 
190 
191 
192  //Transform If Variants...
193 
249  template<typename InputIterator, typename OutputIterator, typename UnaryFunction, typename Predicate>
250  OutputIterator transform_if(control &ctl,
251  InputIterator first,
252  InputIterator last,
253  OutputIterator result,
254  UnaryFunction op,
255  Predicate pred );
256 
257  template<typename InputIterator, typename OutputIterator, typename UnaryFunction, typename Predicate>
258  OutputIterator transform_if(InputIterator first,
259  InputIterator last,
260  OutputIterator result,
261  UnaryFunction op,
262  Predicate pred);
263 
264 
315  template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename UnaryFunction, typename Predicate>
316  OutputIterator transform_if (InputIterator1 first, InputIterator1 last, InputIterator2 stencil, OutputIterator result, UnaryFunction op, Predicate pred);
317 
318 
319  template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename UnaryFunction, typename Predicate>
320  OutputIterator transform_if (control &ctl, InputIterator1 first, InputIterator1 last, InputIterator2 stencil, OutputIterator result, UnaryFunction op, Predicate pred);
321 
322 
379  template<typename InputIterator1, typename InputIterator2, typename InputIterator3, typename OutputIterator, typename BinaryFunction, typename Predicate>
380  OutputIterator transform_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,
381  InputIterator3 stencil, OutputIterator result, BinaryFunction op, Predicate pred);
382 
383  template<typename InputIterator1, typename InputIterator2, typename InputIterator3, typename OutputIterator, typename BinaryFunction, typename Predicate>
384  OutputIterator transform_if (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2,
385  InputIterator3 stencil, OutputIterator result, BinaryFunction op, Predicate pred);
386 
387 
388 
391  }//amp namespace ends
392 }//bolt namespace ends
393 
394 #include <bolt/amp/detail/transform.inl>
395 
396 #endif // AMP_TRANSFORM_H
397 
398