proxygen
|
#include <Fingerprint.h>
Public Member Functions | |
Fingerprint () | |
Fingerprint & | update8 (uint8_t v) |
Fingerprint & | update32 (uint32_t v) |
Fingerprint & | update64 (uint64_t v) |
Fingerprint & | update (StringPiece str) |
void | write (uint64_t *out) const |
Static Public Member Functions | |
static constexpr int | size () |
Private Member Functions | |
void | xortab (std::array< uint64_t, detail::poly_size(BITS)> const &tab) |
uint8_t | shlor8 (uint8_t v) |
uint32_t | shlor32 (uint32_t v) |
uint64_t | shlor64 (uint64_t v) |
template<> | |
uint8_t | shlor8 (uint8_t v) |
template<> | |
uint32_t | shlor32 (uint32_t v) |
template<> | |
uint64_t | shlor64 (uint64_t v) |
template<> | |
uint8_t | shlor8 (uint8_t v) |
template<> | |
uint32_t | shlor32 (uint32_t v) |
template<> | |
uint64_t | shlor64 (uint64_t v) |
template<> | |
uint8_t | shlor8 (uint8_t v) |
template<> | |
uint32_t | shlor32 (uint32_t v) |
template<> | |
uint64_t | shlor64 (uint64_t v) |
Private Attributes | |
uint64_t | fp_ [detail::poly_size(BITS)] |
Compute the Rabin fingerprint.
TODO(tudorb): Extend this to allow removing values from the computed fingerprint (so we can fingerprint a sliding window, as in the Rabin-Karp string matching algorithm)
update* methods return *this, so you can chain them together: Fingerprint<96>().update8(x).update(str).update64(val).write(output);
Definition at line 105 of file Fingerprint.h.
|
inline |
|
private |
|
inlineprivate |
|
inlineprivate |
Definition at line 254 of file Fingerprint.h.
References uint32_t, and uint64_t.
|
inlineprivate |
|
private |
|
inlineprivate |
Definition at line 239 of file Fingerprint.h.
|
inlineprivate |
|
inlineprivate |
Definition at line 286 of file Fingerprint.h.
|
private |
|
inlineprivate |
|
inlineprivate |
Definition at line 246 of file Fingerprint.h.
References uint64_t, and uint8_t.
|
inlineprivate |
|
inlinestatic |
Return the number of uint64s needed to hold the fingerprint value.
Definition at line 153 of file Fingerprint.h.
References folly::detail::poly_size().
|
inline |
Definition at line 142 of file Fingerprint.h.
|
inline |
Definition at line 124 of file Fingerprint.h.
Referenced by TEST().
|
inline |
Definition at line 133 of file Fingerprint.h.
Referenced by TEST().
|
inline |
Definition at line 115 of file Fingerprint.h.
References uint8_t.
Referenced by TEST().
|
inline |
Write the computed fingeprint to an array of size() uint64_t's. For Fingerprint<64>, size()==1; we write 64 bits in out[0] For Fingerprint<96>, size()==2; we write 64 bits in out[0] and the most significant 32 bits of out[1] For Fingerprint<128>, size()==2; we write 64 bits in out[0] and 64 bits in out[1].
Definition at line 165 of file Fingerprint.h.
References i, and folly::size().
Referenced by folly::fingerprint128(), folly::fingerprint64(), folly::fingerprint96(), and TEST().
|
inlineprivate |
Definition at line 173 of file Fingerprint.h.
References i, folly::size(), uint32_t, uint64_t, and uint8_t.
|
private |
Definition at line 186 of file Fingerprint.h.