mirror of
https://github.com/steve-m/hsdaoh.git
synced 2026-03-14 21:09:44 +01:00
24 lines
579 B
C
24 lines
579 B
C
/* CRC SIMD Acceleration Header
|
|
* Copyright (c) 2024
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*
|
|
* SIMD-accelerated CRC computation using:
|
|
* - PCLMULQDQ on x86/x64 (Intel/AMD)
|
|
* - PMULL on ARM64/NEON (Apple Silicon, ARM servers)
|
|
*/
|
|
|
|
#ifndef CRC_SIMD_H
|
|
#define CRC_SIMD_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
/* Feature detection */
|
|
bool crc_simd_available(void);
|
|
|
|
/* CRC16 SIMD functions - use CRC-16-CCITT polynomial 0x1021 */
|
|
void crc16_simd_init(void);
|
|
uint16_t crc16_simd(uint16_t crc, const void *data, uint64_t len);
|
|
|
|
#endif /* CRC_SIMD_H */
|