Jlm
Loading...
Searching...
No Matches
Namespaces | Functions
Math.hpp File Reference
#include <jlm/util/common.hpp>
#include <cstdint>
#include <type_traits>
Include dependency graph for Math.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  jlm
 
namespace  jlm::util
 

Functions

template<class T >
static constexpr int jlm::util::log2Floor (T value)
 
template<class T >
static constexpr T jlm::util::RoundUpToPowerOf2 (T value)
 
template<class T >
static constexpr T jlm::util::RoundUpToMultipleOf (T value, T multiple)
 
template<class T >
static constexpr int jlm::util::BitsRequiredToRepresent (T value)
 
template<class T >
static constexpr int jlm::util::BitWidthOfEnum (T endValue)
 
int64_t jlm::util::truncateAndSignExtend (int64_t value, uint64_t keepBits)
 
int64_t jlm::util::truncateAndZeroExtend (int64_t value, uint64_t keepBits)