We recommend using Visual Studio 2017

Scalar Types


The latest version of this topic can be found at Scalar Types.

Although the access of data can stem from any alignment, it is recommended that data be aligned on its natural boundary to avoid performance loss (or a multiple thereof). Enums are constant integers and are treated as 32-bit integers. The following table describes the type definition and recommended storage for it as it pertains to alignment using the following alignment values:

  • Byte – 8 bits

  • Word – 16 bits

  • Double Word – 32 bits

  • Quad Word – 64 bits

  • Octa Word – 128 bits

Scalar TypeC Data TypeStorage Size (in bytes)Recommended Alignment
UINT8unsigned char1Byte
UINT16unsigned short2Word
INT32int, long4Doubleword
UINT32unsigned int, unsigned long4Doubleword
UINT64unsigned __int648Quadword
FP32 (single precision)float4Doubleword
FP64 (double precision)double8Quadword
__m64struct __m648Quadword
__m128struct __m12816Octaword

Types and Storage