MCPcopy Create free account
hub / github.com/boostorg/compute / insert

Method insert

include/boost/compute/container/flat_map.hpp:178–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 }
177
178 std::pair<iterator, bool>
179 insert(const value_type &value, command_queue &queue)
180 {
181 iterator location = upper_bound(value.first, queue);
182
183 if(location != begin()){
184 value_type current_value;
185 ::boost::compute::copy_n(location - 1, 1, &current_value, queue);
186 if(value.first == current_value.first){
187 return std::make_pair(location - 1, false);
188 }
189 }
190
191 m_vector.insert(location, value);
192 return std::make_pair(location, true);
193 }
194
195 std::pair<iterator, bool> insert(const value_type &value)
196 {

Callers

nothing calls this directly

Calls 5

upper_boundFunction · 0.85
copy_nFunction · 0.85
make_pairFunction · 0.85
default_queueMethod · 0.80
finishMethod · 0.45

Tested by

no test coverage detected