Commit 98674cb9 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Remove critical section from fast_vector_property_map

parent b2cce016
......@@ -68,11 +68,11 @@ public:
typedef checked_vector_property_map<T,IndexMap> self_t;
checked_vector_property_map(const IndexMap& idx = IndexMap())
: store(new std::vector<T>()), index(idx) {}
: store(std::make_shared<std::vector<T>>()), index(idx) {}
checked_vector_property_map(unsigned initial_size,
const IndexMap& idx = IndexMap())
: store(new std::vector<T>(initial_size)), index(idx) {}
: store(std::make_shared<std::vector<T>>(initial_size)), index(idx) {}
typename std::vector<T>::iterator storage_begin()
{
......@@ -96,7 +96,6 @@ public:
void reserve(size_t size) const
{
#pragma omp critical
if (store->size() < size)
store->resize(size);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment