Bolt  1.1
C++ template library with support for OpenCL
transform_reduce.h
Go to the documentation of this file.
1 /***************************************************************************
2 * Copyright 2012 - 2013 Advanced Micro Devices, Inc.
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 ***************************************************************************/
21 #pragma once
22 #if !defined( BOLT_AMP_TRANSFORM_REDUCE_H )
23 #define BOLT_AMP_TRANSFORM_REDUCE_H
24 
25 #include "bolt/amp/bolt.h"
26 #include "bolt/amp/device_vector.h"
27 #include "bolt/amp/functional.h"
28 
29 #include <string>
30 #include <iostream>
31 
32 namespace bolt {
33  namespace amp {
34 
90  template<typename InputIterator, typename UnaryFunction, typename T, typename BinaryFunction>
92  InputIterator first,
93  InputIterator last,
94  UnaryFunction transform_op,
95  T init,
96  BinaryFunction reduce_op );
97 
141  template<typename InputIterator, typename UnaryFunction, typename T, typename BinaryFunction>
143  control& ctl,
144  InputIterator first1,
145  InputIterator last1,
146  UnaryFunction transform_op,
147  T init,
148  BinaryFunction reduce_op );
149 
152  };
153 };
154 
155 #include <bolt/amp/detail/transform_reduce.inl>
156 #endif