From fd4cd4bbc4b76244b4a5011d925b0e8bfc9ab0a1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 17 Dec 2022 21:58:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- taichi/rhi/impl_support.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/taichi/rhi/impl_support.h b/taichi/rhi/impl_support.h index 25e7ef68cfcf2..ae8dbdffdf224 100644 --- a/taichi/rhi/impl_support.h +++ b/taichi/rhi/impl_support.h @@ -95,12 +95,12 @@ struct BidirMap { template class SyncedPtrStableObjectList { using storage_block = std::array; - + public: template T &acquire(Params &&...args) { std::lock_guard _(lock_); - + void *storage = nullptr; if (free_nodes_.empty()) { storage = objects_.emplace_front().data(); @@ -113,14 +113,14 @@ class SyncedPtrStableObjectList { void release(T *ptr) { std::lock_guard _(lock_); - + ptr->~T(); free_nodes_.push_back(ptr); } void clear() { std::lock_guard _(lock_); - + // Transfer to quick look-up std::unordered_set free_nodes_set(free_nodes_.begin(), free_nodes_.end());