MCPcopy Create free account
hub / github.com/bytedance/bolt / alignUp

Function alignUp

bolt/exec/SpillFile.cpp:339–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338template <typename T>
339T alignUp(T value, int alignment) {
340 if (value % alignment == 0) {
341 return value;
342 } else {
343 return value + (alignment - value % alignment);
344 }
345}
346
347char* alignUp(char* addr, int alignment) {
348 const auto intptr = reinterpret_cast<std::uintptr_t>(addr);

Callers 1

nextBatchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected