MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / aligned_offset

Function aligned_offset

smallthinker/ggml/src/ggml-alloc.c:69–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static size_t aligned_offset(const void * buffer, size_t offset, size_t alignment) {
70 assert(alignment && !(alignment & (alignment - 1))); // power of 2
71 size_t align = (alignment - (((uintptr_t)buffer + offset) % alignment)) % alignment;
72 return offset + align;
73}
74
75// tallocr
76

Callers 3

ggml_tallocr_newFunction · 0.70
ggml_dyn_tallocr_allocFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected