Skip to content

Commit

Permalink
Merge branch 'develop' into task/chen59/valopinterface
Browse files Browse the repository at this point in the history
  • Loading branch information
rchen20 committed Sep 19, 2024
2 parents 81ee963 + 9031106 commit 96cb30b
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 96cb30b

Please sign in to comment.