cksum: use AVX2 and AVX512 for speedup
[coreutils.git] / src / cksum.h
blob6e8a5d008076bece8921dc6389f08d3325b834d6
1 #ifndef __CKSUM_H__
2 # define __CKSUM_H__
4 extern bool cksum_debug;
6 extern int
7 crc_sum_stream (FILE *stream, void *resstream, uintmax_t *length);
9 extern int
10 crc32b_sum_stream (FILE *stream, void *resstream, uintmax_t *length);
12 extern void
13 output_crc (char const *file, int binary_file, void const *digest, bool raw,
14 bool tagged, unsigned char delim, bool args, uintmax_t length)
15 _GL_ATTRIBUTE_NONNULL ((3));
17 extern bool
18 cksum_pclmul (FILE *fp, uint_fast32_t *crc_out, uintmax_t *length_out);
20 extern bool
21 cksum_avx2 (FILE *fp, uint_fast32_t *crc_out, uintmax_t *length_out);
23 extern bool
24 cksum_avx512 (FILE *fp, uint_fast32_t *crc_out, uintmax_t *length_out);
26 extern uint_fast32_t const crctab[8][256];
28 #endif