AltiVec™ Data Types

There are vector data types for use in writing AltiVec-specific code. (See AltiVec Vector Data Types ). All the types are a constant size, 16 bytes (128 bits). This is due to the AltiVec programming model which is optimized for quantities of this size.

Table 1. AltiVec Vector Data Types
Vector Data Type Contents PossibleValues
vector unsigned char 16 unsigned char 0 to 255
vector signed char 16 signed char -128 to 127
vector bool char 16 unsigned char 0 ("false"), 1 ("true")
vector unsigned short [int] 8 unsigned short 0 to 65535
vector signed short [int] 8 signed short -32768 to 32767
vector bool short [int] 8 unsigned short 0 ("false"), 1 ("true")
vector unsigned long [int] 4 unsigned int 0 to 232 - 1
vector signed long [int] 4 signed int -231 to 231-1
vector bool long [int] 4 unsigned int 0 ("false"), 1 ("true")
vector float 4 float any IEEE-754 value
vector pixel 8 unsigned short 1/5/5/5 pixel

In AltiVec Vector Data Types , the [int] portion of the Vector Data Type is optional.

There are two additional keywords besides pixel and vector , __pixel and __vector .

The bool keyword is not a reserved word in C unless it is used as an AltiVec vector data type.