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

Function PD_PString_AppendN

paddle/phi/common/cpstring_impl.h:473–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473HOSTDEVICE static inline void PD_PString_AppendN(PD_PString *dst,
474 const char *src,
475 size_t src_size) {
476 if (!src_size) return;
477
478 size_t dst_size = PD_PString_GetSize(dst);
479
480 // For append use cases, we want to ensure amortized growth.
481 PD_PString_ReserveAmortized(dst, dst_size + src_size);
482 char *dst_c = PD_PString_ResizeUninitialized(dst, dst_size + src_size);
483
484 PD_Memcpy(dst_c + dst_size, src, src_size);
485}
486
487HOSTDEVICE static inline void PD_PString_Append(PD_PString *dst,
488 const PD_PString *src) {

Callers 2

PD_PString_AppendFunction · 0.85
pstring.hFile · 0.85

Calls 4

PD_PString_GetSizeFunction · 0.85
PD_MemcpyFunction · 0.85

Tested by

no test coverage detected