Created
June 13, 2013 17:31
-
-
Save pmichna/5775623 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint32_t get_lower_32_bits(uint64_t i) | |
{ | |
return (uint32_t) i; | |
} | |
uint32_t get_higher_32_bits(uint64_t i) | |
{ | |
return (uint32_t) (i >> 32); | |
} | |
uint64_t combine_to_uint64(uint32_t lower, uint32_t higher) | |
{ | |
uint64_t result; | |
result = (uint64_t) higher; | |
result = (result << 32); | |
result = result | (uint64_t) lower; | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment