OmniSciDB  343343d194
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InPlaceSortImpl.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 InPlaceSortImpl.h
19  * @author Alex Suhan <alex@mapd.com>
20  *
21  * Copyright (c) 2015 MapD Technologies, Inc. All rights reserved.
22  */
23 
24 #ifndef INPLACESORTIMPL_H
25 #define INPLACESORTIMPL_H
26 
27 #include <cstdint>
28 
29 class ThrustAllocator;
30 
31 void sort_on_gpu(int64_t* val_buff,
32  int32_t* key_buff,
33  const uint64_t entry_count,
34  const bool desc,
35  const uint32_t chosen_bytes,
36  ThrustAllocator& alloc);
37 
38 void sort_on_cpu(int64_t* val_buff,
39  int32_t* key_buff,
40  const uint64_t entry_count,
41  const bool desc,
42  const uint32_t chosen_bytes);
43 
44 void apply_permutation_on_gpu(int64_t* val_buff,
45  int32_t* idx_buff,
46  const uint64_t entry_count,
47  const uint32_t chosen_bytes,
48  ThrustAllocator& alloc);
49 
50 void apply_permutation_on_cpu(int64_t* val_buff,
51  int32_t* idx_buff,
52  const uint64_t entry_count,
53  int64_t* tmp_buff,
54  const uint32_t chosen_bytes);
55 
56 #endif // INPLACESORTIMPL_H
void sort_on_cpu(int64_t *val_buff, int32_t *idx_buff, const uint64_t entry_count, const bool desc, const uint32_t chosen_bytes)
void apply_permutation_on_gpu(int64_t *val_buff, int32_t *idx_buff, const uint64_t entry_count, const uint32_t chosen_bytes, ThrustAllocator &alloc)
void apply_permutation_on_cpu(int64_t *val_buff, int32_t *idx_buff, const uint64_t entry_count, int64_t *tmp_buff, const uint32_t chosen_bytes)
void sort_on_gpu(int64_t *val_buff, int32_t *idx_buff, const uint64_t entry_count, const bool desc, const uint32_t chosen_bytes, ThrustAllocator &alloc)