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

Function PD_Memcmp

paddle/phi/common/cpstring_impl.h:225–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225HOSTDEVICE static inline int PD_Memcmp(const void *s1,
226 const void *s2,
227 size_t size) {
228 const uint8_t *lstr = (const uint8_t *)(s1); // NOLINT
229 const uint8_t *rstr = (const uint8_t *)(s2); // NOLINT
230 for (size_t i = 0; i < size; ++i) {
231 if (lstr[i] != rstr[i]) {
232 return (lstr[i] - rstr[i]);
233 }
234 }
235 return 0;
236}
237
238HOSTDEVICE static inline void *PD_Memmove(void *dest,
239 const void *src,

Callers 3

compareMethod · 0.85
operator==Method · 0.85
operator==Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected