OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TopKSort.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, 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 #ifndef QUERYENGINE_TOPKSORT_H
18 #define QUERYENGINE_TOPKSORT_H
19 
20 #ifdef HAVE_CUDA
21 #include <cuda.h>
22 #include "../Shared/sqltypes.h"
23 #include "ResultSetSortImpl.h"
24 
25 #include <vector>
26 
27 namespace Data_Namespace {
28 
29 class DataMgr;
30 
31 } // namespace Data_Namespace
32 
33 class ThrustAllocator;
34 
35 std::vector<int8_t> pop_n_rows_from_merged_heaps_gpu(
36  Data_Namespace::DataMgr* data_mgr,
37  const int64_t* dev_heaps,
38  const size_t heaps_size,
39  const size_t n,
40  const PodOrderEntry& oe,
41  const GroupByBufferLayoutInfo& layout,
42  const size_t group_key_bytes,
43  const size_t thread_count,
44  const int device_id);
45 
46 #endif // HAVE_CUDA
47 
48 #endif // QUERYENGINE_TOPKSORT_H
std::vector< int8_t > pop_n_rows_from_merged_heaps_gpu(Data_Namespace::DataMgr *data_mgr, const int64_t *dev_heaps, const size_t heaps_size, const size_t n, const PodOrderEntry &oe, const GroupByBufferLayoutInfo &layout, const size_t group_key_bytes, const size_t thread_count, const int device_id)
Definition: TopKSort.cu:303
constexpr double n
Definition: Utm.h:38