MCPcopy Create free account
hub / github.com/UbiquitousLearning/mllm / write_be64

Function write_be64

mllm/engine/prefix_cache/HaHaHash.cpp:15–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace MLLM_ANONYMOUS_NAMESPACE {
14
15inline void write_be64(unsigned char* dst, uint64_t v) {
16 if constexpr (std::endian::native == std::endian::little) v = __builtin_bswap64(v); // GCC/Clang can use this extention.
17 std::memcpy(dst, &v, sizeof(v));
18}
19
20inline void write_be32(unsigned char* dst, uint32_t v) {
21 if constexpr (std::endian::native == std::endian::little) v = __builtin_bswap32(v);

Callers 1

hashMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected