DDS  ver. 1.6
CRC.h
Go to the documentation of this file.
1 // Copyright 2014 GSI, Inc. All rights reserved.
2 //
3 // This file contains a number of helpers to calculate execution time of a function.
4 //
5 #ifndef CRC_H_
6 #define CRC_H_
7 
8 // STD
9 #include <string>
10 // BOOST
11 #include <boost/crc.hpp>
12 
13 namespace MiscCommon
14 {
15  inline uint64_t crc64(const std::string& _str)
16  {
17  boost::crc_optimal<64, 0x04C11DB7, 0, 0, false, false> crc;
18  crc.process_bytes(_str.data(), _str.size());
19  return crc.checksum();
20  }
21 }
22 
23 #endif /*CRC_H_*/
uint64_t crc64(const std::string &_str)
Definition: CRC.h:15
Miscellaneous functions and helpers are located here.
Definition: BOOST_FILESYSTEM.h:21