#define CLIB_CUCKOO_OPTIMIZE_UNROLL 1
#define CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 1
+#if __SSE4_2__ && !defined (__i386__)
#include <x86intrin.h>
+#endif
/** 8 octet key, 8 octet key value pair */
typedef struct
always_inline void
clib_cuckoo_kv_set_free_8_8 (clib_cuckoo_kv_8_8_t * v)
{
- memset (v, 0xff, sizeof (*v));
+ clib_memset (v, 0xff, sizeof (*v));
}
/** Format a clib_cuckoo_kv_8_8_t instance
always_inline u64
clib_cuckoo_hash_8_8 (clib_cuckoo_kv_8_8_t * v)
{
-#if __SSE4_2__ && !defined (__i386__)
- return _mm_crc32_u64 (0, v->key);
+#if defined(clib_crc32c_uses_intrinsics) && !defined (__i386__)
+ return crc32_u64 (0, v->key);
#else
return clib_xxhash (v->key);
#endif