Use range()
method which is described in the Reference Manual:
HashTable_t myHashTable; // assuming HashTable_t is concurrent_hash_map specialization
tbb::parallel_for( myHashTable.range(), [](const HashTable_t::range_type &r) {
for( HashTable_t::iterator i = r.begin(); i != r.end(); i++);
} );
(I use c++11 for concision but show the types explicitly for sake of c++03)
And please pay attention to the caution note there:
Do not call concurrent operations, including count and find while iterating the table. Use concurrent_unordered_map if concurrent traversal and insertion are required.