Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch committed May 15, 2020
1 parent d10ad01 commit 7e3be80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
16 changes: 5 additions & 11 deletions src/runtime/micro/target_data_layout_encoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace tvm {
namespace runtime {

TargetDataLayoutEncoder::Alloc::Alloc(TargetDataLayoutEncoder* parent, size_t start_offset,
size_t size, TargetPtr start_addr)
size_t size, TargetPtr start_addr)
: parent_(parent),
start_offset_(start_offset),
curr_offset_(0),
Expand All @@ -44,20 +44,14 @@ TargetDataLayoutEncoder::Alloc::~Alloc() {
}

void TargetDataLayoutEncoder::Alloc::CheckUnfilled() {
CHECK(curr_offset_ == size_) << "unwritten space in alloc 0x"
<< std::hex
<< start_addr_.value().uint64()
<< "; curr_offset=0x" << curr_offset_
CHECK(curr_offset_ == size_) << "unwritten space in alloc 0x" << std::hex
<< start_addr_.value().uint64() << "; curr_offset=0x" << curr_offset_
<< ", size=0x" << size_;
}

TargetPtr TargetDataLayoutEncoder::Alloc::start_addr() {
return start_addr_;
}
TargetPtr TargetDataLayoutEncoder::Alloc::start_addr() { return start_addr_; }

size_t TargetDataLayoutEncoder::Alloc::size() {
return size_;
}
size_t TargetDataLayoutEncoder::Alloc::size() { return size_; }

void TargetDataLayoutEncoder::CheckUnfilledAllocs() {
CHECK(live_unchecked_allocs_.size() > 0) << "No allocs to check";
Expand Down
6 changes: 2 additions & 4 deletions src/runtime/micro/target_data_layout_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,8 @@ class TargetDataLayoutEncoder {
CHECK(buf_.size() < capacity_) << "out of space in data encoder";
size_t alloc_start_offset = curr_offset_;
curr_offset_ += size;
class Alloc* alloc = new class Alloc(this,
alloc_start_offset,
size,
start_addr() + alloc_start_offset);
class Alloc* alloc =
new class Alloc(this, alloc_start_offset, size, start_addr() + alloc_start_offset);
return std::unique_ptr<class Alloc>(alloc);
}

Expand Down

0 comments on commit 7e3be80

Please sign in to comment.