equal
deleted
inserted
replaced
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_UTILITIES_CONCURRENT_HASH_TABLE_TASKS_INLINE_HPP |
25 #ifndef SHARE_UTILITIES_CONCURRENT_HASH_TABLE_TASKS_INLINE_HPP |
26 #define SHARE_UTILITIES_CONCURRENT_HASH_TABLE_TASKS_INLINE_HPP |
26 #define SHARE_UTILITIES_CONCURRENT_HASH_TABLE_TASKS_INLINE_HPP |
27 |
27 |
|
28 #include "utilities/globalDefinitions.hpp" |
28 #include "utilities/concurrentHashTable.inline.hpp" |
29 #include "utilities/concurrentHashTable.inline.hpp" |
29 |
30 |
30 // This inline file contains BulkDeleteTask and GrowTasks which are both bucket |
31 // This inline file contains BulkDeleteTask and GrowTasks which are both bucket |
31 // operations, which they are serialized with each other. |
32 // operations, which they are serialized with each other. |
32 |
33 |
61 } |
62 } |
62 |
63 |
63 // Calculate starting values. |
64 // Calculate starting values. |
64 void setup() { |
65 void setup() { |
65 _size_log2 = _cht->_table->_log2_size; |
66 _size_log2 = _cht->_table->_log2_size; |
|
67 _task_size_log2 = MIN2(_task_size_log2, _size_log2); |
66 size_t tmp = _size_log2 > _task_size_log2 ? |
68 size_t tmp = _size_log2 > _task_size_log2 ? |
67 _size_log2 - _task_size_log2 : 0; |
69 _size_log2 - _task_size_log2 : 0; |
68 _stop_task = (((size_t)1) << tmp); |
70 _stop_task = (((size_t)1) << tmp); |
69 } |
71 } |
70 |
72 |