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.
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)
inline_ udword CountBits2 (udword bits)
 Even faster?
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.
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)
inline_ char LittleEndian ()
 Alternative abs function.
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)
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.
inline_ void ZeroLeastSetBit (udword &n)
 Zero the least significant '1' bit in a word. (from Steve Baker's Cute Code Collection)

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

Definition at line 224 of file OPC_IceHook.h.

Alternative min function.

Definition at line 119 of file OPC_IceHook.h.

Definition at line 24 of file IceUtils.cpp.

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.

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.

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.

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.

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

Definition at line 29 of file IceRandom.cpp.

Definition at line 125 of file OPC_IceHook.h.

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.

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.

Definition at line 128 of file OPC_IceHook.h.

Definition at line 122 of file OPC_IceHook.h.

Definition at line 137 of file OPC_IceHook.h.

Definition at line 77 of file OPC_IceHook.h.

Definition at line 21 of file IceRandom.cpp.

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.

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.

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.

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.

Returns a unit random floating-point value.

Definition at line 20 of file OPC_IceHook.h.

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

Definition at line 99 of file OPC_IceHook.h.

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 Sun Apr 2 2017 03:44:02