Scalar Types

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

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
INT8char1Byte
UINT8unsigned char1Byte
INT16short2Word
UINT16unsigned short2Word
INT32int, long4Doubleword
UINT32unsigned int, unsigned long4Doubleword
INT64__int648Quadword
UINT64unsigned __int648Quadword
FP32 (single precision)float4Doubleword
FP64 (double precision)double8Quadword
POINTER*8Quadword
__m64struct __m648Quadword
__m128struct __m12816Octaword

Types and Storage

Show: