/*
This file is a part of libcds - Concurrent Data Structures library
- (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
/// Count of hazard pointers required
static CDS_CONSTEXPR size_t const c_nHazardPtrCount = 2;
+ /// The size of hash_type in bytes, see \p feldman_hashset::traits::hash_size for explanation
+ static CDS_CONSTEXPR size_t const c_hash_size = base_class::c_hash_size;
+
/// Level statistics
typedef feldman_hashset::level_statistics level_statistics;
public:
/// Creates empty set
/**
- @param head_bits: 2<sup>head_bits</sup> specifies the size of head array, minimum is 4.
- @param array_bits: 2<sup>array_bits</sup> specifies the size of array node, minimum is 2.
+ @param head_bits - 2<sup>head_bits</sup> specifies the size of head array, minimum is 4.
+ @param array_bits - 2<sup>array_bits</sup> specifies the size of array node, minimum is 2.
Equation for \p head_bits and \p array_bits:
\code
return false;
}
- // the slot must be expanded
- base_class::expand_slot( pos, slot );
+ if ( !pos.splitter.eos()) {
+ // the slot must be expanded
+ base_class::expand_slot( pos, slot );
+ }
+ else
+ return false;
}
else {
// the slot is empty, try to insert data node
}
if ( bInsert ) {
- // the slot must be expanded
- base_class::expand_slot( pos, slot );
+ if ( !pos.splitter.eos()) {
+ // the slot must be expanded
+ base_class::expand_slot( pos, slot );
+ }
+ else
+ return std::make_pair( false, false );
}
else {
stats().onUpdateFailed();