php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
crc32_x86.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Frank Du <frank.du@intel.com> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef _CRC32_X86_HEADER_H_
18#define _CRC32_X86_HEADER_H_
19
20#include "php.h"
21
22typedef enum {
23 /* polynomial: 0x04C11DB7, used by bzip */
25 /*
26 polynomial: 0x04C11DB7 with reversed ordering,
27 used by ethernet (IEEE 802.3), gzip, zip, png, etc
28 */
30 /*
31 polynomial: 0x1EDC6F41 with reversed ordering,
32 used by iSCSI, SCTP, Btrfs, ext4, etc
33 */
37
38#ifdef ZEND_INTRIN_SSE4_2_PCLMUL_FUNC_PTR
39PHP_MINIT_FUNCTION(crc32_x86_intrin);
40#endif
41
42#if defined(ZEND_INTRIN_SSE4_2_PCLMUL_NATIVE) || defined(ZEND_INTRIN_SSE4_2_PCLMUL_RESOLVER)
43/* Return the size processed by SIMD routine */
44size_t crc32_x86_simd_update(X86_CRC32_TYPE type, uint32_t *crc, const unsigned char *p, size_t nr);
45#else
46static inline size_t crc32_x86_simd_update(X86_CRC32_TYPE type, uint32_t *crc, const unsigned char *p, size_t nr)
47{
48 return 0;
49}
50#endif
51
52#endif
X86_CRC32_TYPE
Definition crc32_x86.h:22
@ X86_CRC32C
Definition crc32_x86.h:34
@ X86_CRC32
Definition crc32_x86.h:24
@ X86_CRC32_MAX
Definition crc32_x86.h:35
@ X86_CRC32B
Definition crc32_x86.h:29
zend_ffi_type * type
Definition ffi.c:3812
#define PHP_MINIT_FUNCTION
Definition php.h:400
p
Definition session.c:1105