Namespaces | Defines | Functions

C:/knet/include/kNet/Alignment.h File Reference

Provides functions for working with pointer data alignment computations. More...

#include <cassert>
#include "Types.h"
Include dependency graph for Alignment.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  kNet

Defines

#define IS_POW2(value)   (((value) & ((value)-1)) == 0)
 Is value an exact power of 2? i.e. 1,2,4,8,16,...

Functions

bool kNet::IsPow2Aligned (uintptr_t pointer, u32 alignment)
 Is the given pointer aligned to the pow2-boundary specified by alignment?
uintptr_t kNet::AlignUpPow2 (uintptr_t pointer, u32 alignment)
uintptr_t kNet::AlignDownPow2 (uintptr_t pointer, u32 alignment)

Detailed Description

Provides functions for working with pointer data alignment computations.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines