MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / read

Function read

lib/common/hash.cpp:23–27  ·  view source on GitHub ↗

Intentional: assumes little-endian. Trades platform-independent hash values for speed by skipping byte-swap on big-endian targets.

Source from the content-addressed store, hash-verified

21// Intentional: assumes little-endian. Trades platform-independent hash
22// values for speed by skipping byte-swap on big-endian targets.
23inline uint64_t read(Span<const std::byte, 8> Data) noexcept {
24 uint64_t V;
25 std::memcpy(&V, Data.data(), 8);
26 return V;
27}
28inline uint64_t read(Span<const std::byte, 4> Data) noexcept {
29 uint32_t V;
30 std::memcpy(&V, Data.data(), 4);

Callers 7

setTimeMethod · 0.85
rapidHashMethod · 0.85
processfunc.cppFile · 0.85
mainFunction · 0.85
mainFunction · 0.85
readMethod · 0.85
readMethod · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected