Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit cc1a693

Browse files
committed
Rebase fix
1 parent 3f4f54d commit cc1a693

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

src/codegen/codegen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ uint64_t CodeGen::SizeOf(llvm::Type *type) const {
284284
}
285285

286286
uint64_t CodeGen::ElementOffset(llvm::Type *type, uint32_t element_idx) const {
287-
PL_ASSERT(llvm::isa<llvm::StructType>(type));
287+
PELOTON_ASSERT(llvm::isa<llvm::StructType>(type));
288288
auto &data_layout = code_context_.GetDataLayout();
289289

290290
auto *struct_layout =

src/codegen/pipeline.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ PipelineContext::PipelineContext(Pipeline &pipeline)
7878

7979
PipelineContext::Id PipelineContext::RegisterState(std::string name,
8080
llvm::Type *type) {
81-
PL_ASSERT(thread_state_type_ == nullptr);
81+
PELOTON_ASSERT(thread_state_type_ == nullptr);
8282
if (thread_state_type_ != nullptr) {
8383
throw Exception{"Cannot register thread state after finalization"};
8484
}
8585

86-
PL_ASSERT(state_components_.size() < std::numeric_limits<uint8_t>::max());
86+
PELOTON_ASSERT(state_components_.size() <
87+
std::numeric_limits<uint8_t>::max());
8788
auto slot = static_cast<uint8_t>(state_components_.size());
8889
state_components_.emplace_back(name, type);
8990
return slot;
@@ -111,7 +112,7 @@ void PipelineContext::FinalizeState(CodeGen &codegen) {
111112

112113
llvm::Value *PipelineContext::AccessThreadState(
113114
UNUSED_ATTRIBUTE CodeGen &codegen) const {
114-
PL_ASSERT(thread_state_ != nullptr);
115+
PELOTON_ASSERT(thread_state_ != nullptr);
115116
return thread_state_;
116117
}
117118

@@ -120,8 +121,8 @@ llvm::Value *PipelineContext::LoadFlag(CodeGen &codegen) const {
120121
}
121122

122123
void PipelineContext::StoreFlag(CodeGen &codegen, llvm::Value *flag) const {
123-
PL_ASSERT(flag->getType()->isIntegerTy(1) &&
124-
flag->getType() == codegen.BoolType());
124+
PELOTON_ASSERT(flag->getType()->isIntegerTy(1) &&
125+
flag->getType() == codegen.BoolType());
125126
auto *flag_ptr = LoadStatePtr(codegen, init_flag_id_);
126127
codegen->CreateStore(flag, flag_ptr);
127128
}
@@ -183,7 +184,7 @@ void Pipeline::Add(OperatorTranslator *translator, Parallelism parallelism) {
183184

184185
void Pipeline::MarkSource(OperatorTranslator *translator,
185186
Pipeline::Parallelism parallelism) {
186-
PL_ASSERT(translator == pipeline_.back());
187+
PELOTON_ASSERT(translator == pipeline_.back());
187188

188189
// Check parallel execution settings
189190
bool parallel_exec_disabled = !settings::SettingsManager::GetBool(
@@ -240,7 +241,7 @@ const OperatorTranslator *Pipeline::NextStep() {
240241
void Pipeline::InstallStageBoundary(
241242
UNUSED_ATTRIBUTE const OperatorTranslator *translator) {
242243
// Validate the assumption
243-
PL_ASSERT(pipeline_[pipeline_index_] == translator);
244+
PELOTON_ASSERT(pipeline_[pipeline_index_] == translator);
244245
stage_boundaries_.push_back(pipeline_index_ + 1);
245246
}
246247

@@ -409,7 +410,7 @@ void Pipeline::RunParallel(
409410
const std::vector<llvm::Type *> &pipeline_args_types,
410411
const std::function<void(ConsumerContext &,
411412
const std::vector<llvm::Value *> &)> &body) {
412-
PL_ASSERT(IsParallel());
413+
PELOTON_ASSERT(IsParallel());
413414
Run(dispatch_func, dispatch_args, pipeline_args_types, body);
414415
}
415416

src/codegen/util/buffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void Buffer::MakeRoomForBytes(uint64_t num_bytes) {
6868
uint64_t curr_used_size = UsedSpace();
6969

7070
// Ensure the current size is a power of two
71-
PL_ASSERT(curr_alloc_size % 2 == 0);
71+
PELOTON_ASSERT(curr_alloc_size % 2 == 0);
7272

7373
// Allocate double the buffer room
7474
uint64_t next_alloc_size = curr_alloc_size;
@@ -83,7 +83,7 @@ void Buffer::MakeRoomForBytes(uint64_t num_bytes) {
8383
backend_manager.Allocate(BackendType::MM, next_alloc_size));
8484

8585
// Now copy the previous buffer into the new area
86-
PL_MEMCPY(new_buffer, buffer_start_, curr_used_size);
86+
PELOTON_MEMCPY(new_buffer, buffer_start_, curr_used_size);
8787

8888
// Set pointers
8989
char *old_buffer_start = buffer_start_;

src/executor/executor_context.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ void ExecutorContext::ThreadStates::Reset(const uint32_t state_size) {
7272
}
7373

7474
void ExecutorContext::ThreadStates::Allocate(const uint32_t num_threads) {
75-
PL_ASSERT(state_size_ > 0);
76-
PL_ASSERT(states_ == nullptr);
75+
PELOTON_ASSERT(state_size_ > 0);
76+
PELOTON_ASSERT(states_ == nullptr);
7777
num_threads_ = num_threads;
7878
uint32_t alloc_size = num_threads_ * state_size_;
7979
states_ = reinterpret_cast<char *>(pool_.Allocate(alloc_size));
80-
PL_MEMSET(states_, 0, alloc_size);
80+
PELOTON_MEMSET(states_, 0, alloc_size);
8181
}
8282

8383
char *ExecutorContext::ThreadStates::AccessThreadState(
8484
const uint32_t thread_id) const {
85-
PL_ASSERT(state_size_ > 0);
86-
PL_ASSERT(states_ != nullptr);
87-
PL_ASSERT(thread_id < num_threads_);
85+
PELOTON_ASSERT(state_size_ > 0);
86+
PELOTON_ASSERT(states_ != nullptr);
87+
PELOTON_ASSERT(thread_id < num_threads_);
8888
return states_ + (thread_id * state_size_);
8989
}
9090

src/include/threadpool/mono_queue_pool.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ inline MonoQueuePool &MonoQueuePool::GetInstance() {
9090
int32_t worker_pool_size = settings::SettingsManager::GetInt(
9191
settings::SettingId::monoqueue_worker_pool_size);
9292

93-
PL_ASSERT(task_queue_size > 0);
94-
PL_ASSERT(worker_pool_size > 0);
93+
PELOTON_ASSERT(task_queue_size > 0);
94+
PELOTON_ASSERT(worker_pool_size > 0);
9595

9696
std::string name = "main-pool";
9797

@@ -107,8 +107,8 @@ inline MonoQueuePool &MonoQueuePool::GetBrainInstance() {
107107
int32_t worker_pool_size = settings::SettingsManager::GetInt(
108108
settings::SettingId::brain_worker_pool_size);
109109

110-
PL_ASSERT(task_queue_size > 0);
111-
PL_ASSERT(worker_pool_size > 0);
110+
PELOTON_ASSERT(task_queue_size > 0);
111+
PELOTON_ASSERT(worker_pool_size > 0);
112112

113113
std::string name = "brain-pool";
114114

@@ -124,8 +124,8 @@ inline MonoQueuePool &MonoQueuePool::GetExecutionInstance(){
124124
int32_t worker_pool_size = settings::SettingsManager::GetInt(
125125
settings::SettingId::monoqueue_worker_pool_size);
126126

127-
PL_ASSERT(task_queue_size > 0);
128-
PL_ASSERT(worker_pool_size > 0);
127+
PELOTON_ASSERT(task_queue_size > 0);
128+
PELOTON_ASSERT(worker_pool_size > 0);
129129

130130
std::string name = "executor-pool";
131131

0 commit comments

Comments
 (0)