Datatypes
[Point-to-Point Communication]

Collaboration diagram for Datatypes:

Detailed Description

Datatypes supported by MOC.

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 Documentation

#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.

Definition at line 38 of file moc_datatype.h.

Referenced by MOC_Recv().

#define MOC_CHAR   ((MOC_Datatype)0+1)

C-Datatype char.

It has a size of 1 byte.

Definition at line 44 of file moc_datatype.h.

#define MOC_DOUBLE   ((MOC_Datatype)64+5)

C-Datatype double.

It has a size of 8 byte.

Definition at line 98 of file moc_datatype.h.

#define MOC_FLOAT   ((MOC_Datatype)32+2)

C-Datatype float.

It has a size of 4 byte.

Definition at line 92 of file moc_datatype.h.

#define MOC_INT   ((MOC_Datatype)32+0)

C-Datatype int.

It has a size of 4 byte.

Definition at line 68 of file moc_datatype.h.

#define MOC_LONG   ((MOC_Datatype)32+2)

C-Datatype long.

It has a size of 4 byte.

Attention:
On the PPU long has a size of 8 byte. So if you are trying to send data of type long from the PPU to a SPU or vice versa there will be an error.

Definition at line 22 of file moc_datatype_spu.h.

#define MOC_LONG   ((MOC_Datatype)64+2)

C-Datatype long.

It has a size of 8 byte.

Attention:
On the SPU long has a size of 4 byte. So if you are trying to send data of type long from the PPU to a SPU or vice versa there will be an error.

Definition at line 21 of file moc_datatype_ppu.h.

#define MOC_LONG_LONG   ((MOC_Datatype)64+0)

C-Datatype long long.

It has a size of 8 byte.

Definition at line 80 of file moc_datatype.h.

#define MOC_SHORT   ((MOC_Datatype)16+0)

C-Datatype short.

It has a size of 2 byte.

Definition at line 56 of file moc_datatype.h.

#define MOC_UNSIGNED   ((MOC_Datatype)32+1)

C-Datatype unsigned int.

It has a size of 4 byte.

Definition at line 74 of file moc_datatype.h.

#define MOC_UNSIGNED_CHAR   ((MOC_Datatype)0+2)

C-Datatype unsigned char.

It has a size of 1 byte.

Definition at line 50 of file moc_datatype.h.

#define MOC_UNSIGNED_LONG   ((MOC_Datatype)32+3)

C-Datatype unsigned long.

It has a size of 4 byte.

Attention:
On the SPU unsigned long has a size of 8 byte. So if you are trying to send data of type long from the PPU to a SPU or vice versa there will be an error.

Definition at line 31 of file moc_datatype_spu.h.

#define MOC_UNSIGNED_LONG   ((MOC_Datatype)64+3)

C-Datatype unsigned long.

It has a size of 8 byte.

Attention:
On the SPU unsigned long has a size of 4 byte. So if you are trying to send data of type long from the PPU to a SPU or vice versa there will be an error.

Definition at line 30 of file moc_datatype_ppu.h.

#define MOC_UNSIGNED_LONG_LONG   ((MOC_Datatype)64+1)

C-Datatype unsigned long long.

It has a size of 8 byte.

Definition at line 86 of file moc_datatype.h.

#define MOC_UNSIGNED_SHORT   ((MOC_Datatype)16+1)

C-Datatype unsigned short.

It has a size of 2 byte.

Definition at line 62 of file moc_datatype.h.

#define MOC_VEC_BCHAR16   ((MOC_Datatype)128+0)

Cell-specific Datatype vector bool char (vec_bchar16).

It has a size of 16 byte.

Note:
PPU-only. Is mapped to the SPU-Datatype vector unsigned char.

Definition at line 39 of file moc_datatype_ppu.h.

#define MOC_VEC_BINT4   ((MOC_Datatype)128+2)

Cell-specific Datatype vector bool int (vec_bint4).

It has a size of 16 byte.

Note:
PPU-only. Is mapped to the SPU-Datatype vector unsigned int.

Definition at line 60 of file moc_datatype_ppu.h.

#define MOC_VEC_BSHORT8   ((MOC_Datatype)128+1)

Cell-specific Datatype vector bool short (vec_bshort8).

It has a size of 16 byte.

Note:
PPU-only. Is mapped to the SPU-Datatype vector unsigned short.

Definition at line 46 of file moc_datatype_ppu.h.

#define MOC_VEC_CHAR16   ((MOC_Datatype)128+4)

Cell-specific Datatype vector signed char (vec_char16).

It has a size of 16 byte.

Definition at line 123 of file moc_datatype.h.

#define MOC_VEC_DOUBLE2   ((MOC_Datatype)128+2)

Cell-specific Datatype vector double (vec_double2).

It has a size of 16 byte.

Note:
SPU-only. Is mapped to the PPU-Datatype vector bool int.

Definition at line 54 of file moc_datatype_spu.h.

#define MOC_VEC_FLOAT4   ((MOC_Datatype)128+6)

Cell-specific Datatype vector float (vec_float4).

It has a size of 16 byte.

Definition at line 142 of file moc_datatype.h.

#define MOC_VEC_INT4   ((MOC_Datatype)128+5)

Cell-specific Datatype vector signed int (vec_int4).

It has a size of 16 byte.

Definition at line 135 of file moc_datatype.h.

#define MOC_VEC_LLONG2   ((MOC_Datatype)128+1)

Cell-specific Datatype vector signed long long (vec_llong2).

It has a size of 16 byte.

Note:
SPU-only. Is mapped to the PPU-Datatype vector bool short.

Definition at line 47 of file moc_datatype_spu.h.

#define MOC_VEC_PIXEL8   ((MOC_Datatype)128+1)

Cell-specific Datatype vector pixel (vec_pixel8).

It has a size of 16 byte.

Note:
PPU-only. Is mapped to the SPU-Datatype vector unsigned short.

Definition at line 53 of file moc_datatype_ppu.h.

#define MOC_VEC_SHORT8   ((MOC_Datatype)128+3)

Cell-specific Datatype vector signed short (vec_short8).

It has a size of 16 byte.

Definition at line 129 of file moc_datatype.h.

#define MOC_VEC_UCHAR16   ((MOC_Datatype)128+0)

Cell-specific Datatype vector unsigned char (vec_uchar16).

It has a size of 16 byte.

Definition at line 105 of file moc_datatype.h.

#define MOC_VEC_UINT4   ((MOC_Datatype)128+2)

Cell-specific Datatype vector unsigned int (vec_uint4).

It has a size of 16 byte.

Definition at line 117 of file moc_datatype.h.

#define MOC_VEC_ULLONG2   ((MOC_Datatype)128+0)

Cell-specific Datatype vector unsigned long long (vec_ullong2).

It has a size of 16 byte.

Note:
SPU-only. Is mapped to the PPU-Datatype vector bool char.

Definition at line 40 of file moc_datatype_spu.h.

#define MOC_VEC_USHORT8   ((MOC_Datatype)128+1)

Cell-specific Datatype vector unsigned short (vec_ushort8).

It has a size of 16 byte.

Definition at line 111 of file moc_datatype.h.


Typedef Documentation

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).

Definition at line 32 of file moc_datatype.h.


Generated on Thu Feb 12 13:50:49 2009 for MPI On Cell (Documentation) by  doxygen 1.5.6