 // https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm
 inline __device__ void encryptTea(uint2& arg)
 {
-    const unsigned int key[] = {
-        0xa341316c, 0xc8013ea4, 0xad90777d, 0x7e95761e
+    const uint32_t key[] = {
+        0xa341316c, 
+        0xc8013ea4, 
+        0xad90777d, 
+        0x7e95761e,
     };
 
-    unsigned int v0 = arg.x;
-    unsigned int v1 = arg.y;
-    unsigned int sum = 0;
-    unsigned int delta = 0x9e3779b9;
+    uint32_t v0 = arg.x;
+    uint32_t v1 = arg.y;
+    uint32_t sum = 0;
+    uint32_t delta = 0x9e3779b9;
 
     for (int i = 0; i < 16; i++) {
         sum += delta;

    }

    int2 tilePos = make_int2(
        idxCur.x % gradientTileSize,
        idxCur.y % gradientTileSize);

    // NOTE
    // Atomic functions for CUDA.


inline __device__ bool testReprojectedDepth(float z1, float z2, float dz)
{
    float diffZ = abs(z1 - z2);
    return diffZ < 2.0 * (dz + 1e-3f);
}

#define AT_IS_INBOUND(x, a, b)  (((a) <= (x)) && ((x) <= (b)))
