Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 9f90f4f

Browse files
committed
clang-format changes for LLVM 15
(consistent treatment of single line functions)
1 parent 9016bc4 commit 9f90f4f

File tree

13 files changed

+32
-96
lines changed

13 files changed

+32
-96
lines changed

omniscidb/CudaMgr/CudaMgr.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,8 @@ class CudaMgr : public GpuMgr {
233233

234234
void printDeviceProperties() const;
235235

236-
const std::vector<CUcontext>& getDeviceContexts() const {
237-
return device_contexts_;
238-
}
239-
const int getGpuDriverVersion() const {
240-
return gpu_driver_version_;
241-
}
236+
const std::vector<CUcontext>& getDeviceContexts() const { return device_contexts_; }
237+
const int getGpuDriverVersion() const { return gpu_driver_version_; }
242238

243239
void loadGpuModuleData(CUmodule* module,
244240
const void* image,

omniscidb/DataMgr/ChunkMetadata.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,7 @@ class ChunkMetadata {
223223
return res;
224224
}
225225

226-
std::string toString() const {
227-
return dump();
228-
}
226+
std::string toString() const { return dump(); }
229227
#endif
230228

231229
template <typename T>

omniscidb/DataMgr/DataMgr.h

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,11 @@ class ProcBuddyinfoParser {
148148
fragmentationPercent_ = (scaled * 100) / total;
149149
}
150150

151-
auto operator[](size_t order) {
152-
return orders_[order];
153-
}
154-
auto begin() {
155-
return orders_.begin();
156-
}
157-
auto end() {
158-
return orders_.end();
159-
}
160-
auto getFragmentationPercent() {
161-
return fragmentationPercent_;
162-
}
163-
auto getInputText() {
164-
return inputText_;
165-
}
151+
auto operator[](size_t order) { return orders_[order]; }
152+
auto begin() { return orders_.begin(); }
153+
auto end() { return orders_.end(); }
154+
auto getFragmentationPercent() { return fragmentationPercent_; }
155+
auto getInputText() { return inputText_; }
166156
};
167157

168158
class DataMgr {

omniscidb/QueryEngine/CgenState.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,7 @@ struct CgenState {
288288
const std::vector<llvm::Value*>& args);
289289
llvm::Value* emitCall(const std::string& fname, const std::vector<llvm::Value*>& args);
290290

291-
size_t getLiteralBufferUsage(const int device_id) {
292-
return literal_bytes_[device_id];
293-
}
291+
size_t getLiteralBufferUsage(const int device_id) { return literal_bytes_[device_id]; }
294292

295293
llvm::Value* castToTypeIn(llvm::Value* val, const size_t bit_width);
296294

@@ -317,9 +315,7 @@ struct CgenState {
317315
llvm::ConstantFP::get(llvm::Type::getDoubleTy(context_), v));
318316
}
319317

320-
llvm::ConstantInt* llBool(const bool v) const {
321-
return ::ll_bool(v, context_);
322-
}
318+
llvm::ConstantInt* llBool(const bool v) const { return ::ll_bool(v, context_); }
323319

324320
void emitErrorCheck(llvm::Value* condition, llvm::Value* errorCode, std::string label);
325321

omniscidb/QueryEngine/JoinHashTable/BaselineHashTable.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,9 @@ class BaselineHashTable : public HashTable {
9393
return reinterpret_cast<int8_t*>(cpu_hash_table_buff_.get());
9494
}
9595

96-
HashType getLayout() const override {
97-
return layout_;
98-
}
99-
size_t getEntryCount() const override {
100-
return entry_count_;
101-
}
102-
size_t getEmittedKeysCount() const override {
103-
return emitted_keys_count_;
104-
}
96+
HashType getLayout() const override { return layout_; }
97+
size_t getEntryCount() const override { return entry_count_; }
98+
size_t getEmittedKeysCount() const override { return emitted_keys_count_; }
10599

106100
private:
107101
std::unique_ptr<int8_t[]> cpu_hash_table_buff_;

omniscidb/QueryEngine/JoinHashTable/Builders/BaselineHashTableBuilder.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -531,17 +531,11 @@ class BaselineJoinHashTableBuilder {
531531
return err;
532532
}
533533

534-
std::unique_ptr<BaselineHashTable> getHashTable() {
535-
return std::move(hash_table_);
536-
}
534+
std::unique_ptr<BaselineHashTable> getHashTable() { return std::move(hash_table_); }
537535

538-
void setHashLayout(HashType layout) {
539-
layout_ = layout;
540-
}
536+
void setHashLayout(HashType layout) { layout_ = layout; }
541537

542-
HashType getHashLayout() const {
543-
return layout_;
544-
}
538+
HashType getHashLayout() const { return layout_; }
545539

546540
private:
547541
std::unique_ptr<BaselineHashTable> hash_table_;

omniscidb/QueryEngine/JoinHashTable/Builders/PerfectHashTableBuilder.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,7 @@ class PerfectJoinHashTableBuilder {
298298
}
299299
}
300300

