MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Macros | Functions
Util.h File Reference
#include "itype.h"
#include "math.h"

Go to the source code of this file.

Data Structures

struct  MFM::_ITypeSizes< MIN_BITS >
 
struct  MFM::_ITypeSizesForNumber< NUMBER >
 
struct  MFM::PickIType_< BITS >
 
struct  MFM::PickIType_< 8 >
 
struct  MFM::PickIType_< 16 >
 
struct  MFM::PickIType_< 32 >
 
struct  MFM::PickIType_< 64 >
 
struct  MFM::UForBits< BITS >
 
struct  MFM::UForNumber< NUMBER >
 

Macros

#define MARK_USED(X)   ((void)(&(X)))
 

Functions

template<const bool mustBeTrue>
void MFM::COMPILATION_REQUIREMENT ()
 
u64 MFM::HexU64 (const u32 hi, const u32 lo)
 
u64 MFM::DecU64 (const u32 billions, const u32 millions)
 
s32 MFM::_SignExtend32 (u32 val, u32 bitwidth)
 
s64 MFM::_SignExtend64 (u64 val, u32 bitwidth)
 
u32 MFM::_GetNOnes32 (u32 bitwidth)
 
u64 MFM::_GetNOnes64 (u32 bitwidth)
 
u32 MFM::_ShiftToBitNumber32 (u32 value, u32 bitpos)
 
u64 MFM::_ShiftToBitNumber64 (u32 value, u32 bitpos)
 
u32 MFM::_ShiftFromBitNumber32 (u32 value, u32 bitpos)
 
u64 MFM::_ShiftFromBitNumber64 (u64 value, u32 bitpos)
 
u32 MFM::_GetMask32 (u32 bitpos, u32 bitwidth)
 
u64 MFM::_GetMask64 (u32 bitpos, u32 bitwidth)
 
u32 MFM::_ExtractField32 (u32 val, u32 bitpos, u32 bitwidth)
 
u32 MFM::_ExtractUint32 (u32 val, u32 bitpos, u32 bitwidth)
 
s32 MFM::_ExtractSint32 (u32 val, u32 bitpos, u32 bitwidth)
 
u32 MFM::_getParity32 (u32 v)
 
u32 MFM::_getNextPowerOf2 (u32 v)
 
u32 MFM::MakeMaskClip (const u32 length)
 
u32 MFM::PopCount (const u32 bits)
 
template<class T >
MFM::MAX (T x, T y)
 
template<class T >
MFM::MIN (T x, T y)
 
template<class T >
MFM::CLAMP (T min, T max, T val)
 
template<class T >
MFM::ABS (T val)
 
template<class T >
double MFM::DISTANCE (T x1, T y1, T x2, T y2)
 
template<u32 BITS>
u32 MFM::PARITY_BITS (u32 value)
 
template<>
u32 MFM::PARITY_BITS< 1 > (u32 value)
 
template<>
u32 MFM::PARITY_BITS< 2 > (u32 value)
 
template<>
u32 MFM::PARITY_BITS< 3 > (u32 value)
 
template<>
u32 MFM::PARITY_BITS< 4 > (u32 value)
 
template<class T >
u32 MFM::PARITY (T value)
 
template<class T >
u32 MFM::ITEM_COUNT (T *array, T item, u32 arrSize)
 
u32 MFM::DigitCount (u32 num, u32 base)
 
void MFM::IntLexEncode (u32 num, char *output)
 
void MFM::Sleep (u32 seconds, u64 nanos)
 

Detailed Description

Globally acessible extension methods

Author
Trent R. Small.
David H. Ackley.
Date
(C) 2014 All rights reserved.
Code License:
LGPL
License Note:
All code samples shown in documentation are placed into the public domain.