Bolt  1.1
C++ template library with support for OpenCL
gather.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_GATHER_H )
19 #define BOLT_CL_GATHER_H
20 #pragma once
21 
22 #include "bolt/cl/bolt.h"
23 #include "bolt/cl/device_vector.h"
24 
25 #include <string>
26 #include <iostream>
27 
33 namespace bolt {
34  namespace cl {
35 
84  template< typename InputIterator1,
85  typename InputIterator2,
86  typename OutputIterator >
87  void gather( ::bolt::cl::control &ctl,
88  InputIterator1 map_first,
89  InputIterator1 map_last,
90  InputIterator2 input_first,
91  OutputIterator result,
92  const std::string& user_code="" );
93 
94  template< typename InputIterator1,
95  typename InputIterator2,
96  typename OutputIterator >
97  void gather( InputIterator1 map_first,
98  InputIterator1 map_last,
99  InputIterator2 input_first,
100  OutputIterator result,
101  const std::string& user_code="" );
102 
103 
140  template< typename InputIterator1,
141  typename InputIterator2,
142  typename InputIterator3,
143  typename OutputIterator >
144  void gather_if( bolt::cl::control &ctl,
145  InputIterator1 map_first,
146  InputIterator1 map_last,
147  InputIterator2 stencil,
148  InputIterator3 input_first,
149  OutputIterator result,
150  const std::string& user_code="" );
151 
152  template< typename InputIterator1,
153  typename InputIterator2,
154  typename InputIterator3,
155  typename OutputIterator >
156  void gather_if( InputIterator1 map_first,
157  InputIterator1 map_last,
158  InputIterator2 stencil,
159  InputIterator3 input_first,
160  OutputIterator result,
161  const std::string& user_code="" );
162 
215  template< typename InputIterator1,
216  typename InputIterator2,
217  typename InputIterator3,
218  typename OutputIterator,
219  typename Predicate >
220  void gather_if( bolt::cl::control &ctl,
221  InputIterator1 map_first,
222  InputIterator1 map_last,
223  InputIterator2 stencil,
224  InputIterator3 input,
225  OutputIterator result,
226  Predicate pred,
227  const std::string& user_code="" );
228 
229  template< typename InputIterator1,
230  typename InputIterator2,
231  typename InputIterator3,
232  typename OutputIterator,
233  typename Predicate >
234  void gather_if( InputIterator1 map_first,
235  InputIterator1 map_last,
236  InputIterator2 stencil,
237  InputIterator3 input,
238  OutputIterator result,
239  Predicate pred,
240  const std::string& user_code="" );
241 
242 
244  };
245 };
246 
247 #include <bolt/cl/detail/gather.inl>
248 #endif