gem5  v20.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
intmath.hh File Reference
#include <cassert>
#include <cstdint>
#include <type_traits>
#include "base/logging.hh"
#include "base/types.hh"

Go to the source code of this file.

Functions

uint64_t power (uint32_t n, uint32_t e)
 
template<class T >
std::enable_if< std::is_integral< T >::value, int >::type floorLog2 (T x)
 
template<class T >
int ceilLog2 (const T &n)
 
template<class T >
bool isPowerOf2 (const T &n)
 
template<class T , class U >
divCeil (const T &a, const U &b)
 
template<class T , class U >
roundUp (const T &val, const U &align)
 This function is used to align addresses in memory. More...
 
template<class T , class U >
roundDown (const T &val, const U &align)
 This function is used to align addresses in memory. More...
 

Function Documentation

◆ ceilLog2()

template<class T >
int ceilLog2 ( const T &  n)
inline

◆ divCeil()

template<class T , class U >
T divCeil ( const T &  a,
const U &  b 
)
inline

◆ floorLog2()

template<class T >
std::enable_if<std::is_integral<T>::value, int>::type floorLog2 ( x)
inline

◆ isPowerOf2()

template<class T >
bool isPowerOf2 ( const T &  n)
inline

◆ power()

uint64_t power ( uint32_t  n,
uint32_t  e 
)
inline

◆ roundDown()

template<class T , class U >
T roundDown ( const T &  val,
const U &  align 
)
inline

◆ roundUp()

template<class T , class U >
T roundUp ( const T &  val,
const U &  align 
)
inline

Generated on Thu May 28 2020 16:21:39 for gem5 by doxygen 1.8.13