MCPcopy Create free account
hub / github.com/catboost/catboost / AlignUpSpace

Function AlignUpSpace

util/system/align.h:21–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20template <class T>
21static inline T AlignUpSpace(T len, T align) noexcept {
22 Y_ASSERT(IsPowerOf2(align)); // align should be power of 2
23 return ((T)0 - len) & (align - 1); // AlignUp(len, align) - len;
24}
25
26template <class T>
27static inline T* AlignUp(T* ptr, size_t align) noexcept {

Callers

nothing calls this directly

Calls 1

IsPowerOf2Function · 0.50

Tested by

no test coverage detected