libcuckoo  0.3.1
Classes | Macros | Enumerations | Functions
cuckoohash_util.hh File Reference
#include "cuckoohash_config.hh"
#include <exception>
#include <thread>
#include <utility>
#include <vector>
Include dependency graph for cuckoohash_util.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  libcuckoo::load_factor_too_low
 
class  libcuckoo::maximum_hashpower_exceeded
 
class  libcuckoo::internal::CanInvokeWithUpsertContext< F, MappedType >
 
struct  libcuckoo::internal::UpsertToUpraseFn< F, MappedType, kCanInvokeWithUpsertContext >
 
struct  libcuckoo::internal::UpsertToUpraseFn< F, MappedType, true >
 
struct  libcuckoo::internal::UpsertToUpraseFn< F, MappedType, false >
 

Macros

#define LIBCUCKOO_DBG(fmt, ...)
 When LIBCUCKOO_DEBUG is 0, LIBCUCKOO_DBG does nothing. More...
 
#define LIBCUCKOO_ALIGNAS(x)   alignas(x)
 
#define LIBCUCKOO_SQUELCH_PADDING_WARNING
 
#define LIBCUCKOO_SQUELCH_DEADCODE_WARNING_BEGIN
 
#define LIBCUCKOO_SQUELCH_DEADCODE_WARNING_END
 

Enumerations

enum  libcuckoo::UpsertContext { NEWLY_INSERTED, ALREADY_EXISTED }
 

Functions

template<typename F , typename MappedType >
bool libcuckoo::internal::InvokeUpraseFn (F &f, MappedType &mapped, UpsertContext context, std::true_type)
 
template<typename F , typename MappedType >
bool libcuckoo::internal::InvokeUpraseFn (F &f, MappedType &mapped, UpsertContext context, std::false_type)
 

Macro Definition Documentation

◆ LIBCUCKOO_ALIGNAS

#define LIBCUCKOO_ALIGNAS (   x)    alignas(x)

alignas() requires GCC >= 4.9, so we stick with the alignment attribute for GCC.

◆ LIBCUCKOO_DBG

#define LIBCUCKOO_DBG (   fmt,
  ... 
)
Value:
do { \
} while (0)

When LIBCUCKOO_DEBUG is 0, LIBCUCKOO_DBG does nothing.

◆ LIBCUCKOO_SQUELCH_DEADCODE_WARNING_BEGIN

#define LIBCUCKOO_SQUELCH_DEADCODE_WARNING_BEGIN

At higher warning levels, MSVC may issue a deadcode warning which depends on the template arguments given. For certain other template arguments, the code is not really "dead".

◆ LIBCUCKOO_SQUELCH_PADDING_WARNING

#define LIBCUCKOO_SQUELCH_PADDING_WARNING

At higher warning levels, MSVC produces an annoying warning that alignment may cause wasted space: "structure was padded due to __declspec(align())".

Enumeration Type Documentation

◆ UpsertContext

This enum indicates whether an insertion took place, or whether the key-value pair was already in the table. See cuckoohash_map::uprase_fn for usage details.