Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoguochun1995 committed Apr 9, 2024
1 parent f277255 commit 13d7299
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ class AsyncResourcePoolImpl : public AsyncResourcePool<T> {
public:
void add(const T& t, std::deque<DIPUEvent>& events) override {
std::lock_guard<mutex_t> lk(mutex_);
if (events.size() > 0) {
list_.emplace_back(t, std::move(events));
} else {
list_.emplace_front(t, std::move(events));
}
list_.emplace_back(t, std::move(events));
}

T get() override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
namespace dipu {

// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
const size_t kMaxExtendSize =
get_env_or_default("DIPU_MAX_EXTEND_SIZE", 1024 << 20U);
const size_t kMaxExtendSize = get_env_or_default("DIPU_MAX_EXTEND_SIZE", 1024)
<< 20U;

class BFCachingAllocatorImpl {
public:
Expand Down

0 comments on commit 13d7299

Please sign in to comment.