lat::BitOpsMortonExtract< B > Struct Template Reference
Merge even bits of n to the right end of the result value.
More...
#include <Iguana/Utilities/classlib/utils/BitOps.h>
Detailed Description
template<unsigned int B>
struct lat::BitOpsMortonExtract< B >
Merge even bits of n to the right end of the result value.
This operation undoes mortonInterleave. To decompose a Morton sequence number n to its components x and y, do x = mortonExtract (n); y = mortonExtract (n >> 1).
Each operation moves a chunk of B bits closer to its neighbours by a step of B bits, reversing mortonInterleave---like this:
- x7x6 x5x4 x3x2 x1x0 => (B = 1, pattern = 0x55555555)
- oo76 oo54 oo32 oo10 => (B = 2, pattern = 0x33333333)
- oooo 7654 oooo 3210 => (B = 4, pattern = 0x0f0f0f0f)
- oooo oooo 7654 3210.
Definition at line 358 of file BitOps.h.
The documentation for this struct was generated from the following file:
- Iguana/Utilities/classlib/utils/BitOps.h
Generated on Tue Jun 9 18:48:21 2009 for CMSSW by
1.5.4