Simplified distributed block storage with strong consistency, like in Ceph
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

12 lines
435 B

  1. #pragma once
  2. #include <stdint.h>
  3. // https://software.intel.com/sites/landingpage/IntrinsicsGuide/
  4. // unsigned int _mm_crc32_u16 (unsigned int crc, unsigned short v)
  5. // unsigned int _mm_crc32_u32 (unsigned int crc, unsigned int v)
  6. // unsigned __int64 _mm_crc32_u64 (unsigned __int64 crc, unsigned __int64 v)
  7. // unsigned int _mm_crc32_u8 (unsigned int crc, unsigned char v)
  8. uint32_t crc32c(uint32_t crc, const void *buf, size_t len);