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

Function PD_PString_Dealloc

paddle/phi/common/cpstring_impl.h:267–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267HOSTDEVICE static inline void PD_PString_Dealloc(PD_PString *str) {
268 if (PD_PString_GetType(str) == PD_PSTR_LARGE &&
269 str->u.large.ptr != NULL) { // NOLINT
270 PD_Free(str->u.large.ptr, str->u.large.cap + 1);
271 PD_PString_Init(str);
272 }
273}
274
275HOSTDEVICE static inline size_t PD_PString_GetSize(const PD_PString *str) {
276 switch (PD_PString_GetType(str)) {

Callers 4

PD_PString_AssignViewFunction · 0.85
PD_PString_AssignFunction · 0.85
PD_PString_MoveFunction · 0.85
~pstringMethod · 0.85

Calls 2

PD_FreeFunction · 0.85
PD_PString_InitFunction · 0.85

Tested by

no test coverage detected