blob: 4e6f3268e0329cf95b9c4c2fd5607a8655720a4b [file] [log] [blame]
Noel Gordon8e904b32018-01-04 12:10:08 +11001/* crc32_simd.h
2 *
3 * Copyright 2017 The Chromium Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the Chromium source repository LICENSE file.
6 */
7
8#include <stdint.h>
9
10#include "zconf.h"
11#include "zutil.h"
12
13/*
14 * crc32_sse42_simd_(): compute the crc32 of the buffer, where the buffer
15 * length must be at least 64, and a multiple of 16.
16 */
17uint32_t ZLIB_INTERNAL crc32_sse42_simd_(
18 const unsigned char *buf,
19 z_size_t len,
20 uint32_t crc);
21
22/*
23 * crc32_sse42_simd_ buffer size constraints: see the use in zlib/crc32.c
24 * for computing the crc32 of an arbitrary length buffer.
25 */
26#define Z_CRC32_SSE42_MINIMUM_LENGTH 64
27#define Z_CRC32_SSE42_CHUNKSIZE_MASK 15