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

Method insert

include/boost/compute/container/flat_set.hpp:167–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 }
166
167 std::pair<iterator, bool>
168 insert(const value_type &value, command_queue &queue)
169 {
170 iterator location = upper_bound(value, queue);
171
172 if(location != begin()){
173 value_type current_value;
174 ::boost::compute::copy_n(location - 1, 1, &current_value, queue);
175 if(value == current_value){
176 return std::make_pair(location - 1, false);
177 }
178 }
179
180 m_vector.insert(location, value, queue);
181 return std::make_pair(location, true);
182 }
183
184 std::pair<iterator, bool> insert(const value_type &value)
185 {

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