Skip to content

Commit 622617a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3dddae8 commit 622617a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

taichi/ir/statements.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,11 @@ class PtrOffsetStmt : public Stmt {
367367

368368
bool is_local_ptr() const {
369369
if (origin->is<AllocaStmt>() || origin->is<GlobalTemporaryStmt>()) {
370-
auto is_tensor_type = origin->ret_type->is<PointerType>() ?
371-
origin->ret_type->cast<PointerType>()->get_pointee_type()->is<TensorType>() :
372-
origin->ret_type->is<TensorType>();
370+
auto is_tensor_type = origin->ret_type->is<PointerType>()
371+
? origin->ret_type->cast<PointerType>()
372+
->get_pointee_type()
373+
->is<TensorType>()
374+
: origin->ret_type->is<TensorType>();
373375
TI_ASSERT_INFO(is_tensor_type,
374376
"PtrOffsetStmt can only be used for Alloca (TensorType).");
375377
}

0 commit comments

Comments
 (0)