MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / takeAllocationForGrow

Method takeAllocationForGrow

paddle/utils/small_vector.h:501–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499// Define this out-of-line to dissuade the C++ compiler from inlining it.
500template <typename T, bool TriviallyCopyable>
501void small_vector_template_base<T, TriviallyCopyable>::takeAllocationForGrow(
502 T *NewElts, size_t NewCapacity) {
503 // If this wasn't grown from the inline copy, deallocate the old space.
504 if (!this->isSmall()) free(this->begin());
505
506 this->BeginX = NewElts;
507 this->Capacity = NewCapacity;
508}
509
510/// small_vector_template_base<TriviallyCopyable = true> - This is where we put
511/// method implementations that are designed to work with trivially copyable

Callers

nothing calls this directly

Calls 3

freeFunction · 0.85
isSmallMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected