From e93e357762d3731fcf631c7f715717200306a856 Mon Sep 17 00:00:00 2001 From: Ye Kuang Date: Mon, 31 May 2021 17:52:53 +0800 Subject: [PATCH] fix fmt --- taichi/ir/ir_builder.h | 1 + taichi/program/program.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/taichi/ir/ir_builder.h b/taichi/ir/ir_builder.h index 56ef41497f4023..3a6cb7526bfd46 100644 --- a/taichi/ir/ir_builder.h +++ b/taichi/ir/ir_builder.h @@ -93,6 +93,7 @@ class IRBuilder { [[nodiscard]] LoopGuard get_loop_guard(XStmt *loop) { return LoopGuard(*this, loop); } + [[nodiscard]] IfGuard get_if_guard(IfStmt *if_stmt, bool true_branch) { return IfGuard(*this, if_stmt, true_branch); } diff --git a/taichi/program/program.h b/taichi/program/program.h index d852a32065f45f..d283f37c82f422 100644 --- a/taichi/program/program.h +++ b/taichi/program/program.h @@ -60,8 +60,8 @@ TLANG_NAMESPACE_END namespace std { template <> struct hash { - std::size_t operator()( - taichi::lang::JITEvaluatorId const &id) const noexcept { + std::size_t operator()(taichi::lang::JITEvaluatorId const &id) const + noexcept { return ((std::size_t)id.op | (id.ret.hash() << 8) | (id.lhs.hash() << 16) | (id.rhs.hash() << 24) | ((std::size_t)id.is_binary << 31)) ^ (std::hash{}(id.thread_id) << 32);