Export (0) Print
Expand All
Expand Minimize

_mm_crc32_u64

Updated: March 2009

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
); 

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.

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

Intrinsic

Architecture

_mm_crc32_u64

x64

Header file <nmmintrin.h>

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.

#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

Date

History

Reason

March 2009

Updated the information to be accurate for this intrinsic.

Content bug fix.

Community Additions

ADD
Show:
© 2014 Microsoft