OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InPlaceSort.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 
23 #ifndef INPLACESORT_H
24 #define INPLACESORT_H
25 
26 #include "GpuMemUtils.h"
27 
28 #include <cstdint>
29 #include <list>
30 
31 namespace Analyzer {
32 struct OrderEntry;
33 }
35 namespace Data_Namespace {
36 class DataMgr;
37 }
38 
39 void inplace_sort_gpu(const std::list<Analyzer::OrderEntry>&,
40  const QueryMemoryDescriptor&,
41  const GpuGroupByBuffers&,
43  const int device_id);
44 
45 void sort_groups_cpu(int64_t* val_buff,
46  int32_t* key_buff,
47  const uint64_t entry_count,
48  const bool desc,
49  const uint32_t chosen_bytes);
50 
51 void apply_permutation_cpu(int64_t* val_buff,
52  int32_t* idx_buff,
53  const uint64_t entry_count,
54  int64_t* tmp_buff,
55  const uint32_t chosen_bytes);
56 
57 #endif // INPLACESORT_H
void sort_groups_cpu(int64_t *val_buff, int32_t *idx_buff, const uint64_t entry_count, const bool desc, const uint32_t chosen_bytes)
Definition: InPlaceSort.cpp:27
void inplace_sort_gpu(const std::list< Analyzer::OrderEntry > &order_entries, const QueryMemoryDescriptor &query_mem_desc, const GpuGroupByBuffers &group_by_buffers, Data_Namespace::DataMgr *data_mgr, const int device_id)
void apply_permutation_cpu(int64_t *val_buff, int32_t *idx_buff, const uint64_t entry_count, int64_t *tmp_buff, const uint32_t chosen_bytes)
Definition: InPlaceSort.cpp:46