CMS 3D CMS Logo

Functions
crc32c.h File Reference
#include <cstdint>
#include <cstddef>

Go to the source code of this file.

Functions

uint32_t crc32c (uint32_t crc, const unsigned char *buf, size_t len)
 
bool crc32c_hw_test ()
 

Function Documentation

◆ crc32c()

uint32_t crc32c ( uint32_t  crc,
const unsigned char *  buf,
size_t  len 
)

Definition at line 332 of file crc32c.cc.

References visDQMUpload::buf, and crc32c_sw().

Referenced by DataModeFRD::checksumValid(), DataModeFRDStriped::checksumValid(), FedRawDataInputSource::getNextEvent(), FRDStreamSource::setRunAndEventInfo(), FRDOutputModule::write(), and RawEventOutputModuleForBU< Consumer >::write().

332  {
333 #if defined(__x86_64__)
334  int sse42;
335 
336  SSE42(sse42);
337  return sse42 ? crc32c_hw(crc, buf, len) : crc32c_sw(crc, buf, len);
338 #else
339  return crc32c_sw(crc, buf, len);
340 #endif
341 }
static uint32_t crc32c_sw(uint32_t crci, const unsigned char *buf, size_t len)
Definition: crc32c.cc:81

◆ crc32c_hw_test()

bool crc32c_hw_test ( )

Definition at line 343 of file crc32c.cc.

Referenced by DAQSource::DAQSource(), and FedRawDataInputSource::FedRawDataInputSource().

343  {
344 #if defined(__x86_64__)
345  int sse42;
346 
347  SSE42(sse42);
348  return sse42;
349 #else
350  return 0;
351 #endif
352 }