proxygen
folly::AtomicHashArrayLinearProbeFcn Struct Reference

#include <AtomicHashArray.h>

Public Member Functions

size_t operator() (size_t idx, size_t, size_t capacity) const
 

Detailed Description

Definition at line 46 of file AtomicHashArray.h.

Member Function Documentation

size_t folly::AtomicHashArrayLinearProbeFcn::operator() ( size_t  idx,
size_t  ,
size_t  capacity 
) const
inline

Definition at line 47 of file AtomicHashArray.h.

References LIKELY.

48  {
49  idx += 1; // linear probing
50 
51  // Avoid modulus because it's slow
52  return LIKELY(idx < capacity) ? idx : (idx - capacity);
53  }
#define LIKELY(x)
Definition: Likely.h:47

The documentation for this struct was generated from the following file: