Compartir a través de


_mm_crc32_u64

Microsoft Specific

Emits the Streaming SIMD Extensions 4 (SSE4) instruction crc32. This instruction adds one parameter to the CRC-32C checksum of the other parameter.

unsigned int64 _mm_crc32_u64 (
   unsigned __int64 crc,
   unsigned __int64 v
); 

Parameters

Parameter

Description

[in] crc

An unsigned 64-bit integer to add.

[in] v

A 64-bit integer. The checksum will be computed from this input parameter.

Return value

r := crc + CRC-32C(v)

Requirements

Intrinsic

Architecture

_mm_crc32_u64

x64

Header file <nmmintrin.h>

Remarks

CRC32-C algorithm is based on polynomial 0x1EDC6F41. It is implemented by following little-endian convention. This means that the most significant bit is treated as the least significant bit in the quotient.

Before you use this intrinsic, software must ensure that the processor supports this instruction.

Example

#include <stdio.h>
#include <nmmintrin.h>

int main ()
{
    unsigned __int64 crc = 0x000011115555AAAA;
    unsigned __int64 input = 0x88889999EEEE3333;

    unsigned __int64 res = _mm_crc32_u64(crc, input);
    printf_s("Result res: 0x%08X%08X\n", (unsigned int) (res>>32), res);

    return 0;
}
Result res: 0x0000000016F57621

See Also

Reference

_mm_crc32_u8

_mm_crc32_u16

_mm_crc32_u32

__m64