301-
std::unique_ptr<PerfectHashTable> getHashTable() {
302-
return std::move(hash_table_);
303-
}
301+
std::unique_ptr<PerfectHashTable> getHashTable() { return std::move(hash_table_); }
304302

305303
const bool for_semi_anti_join(const JoinType join_type) {
306304
return join_type == JoinType::SEMI || join_type == JoinType::ANTI;

omniscidb/QueryEngine/JoinHashTable/Runtime/HashJoinKeyHandlers.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,11 @@ struct GenericKeyHandler {
104104
return 0;
105105
}
106106

107-
DEVICE size_t get_number_of_columns() const {
108-
return key_component_count_;
109-
}
107+
DEVICE size_t get_number_of_columns() const { return key_component_count_; }
110108

111-
DEVICE size_t get_key_component_count() const {
112-
return key_component_count_;
113-
}
109+
DEVICE size_t get_key_component_count() const { return key_component_count_; }
114110

115-
DEVICE const JoinColumn* get_join_columns() const {
116-
return join_column_per_key_;
117-
}
111+
DEVICE const JoinColumn* get_join_columns() const { return join_column_per_key_; }
118112

119113
DEVICE const JoinColumnTypeInfo* get_join_column_type_infos() const {
120114
return type_info_per_key_;

omniscidb/QueryEngine/JoinHashTable/Runtime/JoinColumnIterator.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ struct JoinColumnTupleIterator {
195195
return *this;
196196
}
197197

198-
DEVICE FORCE_INLINE JoinColumnTupleIterator& operator*() {
199-
return *this;
200-
}
198+
DEVICE FORCE_INLINE JoinColumnTupleIterator& operator*() { return *this; }
201199
}; // struct JoinColumnTupleIterator
202200

203201
//! Helper class for viewing multiple JoinColumns and their matching JoinColumnTypeInfos

omniscidb/QueryEngine/OmniSciTypes.h

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -83,23 +83,15 @@ struct TextEncodingNone {
8383
int64_t size_;
8484

8585
#ifndef __CUDACC__
86-
std::string getString() const {
87-
return std::string(ptr_, size_);
88-
}
86+
std::string getString() const { return std::string(ptr_, size_); }
8987
#endif
9088

9189
DEVICE ALWAYS_INLINE char& operator[](const unsigned int index) {
9290
return index < size_ ? ptr_[index] : ptr_[size_ - 1];
9391
}
94-
DEVICE ALWAYS_INLINE operator char*() const {
95-
return ptr_;
96-
}
97-
DEVICE ALWAYS_INLINE int64_t size() const {
98-
return size_;
99-
}
100-
DEVICE ALWAYS_INLINE bool isNull() const {
101-
return size_ == 0;
102-
}
92+
DEVICE ALWAYS_INLINE operator char*() const { return ptr_; }
93+
DEVICE ALWAYS_INLINE int64_t size() const { return size_; }
94+
DEVICE ALWAYS_INLINE bool isNull() const { return size_ == 0; }
10395
};
10496

10597
#ifdef __CUDACC__
@@ -128,16 +120,10 @@ struct Column {
128120
}
129121
return ptr_[index];
130122
}
131-
DEVICE int64_t size() const {
132-
return size_;
133-
}
123+
DEVICE int64_t size() const { return size_; }
134124

135-
DEVICE inline bool isNull(int64_t index) const {
136-
return is_null(ptr_[index]);
137-
}
138-
DEVICE inline void setNull(int64_t index) {
139-
set_null(ptr_[index]);
140-
}
125+
DEVICE inline bool isNull(int64_t index) const { return is_null(ptr_[index]); }
126+
DEVICE inline void setNull(int64_t index) { set_null(ptr_[index]); }
141127
DEVICE Column<T>& operator=(const Column<T>& other) {
142128
#ifndef __CUDACC__
143129
if (size() == other.size()) {

0 commit comments

Comments
 (0)