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

Function PD_PString_Resize

paddle/phi/common/cpstring_impl.h:451–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451HOSTDEVICE static inline char *PD_PString_Resize(PD_PString *str,
452 size_t new_size,
453 char c) {
454 size_t curr_size = PD_PString_GetSize(str);
455 char *cstr = PD_PString_ResizeUninitialized(str, new_size);
456
457 if (new_size > curr_size) {
458 PD_Memset(cstr + curr_size, c, new_size - curr_size);
459 }
460
461 return cstr;
462}
463
464HOSTDEVICE static inline void PD_PString_AssignView(PD_PString *dst,
465 const char *src,

Callers 2

pstringMethod · 0.85
resizeMethod · 0.85

Calls 3

PD_PString_GetSizeFunction · 0.85
PD_MemsetFunction · 0.85

Tested by

no test coverage detected