Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bdlde::Crc32c_Impl Struct Reference

#include <bdlde_crc32c.h>

List of all members.

Static Public Member Functions

static unsigned int calculateSoftware (const void *data, bsl::size_t length, unsigned int crc=Crc32c::k_NULL_CRC32C)
static unsigned int calculateHardwareSerial (const void *data, bsl::size_t length, unsigned int crc=Crc32c::k_NULL_CRC32C)

Detailed Description

This class provides alternative implementations of utilities to calculate a CRC32-C checksum.

See Component bdlde_crc32c


Member Function Documentation

static unsigned int bdlde::Crc32c_Impl::calculateSoftware ( const void *  data,
bsl::size_t  length,
unsigned int  crc = Crc32c::k_NULL_CRC32C 
) [static]

Return the CRC32-C value calculated for the specified data over the specified length number of bytes, using the optionally specified crc value as the starting point for the calculation. This utilizes a portable software-based implementation to perform the calculation. Note that if data is 0, then length must also be 0.

static unsigned int bdlde::Crc32c_Impl::calculateHardwareSerial ( const void *  data,
bsl::size_t  length,
unsigned int  crc = Crc32c::k_NULL_CRC32C 
) [static]

Return the CRC32-C value calculated for the specified data over the specified length number of bytes, using the optionally specified crc value as the starting point for the calculation. This utilizes a hardware-based implementation that does not leverage instruction level parallelism to perform the calculation (hence it calculates the crc32c in "serial"). Note that this function will fall back to the software version when running on unsupported platforms. Also note that if data is 0, then length must also be 0.


The documentation for this struct was generated from the following file: