mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2025-12-19 09:40:05 -06:00
Specifically:
* Extend tables so that they won't wrap around wrongly for big sizes
(we would never hit this since our blocks are at most a few MBs
big).
* Use CRC instructions to compute remainders.
16 lines
352 B
C
16 lines
352 B
C
// Copyright 2025 XTX Markets Technologies Limited
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#include <immintrin.h>
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <sys/types.h>
|
|
|
|
typedef uint8_t u8;
|
|
typedef uint32_t u32;
|
|
typedef uint64_t u64;
|
|
|
|
#define CRC32C_USE_PCLMUL 1
|
|
#define CRC32C_NAME(a) a##_pclmul
|
|
#include "crc32c_body.c" |