Skip to content
Permalink
Browse files

Morton table fits in uint32_t instead of uint64_t (thanks Kristine)

  • Loading branch information...
Forceflow committed Jan 11, 2014
1 parent 847e892 commit 30fc3d61d9db8e1d86ca3add5505b6ea0663814d
Showing with 3 additions and 3 deletions.
  1. +3 −3 mortoncode_tests/morton.h
@@ -46,7 +46,7 @@ inline uint64_t mortonEncode_magicbits(unsigned int x, unsigned int y, unsigned
// VERSION WITH LOOKUP TABLE
// -------------------------

static const uint64_t morton256_x[256] =
static const uint32_t morton256_x[256] =
{
0x00000000,
0x00000001, 0x00000008, 0x00000009, 0x00000040, 0x00000041, 0x00000048, 0x00000049, 0x00000200,
@@ -83,7 +83,7 @@ static const uint64_t morton256_x[256] =
0x00249201, 0x00249208, 0x00249209, 0x00249240, 0x00249241, 0x00249248, 0x00249249
};

static const uint64_t morton256_y[256] = {
static const uint32_t morton256_y[256] = {
0x00000000,
0x00000002, 0x00000010, 0x00000012, 0x00000080, 0x00000082, 0x00000090, 0x00000092, 0x00000400,
0x00000402, 0x00000410, 0x00000412, 0x00000480, 0x00000482, 0x00000490, 0x00000492, 0x00002000,
@@ -119,7 +119,7 @@ static const uint64_t morton256_y[256] = {
0x00492402, 0x00492410, 0x00492412, 0x00492480, 0x00492482, 0x00492490, 0x00492492
};

static const uint64_t morton256_z[256] = {
static const uint32_t morton256_z[256] = {
0x00000000,
0x00000004, 0x00000020, 0x00000024, 0x00000100, 0x00000104, 0x00000120, 0x00000124, 0x00000800,
0x00000804, 0x00000820, 0x00000824, 0x00000900, 0x00000904, 0x00000920, 0x00000924, 0x00004000,

0 comments on commit 30fc3d6

Please sign in to comment.
You can’t perform that action at this time.