Bolt  1.3
C++ template library with support for OpenCL
sort_by_key.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 
18 #if !defined( BOLT_CL_SORT_BY_KEY_H )
19 #define BOLT_CL_SORT_BY_KEY_H
20 #pragma once
21 
22 #include "bolt/cl/device_vector.h"
23 #include "bolt/cl/functional.h"
24 
29 namespace bolt {
30  namespace cl {
31 
32 
84  template<typename RandomAccessIterator1 , typename RandomAccessIterator2>
86  RandomAccessIterator1 keys_first,
87  RandomAccessIterator1 keys_last,
88  RandomAccessIterator2 values_first,
89  const std::string& cl_code="");
90 
91  template<typename RandomAccessIterator1 , typename RandomAccessIterator2>
92  void sort_by_key(RandomAccessIterator1 keys_first,
93  RandomAccessIterator1 keys_last,
94  RandomAccessIterator2 values_first,
95  const std::string& cl_code="");
96 
133  template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering>
134  void sort_by_key(bolt::cl::control &ctl,
135  RandomAccessIterator1 keys_first,
136  RandomAccessIterator1 keys_last,
137  RandomAccessIterator2 values_first,
138  StrictWeakOrdering comp,
139  const std::string& cl_code="");
140 
141 
142  template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering>
143  void sort_by_key(RandomAccessIterator1 keys_first,
144  RandomAccessIterator1 keys_last,
145  RandomAccessIterator2 values_first,
146  StrictWeakOrdering comp,
147  const std::string& cl_code="");
148 
149 
150 
153  }// end of bolt::cl namespace
154 }// end of bolt namespace
155 
156 #include <bolt/cl/detail/sort_by_key.inl>
157 #endif