Skip to content

Commit

Permalink
Fix nvcc warning about missing return statement (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartoonist authored Mar 11, 2024
1 parent 67c2461 commit 50fa648
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions parallel_hashmap/phmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ uint32_t TrailingZeros(T x) {
return base_internal::CountTrailingZerosNonZero64(static_cast<uint64_t>(x));
else
return base_internal::CountTrailingZerosNonZero32(static_cast<uint32_t>(x));
PHMAP_BUILTIN_UNREACHABLE();
}

// --------------------------------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions parallel_hashmap/phmap_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,15 @@
#define PHMAP_IF_CONSTEXPR(expr) if ((expr))
#endif

// ----------------------------------------------------------------------
// builtin unreachable
// ----------------------------------------------------------------------
#if PHMAP_HAVE_BUILTIN(__builtin_unreachable)
#define PHMAP_BUILTIN_UNREACHABLE() __builtin_unreachable()
#else
#define PHMAP_BUILTIN_UNREACHABLE() (void)0
#endif

// ----------------------------------------------------------------------
// base/macros.h
// ----------------------------------------------------------------------
Expand Down

0 comments on commit 50fa648

Please sign in to comment.