Thrust
transform.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2013 NVIDIA Corporation
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 
24 #include <thrust/detail/config.h>
25 #include <thrust/detail/execution_policy.h>
26 
27 THRUST_NAMESPACE_BEGIN
28 
85 template<typename DerivedPolicy,
86  typename InputIterator,
87  typename OutputIterator,
88  typename UnaryFunction>
89 __host__ __device__
90  OutputIterator transform(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
91  InputIterator first, InputIterator last,
92  OutputIterator result,
93  UnaryFunction op);
94 
95 
136 template<typename InputIterator,
137  typename OutputIterator,
138  typename UnaryFunction>
139  OutputIterator transform(InputIterator first, InputIterator last,
140  OutputIterator result,
141  UnaryFunction op);
142 
143 
199 template<typename DerivedPolicy,
200  typename InputIterator1,
201  typename InputIterator2,
202  typename OutputIterator,
203  typename BinaryFunction>
204 __host__ __device__
205  OutputIterator transform(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
206  InputIterator1 first1, InputIterator1 last1,
207  InputIterator2 first2,
208  OutputIterator result,
209  BinaryFunction op);
210 
211 
260 template<typename InputIterator1,
261  typename InputIterator2,
262  typename OutputIterator,
263  typename BinaryFunction>
264  OutputIterator transform(InputIterator1 first1, InputIterator1 last1,
265  InputIterator2 first2,
266  OutputIterator result,
267  BinaryFunction op);
268 
269 
336 template<typename DerivedPolicy,
337  typename InputIterator,
338  typename ForwardIterator,
339  typename UnaryFunction,
340  typename Predicate>
341 __host__ __device__
342  ForwardIterator transform_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
343  InputIterator first, InputIterator last,
344  ForwardIterator result,
345  UnaryFunction op,
346  Predicate pred);
347 
348 
408 template<typename InputIterator,
409  typename ForwardIterator,
410  typename UnaryFunction,
411  typename Predicate>
412  ForwardIterator transform_if(InputIterator first, InputIterator last,
413  ForwardIterator result,
414  UnaryFunction op,
415  Predicate pred);
416 
417 
479 template<typename DerivedPolicy,
480  typename InputIterator1,
481  typename InputIterator2,
482  typename ForwardIterator,
483  typename UnaryFunction,
484  typename Predicate>
485 __host__ __device__
486  ForwardIterator transform_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
487  InputIterator1 first, InputIterator1 last,
488  InputIterator2 stencil,
489  ForwardIterator result,
490  UnaryFunction op,
491  Predicate pred);
492 
493 
548 template<typename InputIterator1,
549  typename InputIterator2,
550  typename ForwardIterator,
551  typename UnaryFunction,
552  typename Predicate>
553  ForwardIterator transform_if(InputIterator1 first, InputIterator1 last,
554  InputIterator2 stencil,
555  ForwardIterator result,
556  UnaryFunction op,
557  Predicate pred);
558 
559 
626 template<typename DerivedPolicy,
627  typename InputIterator1,
628  typename InputIterator2,
629  typename InputIterator3,
630  typename ForwardIterator,
631  typename BinaryFunction,
632  typename Predicate>
633 __host__ __device__
634  ForwardIterator transform_if(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
635  InputIterator1 first1, InputIterator1 last1,
636  InputIterator2 first2,
637  InputIterator3 stencil,
638  ForwardIterator result,
639  BinaryFunction binary_op,
640  Predicate pred);
641 
642 
702 template<typename InputIterator1,
703  typename InputIterator2,
704  typename InputIterator3,
705  typename ForwardIterator,
706  typename BinaryFunction,
707  typename Predicate>
708  ForwardIterator transform_if(InputIterator1 first1, InputIterator1 last1,
709  InputIterator2 first2,
710  InputIterator3 stencil,
711  ForwardIterator result,
712  BinaryFunction binary_op,
713  Predicate pred);
714 
715 
719 THRUST_NAMESPACE_END
720 
721 #include <thrust/detail/transform.inl>
OutputIterator transform(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op)
ForwardIterator transform_if(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator3 stencil, ForwardIterator result, BinaryFunction binary_op, Predicate pred)