Classes | Enumerations | Functions | Variables
IceCore Namespace Reference

Classes

class  BasicRandom
 
class  Container
 
struct  Pair
 A generic couple structure. More...
 
class  Pairs
 
class  RadixSort
 

Enumerations

enum  FindMode { FIND_CLAMP, FIND_WRAP, FIND_FORCE_DWORD = 0x7fffffff }
 
enum  RadixHint { RADIX_SIGNED, RADIX_UNSIGNED, RADIX_FORCE_DWORD = 0x7fffffff }
 

Functions

inline_ void _prefetch (void const *ptr)
 
inline_ udword abs_ (sdword x)
 Alternative min function. More...
 
FUNCTION ICECORE_API udword Alignment (udword address)
 
inline_ int ClampToInt16 (int x)
 
inline_ void Compute2DCoords (udword &u, udword &v, udword i, udword nbu)
 
inline_ void Compute3DCoords (udword &u, udword &v, udword &w, udword i, udword nbu, udword nbu_nbv)
 
inline_ udword CountBits (udword n)
 Count the number of '1' bits in a 32 bit word (from Steve Baker's Cute Code Collection) More...
 
inline_ udword CountBits2 (udword bits)
 Even faster? More...
 
inline_ float FeedbackFilter (float val, float &memory, float sharpness)
 
ICECORE_API udword GetRandomIndex (udword max_index)
 Returns a random index so that 0<= index < max_index. More...
 
inline_ BOOL HasNullByte (udword x)
 
inline_ bool IsPowerOfTwo (udword n)
 Test to see if a number is an exact power of two (from Steve Baker's Cute Code Collection) More...
 
inline_ char LittleEndian ()
 Alternative abs function. More...
 
inline_ udword LowestOneBit (udword w)
 
inline_ sdword min_ (sdword a, sdword b)
 
inline_ udword msb32 (udword x)
 
inline_ udword nlpo2 (udword x)
 
FUNCTION ICECORE_API udword Rand ()
 
inline_ void ReverseBits (udword &n)
 
inline_ void SetLeastNBits (udword &x, udword n)
 Set the least significant N bits in a word. (from Steve Baker's Cute Code Collection) More...
 
inline_ void SpreadBits (udword &n)
 
FUNCTION ICECORE_API void SRand (udword seed)
 
*inline_ void Swap (udword &x, udword &y)
 
template<class Type >
inline_ Type TClamp (const Type &x, const Type &lo, const Type &hi)
 
template<class Type >
inline_ void TSort (Type &a, Type &b)
 
template<class Type >
inline_ void TSort (Type &a, Type &b, Type &c)
 
template<class Type >
inline_ void TSwap (Type &a, Type &b)
 
inline_ float UnitRandomFloat ()
 Returns a unit random floating-point value. More...
 
inline_ void ZeroLeastSetBit (udword &n)
 Zero the least significant '1' bit in a word. (from Steve Baker's Cute Code Collection) More...
 

Variables

x = y
 
y = x
 

Enumeration Type Documentation

Enumerator
FIND_CLAMP 
FIND_WRAP 
FIND_FORCE_DWORD 

Definition at line 18 of file OPC_IceHook.h.

Enumerator
RADIX_SIGNED 

Input values are signed.

RADIX_UNSIGNED 

Input values are unsigned.

RADIX_FORCE_DWORD 

Definition at line 19 of file OPC_IceHook.h.

Function Documentation

inline_ void IceCore::_prefetch ( void const ptr)

Definition at line 224 of file OPC_IceHook.h.

inline_ udword IceCore::abs_ ( sdword  x)

Alternative min function.

Definition at line 119 of file OPC_IceHook.h.

udword IceCore::Alignment ( udword  address)

Definition at line 24 of file IceUtils.cpp.

inline_ int IceCore::ClampToInt16 ( int  x)

If you can guarantee that your input domain (i.e. value of x) is slightly limited (abs(x) must be < ((1<<31u)-32767)), then you can use the following code to clamp the resulting value into [-32768,+32767] range:

Definition at line 172 of file OPC_IceHook.h.

inline_ void IceCore::Compute2DCoords ( udword u,
udword v,
udword  i,
udword  nbu 
)

Definition at line 239 of file OPC_IceHook.h.

inline_ void IceCore::Compute3DCoords ( udword u,
udword v,
udword w,
udword  i,
udword  nbu,
udword  nbu_nbv 
)

Definition at line 251 of file OPC_IceHook.h.

inline_ udword IceCore::CountBits ( udword  n)

Count the number of '1' bits in a 32 bit word (from Steve Baker's Cute Code Collection)

Definition at line 33 of file OPC_IceHook.h.

inline_ udword IceCore::CountBits2 ( udword  bits)

Even faster?

Definition at line 50 of file OPC_IceHook.h.

inline_ float IceCore::FeedbackFilter ( float  val,
float &  memory,
float  sharpness 
)

Definition at line 161 of file OPC_IceHook.h.

udword IceCore::GetRandomIndex ( udword  max_index)

Returns a random index so that 0<= index < max_index.

Definition at line 29 of file IceRandom.cpp.

inline_ BOOL IceCore::HasNullByte ( udword  x)

Definition at line 125 of file OPC_IceHook.h.

inline_ bool IceCore::IsPowerOfTwo ( udword  n)

Test to see if a number is an exact power of two (from Steve Baker's Cute Code Collection)

Definition at line 88 of file OPC_IceHook.h.

inline_ char IceCore::LittleEndian ( )

Alternative abs function.

Little/Big endian (from Steve Baker's Cute Code Collection)

Extra comments by Kenny Hoff: Determines the byte-ordering of the current machine (little or big endian) by setting an integer value to 1 (so least significant bit is now 1); take the address of the int and cast to a byte pointer (treat integer as an array of four bytes); check the value of the first byte (must be 0 or 1). If the value is 1, then the first byte least significant byte and this implies LITTLE endian. If the value is 0, the first byte is the most significant byte, BIG endian. Examples: integer 1 on BIG endian: 00000000 00000000 00000000 00000001

integer 1 on LITTLE endian: 00000001 00000000 00000000 00000000

int IsLittleEndian() { int x=1; return ( ((char*)(&x))[0] ); }

Definition at line 116 of file OPC_IceHook.h.

inline_ udword IceCore::LowestOneBit ( udword  w)

Definition at line 128 of file OPC_IceHook.h.

inline_ sdword IceCore::min_ ( sdword  a,
sdword  b 
)

Definition at line 122 of file OPC_IceHook.h.

inline_ udword IceCore::msb32 ( udword  x)

Definition at line 137 of file OPC_IceHook.h.

inline_ udword IceCore::nlpo2 ( udword  x)

Definition at line 77 of file OPC_IceHook.h.

udword IceCore::Rand ( )

Definition at line 21 of file IceRandom.cpp.

inline_ void IceCore::ReverseBits ( udword n)

Reverse all the bits in a 32 bit word (from Steve Baker's Cute Code Collection) (each line can be done in any order.

Definition at line 21 of file OPC_IceHook.h.

inline_ void IceCore::SetLeastNBits ( udword x,
udword  n 
)

Set the least significant N bits in a word. (from Steve Baker's Cute Code Collection)

Definition at line 94 of file OPC_IceHook.h.

inline_ void IceCore::SpreadBits ( udword n)

Spread out bits. EG 00001111 -> 0101010101 00001010 -> 0100010000 This is used to interleve to intergers to produce a `Morten Key' used in Space Filling Curves (See DrDobbs Journal, July 1999) Order is important.

Definition at line 63 of file OPC_IceHook.h.

void IceCore::SRand ( udword  seed)

Definition at line 16 of file IceRandom.cpp.

* inline_ void IceCore::Swap ( udword x,
udword y 
)

Definition at line 100 of file OPC_IceHook.h.

template<class Type >
inline_ Type IceCore::TClamp ( const Type &  x,
const Type &  lo,
const Type &  hi 
)

Definition at line 185 of file OPC_IceHook.h.

template<class Type >
inline_ void IceCore::TSort ( Type &  a,
Type &  b 
)

Definition at line 187 of file OPC_IceHook.h.

template<class Type >
inline_ void IceCore::TSort ( Type &  a,
Type &  b,
Type &  c 
)

Definition at line 192 of file OPC_IceHook.h.

template<class Type >
inline_ void IceCore::TSwap ( Type &  a,
Type &  b 
)

Definition at line 184 of file OPC_IceHook.h.

inline_ float IceCore::UnitRandomFloat ( )

Returns a unit random floating-point value.

Definition at line 20 of file OPC_IceHook.h.

inline_ void IceCore::ZeroLeastSetBit ( udword n)

Zero the least significant '1' bit in a word. (from Steve Baker's Cute Code Collection)

Definition at line 91 of file OPC_IceHook.h.

Variable Documentation

* IceCore::x = y

Definition at line 99 of file OPC_IceHook.h.

* IceCore::y = x

Classic XOR swap (from Steve Baker's Cute Code Collection) x ^= y; /* x' = (x^y)

Definition at line 98 of file OPC_IceHook.h.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:45