Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into more-assume
Browse files Browse the repository at this point in the history
  • Loading branch information
fthaler committed Jun 24, 2024
2 parents a41776a + f489c51 commit c0e7999
Show file tree
Hide file tree
Showing 7 changed files with 86,928 additions and 86,071 deletions.
3 changes: 2 additions & 1 deletion include/gridtools/fn/unstructured.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ namespace gridtools::fn {
int m_index;
};

/// gnu::pure attribute is necessary to enable __builtin_assume() optimization with Clang
template <class Tag, class Ptr, class Strides, class Domain>
GT_FUNCTION constexpr bool can_deref(iterator<Tag, Ptr, Strides, Domain> const &it) {
[[gnu::pure]] GT_FUNCTION constexpr bool can_deref(iterator<Tag, Ptr, Strides, Domain> const &it) {
return it.m_index != -1;
}

Expand Down
Loading

0 comments on commit c0e7999

Please sign in to comment.