ATLAS Offline Software
Loading...
Searching...
No Matches
Control
AthenaKernel
src
AthenaKernel/src/crc_combine.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAKERNEL_CRC_COMBINE_H
6
#define ATHENAKERNEL_CRC_COMBINE_H 1
7
8
#include <string>
9
#include <boost/crc.hpp>
11
inline
uint32_t
crc_combine
(uint32_t seed, uint32_t v) {
12
boost::crc_32_type crf;
13
crf.process_bytes(&seed,
sizeof
(uint32_t));
14
crf.process_bytes(&v,
sizeof
(uint32_t));
15
return
crf.checksum();
16
}
17
18
inline
uint32_t
crc_combine
(uint32_t seed,
const
std::string& v) {
19
boost::crc_32_type crf;
20
crf.process_bytes(&seed,
sizeof
(uint32_t));
21
crf.process_bytes(v.c_str(),v.size());
22
return
crf.checksum();
23
}
24
#endif
crc_combine
uint32_t crc_combine(uint32_t seed, uint32_t v)
using crc32 for architecture independence in combining the seeds
Definition
AthenaKernel/src/crc_combine.h:11
Generated on
for ATLAS Offline Software by
1.14.0