Fermat
|
This module provides several bit-manipulation functions.
Functions | |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::morton_code (uint32 x, uint32 y) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::morton_code (uint32 x, uint32 y, uint32 z) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 | cugar::morton_code60 (uint32 _x, uint32 _y) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 | cugar::morton_code60 (uint32 x, uint32 y, uint32 z) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::popc (const int32 i) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::popc (const uint32 i) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::popc (const uint8 i) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::popc (const uint64 i) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::find_nthbit4 (const uint32 mask, const uint32 n) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::popc4 (const uint32 mask) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::find_nthbit8 (const uint32 mask, const uint32 n) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::ffs (const int32 x) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | cugar::lzc (const uint32 x) |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::ffs | ( | const int32 | x | ) |
find the least significant bit set
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::find_nthbit4 | ( | const uint32 | mask, |
const uint32 | n | ||
) |
find the n-th bit set in a 4-bit mask (n in [1,4])
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::find_nthbit8 | ( | const uint32 | mask, |
const uint32 | n | ||
) |
find the n-th bit set in a 8-bit mask (n in [1,8])
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::lzc | ( | const uint32 | x | ) |
count the number of leading zeros
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::morton_code | ( | uint32 | x, |
uint32 | y | ||
) |
compute the Morton code of a given 2d point
x | x component |
y | y component |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::morton_code | ( | uint32 | x, |
uint32 | y, | ||
uint32 | z | ||
) |
compute the Morton code of a given 3d point
x | x component |
y | y component |
z | z component |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::morton_code60 | ( | uint32 | _x, |
uint32 | _y | ||
) |
compute the 60-bit Morton code of a given 2d point
_x | x component |
_y | y component |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint64 cugar::morton_code60 | ( | uint32 | x, |
uint32 | y, | ||
uint32 | z | ||
) |
compute the 60-bit Morton code of a given 3d point
x | x component |
y | y component |
z | z component |
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::popc | ( | const int32 | i | ) |
int32 popcount
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::popc | ( | const uint32 | i | ) |
uint32 popcount
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::popc | ( | const uint8 | i | ) |
uint8 popcount
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::popc | ( | const uint64 | i | ) |
uint64 popcount
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::popc4 | ( | const uint32 | mask | ) |
compute the pop-count of 4-bit mask