waLBerla 7.2
Loading...
Searching...
No Matches
Uint.h File Reference

Detailed Description

#include "core/Abort.h"
#include "core/DataTypes.h"
#include "core/debug/Debug.h"
#include <type_traits>

Classes

struct  walberla::math::uintFromBitWidth< 8 >
 
struct  walberla::math::uintFromBitWidth< 16 >
 
struct  walberla::math::uintFromBitWidth< 32 >
 
struct  walberla::math::uintFromBitWidth< 64 >
 
struct  walberla::math::leastUnsignedInteger< minSize >
 Provides the smallest unsigned integer type that has at least minSize bits. More...
 

Namespaces

namespace  walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
 
namespace  walberla::math
 

Macros

#define msbLT(n)   n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n
 

Functions

template<typename UINT >
bool walberla::math::uintIsEven (const UINT value)
 Returns true only if 'value' is an even number.
 
template<typename UINT >
bool walberla::math::uintIsPowerOfTwo (const UINT value)
 Returns true only if 'value' (must be an unsigned integer) is a power of 2 (http://graphics.stanford.edu/~seander/bithacks.html)
 
template<typename UINT >
UINT walberla::math::uintPow2 (const UINT exp)
 Returns the result of 2^exp.
 
template<typename UINT >
UINT walberla::math::uintPow4 (UINT exp)
 Returns the result of 4^exp.
 
template<typename UINT >
UINT walberla::math::uintPow8 (UINT exp)
 Returns the result of 8^exp.
 
template<typename UINT >
UINT walberla::math::uintPow16 (UINT exp)
 Returns the result of 16^exp.
 
template<typename UINT >
uint_t walberla::math::uintMSBPosition (UINT value)
 Calculation of the position of the most significant bit of a variable of type UINT.
 
template<>
uint_t walberla::math::uintMSBPosition< uint64_t > (uint64_t value)
 
template<>
uint_t walberla::math::uintMSBPosition< uint32_t > (uint32_t value)
 
template<>
uint_t walberla::math::uintMSBPosition< uint16_t > (uint16_t value)
 
template<>
uint_t walberla::math::uintMSBPosition< uint8_t > (uint8_t value)
 
constexpr uint_t walberla::math::leastUnsignedIntegerBitWidth (uint_t width)
 

Variables

static const std::array< uint8_t, 256 > walberla::math::msbLookupTable
 

Macro Definition Documentation

◆ msbLT

#define msbLT ( n)    n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n