|
There are the normal datatypes defined by C (char, short, int, ...) and special vector-datatypes used by the Cell Broadband Engine. For more information see "C/C++ Language Extensions for Cell Broadband Engine Architecture - Version 2.5" chapter 1.1.
PPU & SPU | |
| typedef uint8_t | MOC_Datatype |
| Typedef defining MOC_Datatype. | |
| #define | MOC_BYTE ((MOC_Datatype)0+0) |
| MOC_Byte is a special datatype. | |
| #define | MOC_CHAR ((MOC_Datatype)0+1) |
| C-Datatype char. | |
| #define | MOC_UNSIGNED_CHAR ((MOC_Datatype)0+2) |
| C-Datatype unsigned char. | |
| #define | MOC_SHORT ((MOC_Datatype)16+0) |
| C-Datatype short. | |
| #define | MOC_UNSIGNED_SHORT ((MOC_Datatype)16+1) |
| C-Datatype unsigned short. | |
| #define | MOC_INT ((MOC_Datatype)32+0) |
| C-Datatype int. | |
| #define | MOC_UNSIGNED ((MOC_Datatype)32+1) |
| C-Datatype unsigned int. | |
| #define | MOC_LONG_LONG ((MOC_Datatype)64+0) |
| C-Datatype long long. | |
| #define | MOC_UNSIGNED_LONG_LONG ((MOC_Datatype)64+1) |
| C-Datatype unsigned long long. | |
| #define | MOC_FLOAT ((MOC_Datatype)32+2) |
| C-Datatype float. | |
| #define | MOC_DOUBLE ((MOC_Datatype)64+5) |
| C-Datatype double. | |
| #define | MOC_VEC_UCHAR16 ((MOC_Datatype)128+0) |
| Cell-specific Datatype vector unsigned char (vec_uchar16). | |
| #define | MOC_VEC_USHORT8 ((MOC_Datatype)128+1) |
| Cell-specific Datatype vector unsigned short (vec_ushort8). | |
| #define | MOC_VEC_UINT4 ((MOC_Datatype)128+2) |
| Cell-specific Datatype vector unsigned int (vec_uint4). | |
| #define | MOC_VEC_CHAR16 ((MOC_Datatype)128+4) |
| Cell-specific Datatype vector signed char (vec_char16). | |
| #define | MOC_VEC_SHORT8 ((MOC_Datatype)128+3) |
| Cell-specific Datatype vector signed short (vec_short8). | |
| #define | MOC_VEC_INT4 ((MOC_Datatype)128+5) |
| Cell-specific Datatype vector signed int (vec_int4). | |
| #define | MOC_VEC_FLOAT4 ((MOC_Datatype)128+6) |
| Cell-specific Datatype vector float (vec_float4). | |
PPU-only | |
| #define | MOC_LONG ((MOC_Datatype)64+2) |
| C-Datatype long. | |
| #define | MOC_UNSIGNED_LONG ((MOC_Datatype)64+3) |
| C-Datatype unsigned long. | |
| #define | MOC_VEC_BCHAR16 ((MOC_Datatype)128+0) |
| Cell-specific Datatype vector bool char (vec_bchar16). | |
| #define | MOC_VEC_BSHORT8 ((MOC_Datatype)128+1) |
| Cell-specific Datatype vector bool short (vec_bshort8). | |
| #define | MOC_VEC_PIXEL8 ((MOC_Datatype)128+1) |
| Cell-specific Datatype vector pixel (vec_pixel8). | |
| #define | MOC_VEC_BINT4 ((MOC_Datatype)128+2) |
| Cell-specific Datatype vector bool int (vec_bint4). | |
SPU-only | |
| #define | MOC_LONG ((MOC_Datatype)32+2) |
| C-Datatype long. | |
| #define | MOC_UNSIGNED_LONG ((MOC_Datatype)32+3) |
| C-Datatype unsigned long. | |
| #define | MOC_VEC_ULLONG2 ((MOC_Datatype)128+0) |
| Cell-specific Datatype vector unsigned long long (vec_ullong2). | |
| #define | MOC_VEC_LLONG2 ((MOC_Datatype)128+1) |
| Cell-specific Datatype vector signed long long (vec_llong2). | |
| #define | MOC_VEC_DOUBLE2 ((MOC_Datatype)128+2) |
| Cell-specific Datatype vector double (vec_double2). | |
| #define MOC_BYTE ((MOC_Datatype)0+0) |
MOC_Byte is a special datatype.
It can match any datatype. It has a size of 1 byte.
| #define MOC_CHAR ((MOC_Datatype)0+1) |
C-Datatype char.
It has a size of 1 byte.
| #define MOC_DOUBLE ((MOC_Datatype)64+5) |
C-Datatype double.
It has a size of 8 byte.
| #define MOC_FLOAT ((MOC_Datatype)32+2) |
C-Datatype float.
It has a size of 4 byte.
| #define MOC_INT ((MOC_Datatype)32+0) |
C-Datatype int.
It has a size of 4 byte.
| #define MOC_LONG ((MOC_Datatype)32+2) |
C-Datatype long.
It has a size of 4 byte.
| #define MOC_LONG ((MOC_Datatype)64+2) |
C-Datatype long.
It has a size of 8 byte.
| #define MOC_LONG_LONG ((MOC_Datatype)64+0) |
C-Datatype long long.
It has a size of 8 byte.
| #define MOC_SHORT ((MOC_Datatype)16+0) |
C-Datatype short.
It has a size of 2 byte.
| #define MOC_UNSIGNED ((MOC_Datatype)32+1) |
C-Datatype unsigned int.
It has a size of 4 byte.
| #define MOC_UNSIGNED_CHAR ((MOC_Datatype)0+2) |
C-Datatype unsigned char.
It has a size of 1 byte.
| #define MOC_UNSIGNED_LONG ((MOC_Datatype)32+3) |
C-Datatype unsigned long.
It has a size of 4 byte.
| #define MOC_UNSIGNED_LONG ((MOC_Datatype)64+3) |
C-Datatype unsigned long.
It has a size of 8 byte.
| #define MOC_UNSIGNED_LONG_LONG ((MOC_Datatype)64+1) |
C-Datatype unsigned long long.
It has a size of 8 byte.
| #define MOC_UNSIGNED_SHORT ((MOC_Datatype)16+1) |
C-Datatype unsigned short.
It has a size of 2 byte.
| #define MOC_VEC_BCHAR16 ((MOC_Datatype)128+0) |
Cell-specific Datatype vector bool char (vec_bchar16).
It has a size of 16 byte.
| #define MOC_VEC_BINT4 ((MOC_Datatype)128+2) |
Cell-specific Datatype vector bool int (vec_bint4).
It has a size of 16 byte.
| #define MOC_VEC_BSHORT8 ((MOC_Datatype)128+1) |
Cell-specific Datatype vector bool short (vec_bshort8).
It has a size of 16 byte.
| #define MOC_VEC_CHAR16 ((MOC_Datatype)128+4) |
Cell-specific Datatype vector signed char (vec_char16).
It has a size of 16 byte.
| #define MOC_VEC_DOUBLE2 ((MOC_Datatype)128+2) |
Cell-specific Datatype vector double (vec_double2).
It has a size of 16 byte.
| #define MOC_VEC_FLOAT4 ((MOC_Datatype)128+6) |
Cell-specific Datatype vector float (vec_float4).
It has a size of 16 byte.
| #define MOC_VEC_INT4 ((MOC_Datatype)128+5) |
Cell-specific Datatype vector signed int (vec_int4).
It has a size of 16 byte.
| #define MOC_VEC_LLONG2 ((MOC_Datatype)128+1) |
Cell-specific Datatype vector signed long long (vec_llong2).
It has a size of 16 byte.
| #define MOC_VEC_PIXEL8 ((MOC_Datatype)128+1) |
Cell-specific Datatype vector pixel (vec_pixel8).
It has a size of 16 byte.
| #define MOC_VEC_SHORT8 ((MOC_Datatype)128+3) |
Cell-specific Datatype vector signed short (vec_short8).
It has a size of 16 byte.
| #define MOC_VEC_UCHAR16 ((MOC_Datatype)128+0) |
Cell-specific Datatype vector unsigned char (vec_uchar16).
It has a size of 16 byte.
| #define MOC_VEC_UINT4 ((MOC_Datatype)128+2) |
Cell-specific Datatype vector unsigned int (vec_uint4).
It has a size of 16 byte.
| #define MOC_VEC_ULLONG2 ((MOC_Datatype)128+0) |
Cell-specific Datatype vector unsigned long long (vec_ullong2).
It has a size of 16 byte.
| #define MOC_VEC_USHORT8 ((MOC_Datatype)128+1) |
Cell-specific Datatype vector unsigned short (vec_ushort8).
It has a size of 16 byte.
| typedef uint8_t MOC_Datatype |
Typedef defining MOC_Datatype.
One byte is used to encode the Data-Type. The first four msb hold the size in byte / 2 ( if ((datatype & 0xF0)>>4) == 0 then size = 1 else size = ((datatype & 0xF0)>>4)*2 ) and the four lsb hold an id. The combination of id and size is used to uniquely identify a datatype (or rather a group of datatypes belonging together).
1.5.6