MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / read_u64

Function read_u64

Source/external/fast_float.h:705–722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705fastfloat_really_inline FASTFLOAT_CONSTEXPR20
706uint64_t read_u64(const char *chars) {
707 if (cpp20_and_in_constexpr()) {
708 uint64_t val = 0;
709 for(int i = 0; i < 8; ++i) {
710 val |= uint64_t(*chars) << (i*8);
711 ++chars;
712 }
713 return val;
714 }
715 uint64_t val;
716 ::memcpy(&val, chars, sizeof(uint64_t));
717#if FASTFLOAT_IS_BIG_ENDIAN == 1
718 // Need to read as-if the number was in little-endian order.
719 val = byteswap(val);
720#endif
721 return val;
722}
723
724fastfloat_really_inline FASTFLOAT_CONSTEXPR20
725void write_u64(uint8_t *chars, uint64_t val) {

Callers 2

Calls 2

cpp20_and_in_constexprFunction · 0.85
byteswapFunction · 0.85

Tested by

no test coverage detected