Go to the documentation of this file.
41 int main(
int argc,
char *argv[])
43 const label nLoops = 30;
44 const label nBase = 100000;
45 const label nSize = nLoops * nBase;
55 Info<<
"Constructed map of size: " << nSize
56 <<
" (size " << map.
size() <<
" capacity " << map.
capacity() <<
") "
57 <<
" " <<
timer.cpuTimeIncrement() <<
" s\n\n";
59 for (
label i = 0; i < nSize; i++)
63 Info<<
"Inserted " << nSize <<
" elements"
64 <<
" (size " << map.
size() <<
" capacity " << map.
capacity() <<
") "
65 <<
timer.cpuTimeIncrement() <<
" s\n";
68 for (
label iLoop = 0; iLoop < nLoops; iLoop++)
70 for (
label i = 0; i < nBase; i++)
76 Info<<
"loop " << iLoop <<
" - Erased " << nBase <<
" elements"
77 <<
" (size " << map.
size() <<
" capacity " << map.
capacity() <<
") "
78 <<
timer.cpuTimeIncrement() <<
" s\n";
Starts timing CPU usage and return elapsed time from start.
void shrink()
Shrink the allocated table to approx. twice number of elements.
label capacity() const
The size of the underlying table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
int main(int argc, char *argv[])
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
label size() const
Return number of elements in table.
An STL-conforming hash table.
Implements a timeout mechanism via sigalarm.