Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 10, 2022
1 parent 3dddae8 commit 622617a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions taichi/ir/statements.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,11 @@ class PtrOffsetStmt : public Stmt {

bool is_local_ptr() const {
if (origin->is<AllocaStmt>() || origin->is<GlobalTemporaryStmt>()) {
auto is_tensor_type = origin->ret_type->is<PointerType>() ?
origin->ret_type->cast<PointerType>()->get_pointee_type()->is<TensorType>() :
origin->ret_type->is<TensorType>();
auto is_tensor_type = origin->ret_type->is<PointerType>()
? origin->ret_type->cast<PointerType>()
->get_pointee_type()
->is<TensorType>()
: origin->ret_type->is<TensorType>();
TI_ASSERT_INFO(is_tensor_type,
"PtrOffsetStmt can only be used for Alloca (TensorType).");
}
Expand Down

0 comments on commit 622617a

Please sign in to comment.