CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 340 of file crc32c.cc.

References crc32c_sw().

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

341 {
342 #if defined(__x86_64__)
343  int sse42;
344 
345  SSE42(sse42);
346  return sse42 ? crc32c_hw(crc, buf, len) : crc32c_sw(crc, buf, len);
347 #else
348  return crc32c_sw(crc, buf, len);
349 #endif
350 }
static uint32_t crc32c_sw(uint32_t crci, const unsigned char *buf, size_t len)
Definition: crc32c.cc:84
bool crc32c_hw_test ( )

Definition at line 354 of file crc32c.cc.

Referenced by FedRawDataInputSource::FedRawDataInputSource().

355 {
356 
357 #if defined(__x86_64__)
358  int sse42;
359 
360  SSE42(sse42);
361  return sse42;
362 #else
363  return 0;
364 #endif
365 }