Bolt  1.1
C++ template library with support for OpenCL
sort_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_SORT_BY_KEY_H )
19 #define BOLT_CL_SORT_BY_KEY_H
20 #pragma once
21 
22 #include <bolt/cl/bolt.h>
23 #include <bolt/cl/functional.h>
24 #include <string>
25 #include <iostream>
26 
31 namespace bolt {
32  namespace cl {
33 
34 
86  template<typename RandomAccessIterator1 , typename RandomAccessIterator2>
88  RandomAccessIterator1 keys_first,
89  RandomAccessIterator1 keys_last,
90  RandomAccessIterator2 values_first,
91  const std::string& cl_code="");
92 
93  template<typename RandomAccessIterator1 , typename RandomAccessIterator2>
94  void sort_by_key(RandomAccessIterator1 keys_first,
95  RandomAccessIterator1 keys_last,
96  RandomAccessIterator2 values_first,
97  const std::string& cl_code="");
98 
135  template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering>
136  void sort_by_key(bolt::cl::control &ctl,
137  RandomAccessIterator1 keys_first,
138  RandomAccessIterator1 keys_last,
139  RandomAccessIterator2 values_first,
140  StrictWeakOrdering comp,
141  const std::string& cl_code="");
142 
143 
144  template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering>
145  void sort_by_key(RandomAccessIterator1 keys_first,
146  RandomAccessIterator1 keys_last,
147  RandomAccessIterator2 values_first,
148  StrictWeakOrdering comp,
149  const std::string& cl_code="");
150 
151 
152 
155  }// end of bolt::cl namespace
156 }// end of bolt namespace
157 
158 #include <bolt/cl/detail/sort_by_key.inl>
159 #endif