File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525
2626#include " static_assert.hpp"
2727#include < boost/type_traits.hpp>
28- #include < limits >
28+ #include < climits >
2929
3030namespace PMacc {
3131
@@ -48,7 +48,7 @@ reverseBits(T value)
4848 /* init with value (to get LSB) */
4949 T result = value;
5050 /* extra shift needed at end */
51- int s = std::numeric_limits<T>::digits - 1 ;
51+ int s = sizeof (T) * CHAR_BIT - 1 ;
5252 for (value >>= 1 ; value; value >>= 1 )
5353 {
5454 result <<= 1 ;
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ namespace mpi
6868 /* localSeed often contains a counted number, so we rotate it by some bits to not "destroy"
6969 * the counted rank that is already there. Also it is not reversed to get a different pattern
7070 */
71- localSeed = (localSeed << 16 ) | (localSeed >> (std::numeric_limits< uint32_t >::digits - 16 ));
71+ localSeed = (localSeed << 16 ) | (localSeed >> (sizeof ( uint32_t ) * CHAR_BIT - 16 ));
7272 globalUniqueSeed ^= localSeed;
7373 /* For any globally constant localSeed globalUniqueSeed is now guaranteed
7474 * to be globally unique
You can’t perform that action at this time.
0 commit comments