X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcommon%2Fcrc32c_intel_fast.h;fp=src%2Fceph%2Fsrc%2Fcommon%2Fcrc32c_intel_fast.h;h=26a444f60615d1ae76299f476910b113a3d5fda2;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/common/crc32c_intel_fast.h b/src/ceph/src/common/crc32c_intel_fast.h new file mode 100644 index 0000000..26a444f --- /dev/null +++ b/src/ceph/src/common/crc32c_intel_fast.h @@ -0,0 +1,28 @@ +#ifndef CEPH_COMMON_CRC32C_INTEL_FAST_H +#define CEPH_COMMON_CRC32C_INTEL_FAST_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* is the fast version compiled in */ +extern int ceph_crc32c_intel_fast_exists(void); + +#ifdef __x86_64__ + +extern uint32_t ceph_crc32c_intel_fast(uint32_t crc, unsigned char const *buffer, unsigned len); + +#else + +static inline uint32_t ceph_crc32c_intel_fast(uint32_t crc, unsigned char const *buffer, unsigned len) +{ + return 0; +} + +#endif + +#ifdef __cplusplus +} +#endif + +#endif