mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
clang format corrected for file
This commit is contained in:
parent
195a196392
commit
5794fd4e91
@ -274,21 +274,20 @@ append_hw(uint32_t crc, const uint8_t* buf, size_t len) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t ppc_hw(uint32_t crc, const uint8_t* input, size_t length) {
|
uint32_t ppc_hw(uint32_t crc, const uint8_t* input, size_t length) {
|
||||||
return CRC32_FUNCTION(0, (unsigned char*)input, (unsigned long)length);
|
return CRC32_FUNCTION(0, (unsigned char*)input, (unsigned long)length);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool hw_available = platform::isHwCrcSupported();
|
static bool hw_available = platform::isHwCrcSupported();
|
||||||
|
|
||||||
extern "C" uint32_t crc32c_append(uint32_t crc, const uint8_t* input, size_t length) {
|
extern "C" uint32_t crc32c_append(uint32_t crc, const uint8_t* input, size_t length) {
|
||||||
if (hw_available) {
|
if (hw_available) {
|
||||||
#ifdef __powerpc64__
|
#ifdef __powerpc64__
|
||||||
return ppc_hw(crc, input, length);
|
return ppc_hw(crc, input, length);
|
||||||
#endif
|
#endif
|
||||||
#ifndef __powerpc64__
|
#ifndef __powerpc64__
|
||||||
return append_hw(crc, input, length);
|
return append_hw(crc, input, length);
|
||||||
#endif
|
#endif
|
||||||
} else
|
} else
|
||||||
return append_table(crc, input, length);
|
return append_table(crc, input, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user