¿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
_mm_crc32_u32
Collapse the table of content
Expand the table of content

_mm_crc32_u32

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 int _mm_crc32_u32 (
   unsigned int crc,
   unsigned int v
); 

Parameter

Description

[in] crc

An unsigned integer to add.

[in] v

An unsigned integer. The checksum will be computed from this input parameter.

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

Intrinsic

Architecture

_mm_crc32_u32

x86, 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 using this intrinsic, software must ensure that the processor supports this instruction.

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

int main ()
{
    unsigned int crc = 1;
    unsigned int input = 50000;

    unsigned int res = _mm_crc32_u32(crc, input);
    printf_s("Result res: %u\n", res);

    return 0;
}
Result res: 971731851

Adiciones de comunidad

AGREGAR
Mostrar:
© 2015 Microsoft