MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / append

Method append

dnn/include/megdnn/thin/small_vector.h:365–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363 typename std::iterator_traits<in_iter>::iterator_category,
364 std::input_iterator_tag>::value>::type>
365 void append(in_iter in_start, in_iter in_end) {
366 size_type num_inputs = std::distance(in_start, in_end);
367 // Grow allocated space if needed.
368 if (num_inputs > size_type(this->capacity_ptr() - this->end()))
369 this->grow(this->size() + num_inputs);
370
371 // Copy the new elements over.
372 this->uninitialized_copy(in_start, in_end, this->end());
373 this->set_end(this->end() + num_inputs);
374 }
375
376 /// Add the specified range to the end of the SmallVector.
377 void append(size_type num_inputs, const T& _elm) {

Callers 2

serialize_write_podMethod · 0.45
SmallVectorMethod · 0.45

Calls 7

capacity_ptrMethod · 0.80
set_endMethod · 0.80
endMethod · 0.45
growMethod · 0.45
sizeMethod · 0.45
uninitialized_copyMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected