mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git
synced 2024-11-21 19:50:05 +00:00
Remove unused static functions
* NextPow2() * PrevPow2() * StrIsEmpty()
This commit is contained in:
parent
314dda66af
commit
964f329c0a
@ -278,59 +278,6 @@ static inline T DivideRoudingUp(T x, T y)
|
||||
return (x + y - 1) / y;
|
||||
}
|
||||
|
||||
// Returns smallest power of 2 greater or equal to v.
|
||||
static inline UINT NextPow2(UINT v)
|
||||
{
|
||||
v--;
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
v++;
|
||||
return v;
|
||||
}
|
||||
static inline uint64_t NextPow2(uint64_t v)
|
||||
{
|
||||
v--;
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
v |= v >> 32;
|
||||
v++;
|
||||
return v;
|
||||
}
|
||||
|
||||
// Returns largest power of 2 less or equal to v.
|
||||
static inline UINT PrevPow2(UINT v)
|
||||
{
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
v = v ^ (v >> 1);
|
||||
return v;
|
||||
}
|
||||
static inline uint64_t PrevPow2(uint64_t v)
|
||||
{
|
||||
v |= v >> 1;
|
||||
v |= v >> 2;
|
||||
v |= v >> 4;
|
||||
v |= v >> 8;
|
||||
v |= v >> 16;
|
||||
v |= v >> 32;
|
||||
v = v ^ (v >> 1);
|
||||
return v;
|
||||
}
|
||||
|
||||
static inline bool StrIsEmpty(const char* pStr)
|
||||
{
|
||||
return pStr == NULL || *pStr == '\0';
|
||||
}
|
||||
|
||||
// Helper RAII class to lock a mutex in constructor and unlock it in destructor (at the end of scope).
|
||||
struct MutexLock
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user