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

Function PD_PString_GetCapacity

paddle/phi/common/cpstring_impl.h:290–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288}
289
290HOSTDEVICE static inline size_t PD_PString_GetCapacity(const PD_PString *str) {
291 switch (PD_PString_GetType(str)) {
292 case PD_PSTR_SMALL:
293 return PD_PString_SmallCapacity;
294 case PD_PSTR_LARGE:
295 return str->u.large.cap;
296 case PD_PSTR_OFFSET:
297 case PD_PSTR_VIEW:
298 default:
299 return 0;
300 }
301}
302
303HOSTDEVICE static inline const char *PD_PString_GetDataPointer(
304 const PD_PString *str) {

Callers 4

PD_PString_ReserveFunction · 0.85
capacityMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected