Skip to content

Commit

Permalink
Merge branch 'develop' into artv3/raja-view-slowdown
Browse files Browse the repository at this point in the history
  • Loading branch information
artv3 committed Sep 17, 2024
2 parents f54bcc1 + 9031106 commit 6d3a12e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/RAJA/util/math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ constexpr T log2(T n) noexcept
*/
template < typename T,
std::enable_if_t<std::is_integral<T>::value>* = nullptr >
RAJA_HOST_DEVICE
RAJA_HOST_DEVICE RAJA_INLINE
constexpr T next_pow2(T n) noexcept
{
--n;
Expand All @@ -81,7 +81,7 @@ constexpr T next_pow2(T n) noexcept
*/
template < typename T,
std::enable_if_t<std::is_integral<T>::value>* = nullptr >
RAJA_HOST_DEVICE
RAJA_HOST_DEVICE RAJA_INLINE
constexpr T prev_pow2(T n) noexcept
{
if ( n < 0 ) return 0;
Expand All @@ -96,6 +96,7 @@ constexpr T prev_pow2(T n) noexcept
*/
template < typename L, typename R,
std::enable_if_t<std::is_integral<L>::value && std::is_integral<R>::value>* = nullptr >
RAJA_HOST_DEVICE RAJA_INLINE
constexpr auto power_of_2_mod(L lhs, R rhs) noexcept
{
return lhs & (rhs-R(1));
Expand Down

0 comments on commit 6d3a12e

Please sign in to comment.