¿Le resultó útil esta página?
Sus comentarios sobre este contenido son muy importantes. Háganos saber su opinión.
¿Tiene comentarios adicionales?
Caracteres restantes: 1500
Exportar (0) Imprimir
Expandir todo
Expandir Minimizar


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



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





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

Adiciones de comunidad

© 2015 Microsoft