OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InPlaceSortImpl.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 INPLACESORTIMPL_H
24 #define INPLACESORTIMPL_H
25 
26 #include <cstdint>
27 
28 class ThrustAllocator;
29 
30 void sort_on_gpu(int64_t* val_buff,
31  int32_t* key_buff,
32  const uint64_t entry_count,
33  const bool desc,
34  const uint32_t chosen_bytes,
35  ThrustAllocator& alloc,
36  const int device_id);
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  const int device_id);
50 
51 void apply_permutation_on_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 // INPLACESORTIMPL_H
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, const int device_id)
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, const int device_id)
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)