Skip to content

Commit

Permalink
Remove debug assert from constexpr init
Browse files Browse the repository at this point in the history
  • Loading branch information
ahendriksen committed Aug 31, 2023
1 parent ec483b2 commit 327f44b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcudacxx/include/cuda/std/detail/libcxx/include/barrier
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ private:
static _LIBCUDACXX_INLINE_VISIBILITY constexpr
uint64_t __init(ptrdiff_t __count) noexcept
{
_LIBCUDACXX_DEBUG_ASSERT(__count >= 0, "");
// We would like to assert that __count >= 0 in debug mode, but this
// fails to compile due to constexpr.

return (((1u << 31) - __count) << 32)
| ((1u << 31) - __count);
Expand Down

0 comments on commit 327f44b

Please sign in to comment.