Bolt  1.1
C++ template library with support for OpenCL
reduce_by_key.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 ***************************************************************************/
17 
18 #if !defined( BOLT_CL_REDUCE_BY_KEY_H )
19 #define BOLT_CL_REDUCE_BY_KEY_H
20 #pragma once
21 
22 #include <bolt/cl/bolt.h>
23 #include <bolt/cl/functional.h>
24 #include <bolt/cl/device_vector.h>
25 #include <bolt/cl/pair.h>
26 #include "bolt/cl/scan.h"
27 #include "bolt/cl/scan_by_key.h"
28 
32 namespace bolt
33 {
34  namespace cl
35  {
36 
88  template<
89  typename InputIterator1,
90  typename InputIterator2,
91  typename OutputIterator1,
92  typename OutputIterator2>
93  pair<OutputIterator1, OutputIterator2>
95  control &ctl,
96  InputIterator1 keys_first,
97  InputIterator1 keys_last,
98  InputIterator2 values_first,
99  OutputIterator1 keys_output,
100  OutputIterator2 values_output,
101  const std::string& user_code="" );
102 
103  template<
104  typename InputIterator1,
105  typename InputIterator2,
106  typename OutputIterator1,
107  typename OutputIterator2>
108  pair<OutputIterator1, OutputIterator2>
110  InputIterator1 keys_first,
111  InputIterator1 keys_last,
112  InputIterator2 values_first,
113  OutputIterator1 keys_output,
114  OutputIterator2 values_output,
115  const std::string& user_code="" );
116 
157  template<
158  typename InputIterator1,
159  typename InputIterator2,
160  typename OutputIterator1,
161  typename OutputIterator2,
162  typename BinaryPredicate>
163  pair<OutputIterator1, OutputIterator2>
165  control &ctl,
166  InputIterator1 keys_first,
167  InputIterator1 keys_last,
168  InputIterator2 values_first,
169  OutputIterator1 keys_output,
170  OutputIterator2 values_output,
171  BinaryPredicate binary_pred,
172  const std::string& user_code="" );
173 
174  template<
175  typename InputIterator1,
176  typename InputIterator2,
177  typename OutputIterator1,
178  typename OutputIterator2,
179  typename BinaryPredicate>
180  pair<OutputIterator1, OutputIterator2>
182  InputIterator1 keys_first,
183  InputIterator1 keys_last,
184  InputIterator2 values_first,
185  OutputIterator1 keys_output,
186  OutputIterator2 values_output,
187  BinaryPredicate binary_pred,
188  const std::string& user_code="" );
189 
190 
232  template<
233  typename InputIterator1,
234  typename InputIterator2,
235  typename OutputIterator1,
236  typename OutputIterator2,
237  typename BinaryPredicate,
238  typename BinaryFunction>
239  pair<OutputIterator1, OutputIterator2>
241  control &ctl,
242  InputIterator1 keys_first,
243  InputIterator1 keys_last,
244  InputIterator2 values_first,
245  OutputIterator1 keys_output,
246  OutputIterator2 values_output,
247  BinaryPredicate binary_pred,
248  BinaryFunction binary_op,
249  const std::string& user_code="" );
250 
251  template<
252  typename InputIterator1,
253  typename InputIterator2,
254  typename OutputIterator1,
255  typename OutputIterator2,
256  typename BinaryPredicate,
257  typename BinaryFunction>
258  pair<OutputIterator1, OutputIterator2>
260  InputIterator1 keys_first,
261  InputIterator1 keys_last,
262  InputIterator2 values_first,
263  OutputIterator1 keys_output,
264  OutputIterator2 values_output,
265  BinaryPredicate binary_pred,
266  BinaryFunction binary_op,
267  const std::string& user_code="" );
268 
269 
270 
271  };// end of bolt::cl
272 };// end of bolt namespace
273 
274 #include <bolt/cl/detail/reduce_by_key.inl>
275 
276 #endif