MCPcopy Create free account
hub / github.com/ElementsProject/elements / Extend

Function Extend

src/crc32c/src/crc32c.cc:18–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace crc32c {
17
18uint32_t Extend(uint32_t crc, const uint8_t* data, size_t count) {
19#if HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__))
20 static bool can_use_sse42 = CanUseSse42();
21 if (can_use_sse42) return ExtendSse42(crc, data, count);
22#elif HAVE_ARM64_CRC32C
23 static bool can_use_arm64_crc32 = CanUseArm64Crc32();
24 if (can_use_arm64_crc32) return ExtendArm64(crc, data, count);
25#endif // HAVE_SSE42 && (defined(_M_X64) || defined(__x86_64__))
26
27 return ExtendPortable(crc, data, count);
28}
29
30extern "C" uint32_t crc32c_extend(uint32_t crc, const uint8_t* data,
31 size_t count) {

Callers 5

TYPED_TEST_PFunction · 0.70
ExtendMethod · 0.70
crc32c_extendFunction · 0.70
Crc32cFunction · 0.50

Calls 5

CanUseSse42Function · 0.85
ExtendSse42Function · 0.85
CanUseArm64Crc32Function · 0.85
ExtendArm64Function · 0.85
ExtendPortableFunction · 0.85

Tested by 2

TYPED_TEST_PFunction · 0.56
ExtendMethod · 0.56