swps3
DynProgr_SPE.h File Reference

Definitions for message handling and memory management on the SPE. More...

#include <sys/types.h>
Include dependency graph for DynProgr_SPE.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SPECommand
 
struct  SPEMatrix
 
struct  SPEProfile
 
struct  SPESequence
 

Macros

#define __ALIGNED__   __attribute__((__aligned__(16)))
 
#define ALIGN16(x)   (((x)+15)&(-16))
 
#define ALIGN32(x)   (((x)+31)&(-32))
 
#define MAX_TRANSFER   16384
 
#define SPE_ALIGNMENT_PROFILE   16
 
#define SPE_ALIGNMENT_TYPE_BYTE   1
 
#define SPE_ALIGNMENT_TYPE_DOUBLE   5
 
#define SPE_ALIGNMENT_TYPE_FLOAT   4
 
#define SPE_ALIGNMENT_TYPE_INT   3
 
#define SPE_ALIGNMENT_TYPE_MASK   0xf
 
#define SPE_ALIGNMENT_TYPE_SHORT   2
 
#define TOTAL_MEMORY   200000
 

Typedefs

typedef unsigned long long ppu_addr_t
 

Enumerations

enum  SPECommands {
  SPE_CMD_INIT, SPE_CMD_CREATE_PROFILE, SPE_CMD_PUT_PROFILE, SPE_CMD_GET_PROFILE,
  SPE_CMD_ALIGN
}
 
enum  SPEDatatypes {
  SPE_DATA_INT8 = 0, SPE_DATA_INT16 = 1, SPE_DATA_INT32 = 2, SPE_DATA_FLOAT = 3,
  SPE_DATA_DOUBLE = 4
}
 

Functions

void * alloc (int n)
 
int memRemaining ()
 
void reset ()
 

Variables

static const int dataSize [5] = {1,2,4,sizeof(float),sizeof(double)}
 

Detailed Description

Definitions for message handling and memory management on the SPE.

Definition in file DynProgr_SPE.h.

Macro Definition Documentation

#define __ALIGNED__   __attribute__((__aligned__(16)))
#define ALIGN16 (   x)    (((x)+15)&(-16))

Definition at line 43 of file DynProgr_SPE.h.

#define ALIGN32 (   x)    (((x)+31)&(-32))

Definition at line 44 of file DynProgr_SPE.h.

#define MAX_TRANSFER   16384

Definition at line 40 of file DynProgr_SPE.h.

Referenced by handleCommand(), and TdynProgLocal().

#define SPE_ALIGNMENT_PROFILE   16

Definition at line 57 of file DynProgr_SPE.h.

#define SPE_ALIGNMENT_TYPE_BYTE   1

Definition at line 54 of file DynProgr_SPE.h.

#define SPE_ALIGNMENT_TYPE_DOUBLE   5

Definition at line 50 of file DynProgr_SPE.h.

#define SPE_ALIGNMENT_TYPE_FLOAT   4

Definition at line 51 of file DynProgr_SPE.h.

#define SPE_ALIGNMENT_TYPE_INT   3

Definition at line 52 of file DynProgr_SPE.h.

#define SPE_ALIGNMENT_TYPE_MASK   0xf

Definition at line 49 of file DynProgr_SPE.h.

#define SPE_ALIGNMENT_TYPE_SHORT   2

Definition at line 53 of file DynProgr_SPE.h.

#define TOTAL_MEMORY   200000

Definition at line 39 of file DynProgr_SPE.h.

Referenced by alloc(), and memRemaining().

Typedef Documentation

typedef unsigned long long ppu_addr_t

Definition at line 59 of file DynProgr_SPE.h.

Enumeration Type Documentation

Enumerator:
SPE_CMD_INIT 
SPE_CMD_CREATE_PROFILE 
SPE_CMD_PUT_PROFILE 
SPE_CMD_GET_PROFILE 
SPE_CMD_ALIGN 

Definition at line 80 of file DynProgr_SPE.h.

Enumerator:
SPE_DATA_INT8 
SPE_DATA_INT16 
SPE_DATA_INT32 
SPE_DATA_FLOAT 
SPE_DATA_DOUBLE 

Definition at line 88 of file DynProgr_SPE.h.

Function Documentation

void* alloc ( int  n)

Definition at line 43 of file DynProgr_SPE_main.c.

References ALIGN16, allocated, and TOTAL_MEMORY.

Referenced by handleCommand().

int memRemaining ( )

Definition at line 49 of file DynProgr_SPE_main.c.

References allocated, and TOTAL_MEMORY.

Referenced by handleCommand().

void reset ( )

Definition at line 52 of file DynProgr_SPE_main.c.

Referenced by handleCommand().

Variable Documentation

const int dataSize[5] = {1,2,4,sizeof(float),sizeof(double)}
static

Definition at line 96 of file DynProgr_SPE.h.

Referenced by handleCommand().