OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InPlaceSort.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, 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  * @file InPlaceSort.h
19  * @author Alex Suhan <alex@mapd.com>
20  *
21  * Copyright (c) 2015 MapD Technologies, Inc. All rights reserved.
22  */
23 
24 #ifndef INPLACESORT_H
25 #define INPLACESORT_H
26 
27 #include "GpuMemUtils.h"
28 
29 #include <cstdint>
30 #include <list>
31 
32 namespace Analyzer {
33 struct OrderEntry;
34 }
36 namespace Data_Namespace {
37 class DataMgr;
38 }
39 
40 void inplace_sort_gpu(const std::list<Analyzer::OrderEntry>&,
41  const QueryMemoryDescriptor&,
42  const GpuGroupByBuffers&,
44  const int);
45 
46 void sort_groups_cpu(int64_t* val_buff,
47  int32_t* key_buff,
48  const uint64_t entry_count,
49  const bool desc,
50  const uint32_t chosen_bytes);
51 
52 void apply_permutation_cpu(int64_t* val_buff,
53  int32_t* idx_buff,
54  const uint64_t entry_count,
55  int64_t* tmp_buff,
56  const uint32_t chosen_bytes);
57 
58 #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