MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / sz_copy_serial

Function sz_copy_serial

include/stringzilla/memory.h:341–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339#endif
340
341SZ_PUBLIC void sz_copy_serial(sz_ptr_t target, sz_cptr_t source, sz_size_t length) {
342#if SZ_USE_MISALIGNED_LOADS
343 while (length >= 8) *(sz_u64_t *)target = *(sz_u64_t const *)source, target += 8, source += 8, length -= 8;
344#endif
345 while (length--) *(target++) = *(source++);
346}
347
348SZ_PUBLIC void sz_move_serial(sz_ptr_t target, sz_cptr_t source, sz_size_t length) {
349 // Implementing `memmove` is trickier, than `memcpy`, as the ranges may overlap.

Callers 3

sz_copy_haswellFunction · 0.85
sz_copy_neonFunction · 0.85
sz_copyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…