Using these functions can seriously improve the speed of your code. You should also check out FX::Maths for SIMD optimised maths.
Functions | |
void | FX::fxprefetchmemT (const void *ptr) throw () |
void | FX::fxprefetchmemNT (const void *ptr) throw () |
FXuint | FX::fxbitscan (FXuint x) throw () |
FXuint | FX::fxbitscanrev (FXuint x) throw () |
void | FX::fxendianswap (FXushort &v) throw () |
void | FX::fxendianswap (FXuint &v) throw () |
void | FX::fxendianswap (FXulong &v) throw () |
void FX::fxprefetchmemT | ( | const void * | ptr | ) | throw () [inline] |
Pretches a cache line into the processor cache temporally (ie; it will be used multiple times)
void FX::fxprefetchmemNT | ( | const void * | ptr | ) | throw () [inline] |
Pretches a cache line into the processor cache non-temporally (ie; it will be used only once)
FXuint FX::fxbitscan | ( | FXuint | x | ) | throw () [inline] |
Forward scans an unsigned integer, returning the index of the first set bit. Compiles into 21 x86 cycles with no branching, though on x86 and x64 it directly uses the bsl instruction
References FX::fxbitscan().
Referenced by FX::TnFXSQLDBColumn::effectiveType(), and FX::fxbitscan().
FXuint FX::fxbitscanrev | ( | FXuint | x | ) | throw () [inline] |
Backward scans an unsigned integer, returning the index of the first set bit. Compiles into roughly 24 x86 cycles with no branching, though on x86 and x64 it directly uses the bsr instruction. You should note that this implementation uses illegal C++ which may fail with aggressive enough optimisation - in this situation, enable the alternative 36 x86 cycle implementation in the source code.
References FX::fxbitscanrev().
Referenced by FX::fxbitscanrev().
void FX::fxendianswap | ( | FXushort & | v | ) | throw () [inline] |
Endian swaps the two bytes at v
void FX::fxendianswap | ( | FXuint & | v | ) | throw () [inline] |
Endian swaps the four bytes at v
void FX::fxendianswap | ( | FXulong & | v | ) | throw () [inline] |
Endian swaps the eight bytes at v