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

Function AlignDown

util/system/align.h:8–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7template <class T>
8static inline T AlignDown(T len, T align) noexcept {
9 Y_ASSERT(IsPowerOf2(align)); // align should be power of 2
10 return len & ~(align - 1);
11}
12
13template <class T>
14static inline T AlignUp(T len, T align) noexcept {

Callers 10

MadviseFunction · 0.70
LockMemoryFunction · 0.70
UnlockMemoryFunction · 0.70
AlignStackPtrMethod · 0.70
CountCacheMethod · 0.70
InCoreMemoryFunction · 0.70
AlignUpFunction · 0.70
ReadFromFileMethod · 0.70
IsAlignedMethod · 0.70
TestDownMethod · 0.70

Calls 1

IsPowerOf2Function · 0.50

Tested by 1

TestDownMethod · 0.56