The reason is that i have been working on a framework for easy execution of multiple application across the spe's
The project is listed here
http://sourceforge.net/projects/spexms
And i am still looking for members
Please note this is still in development and that im working on extending the buildt in functions however the code below is not very much compared to what one achives.
The example code to make spexms load two spe binaries and execute them in random order is currently something like this
Code: Select all
#include <spexms/spexms.h>
#include <spexms/spexms_types.h>
#include <stdlib.h>
#include <stdio.h>
int main (int nArg, char* cArg[]) {
int number_of_tasks=0;
exms_t *xms=init_spes();
spu_program_info_t *spi[2];
spi[0]=register_program("spe_hello_world");
spi[1]=register_program("spe_goodbye_world");
//printf("First command in the binary is %x",&spi->
if (nArg > 1)
number_of_tasks=atoi(cArg[1]);
///lets make spexms first task ever;
spexms_task_header_t xms_th[2];
xms_th[0].program_id=spi[0]->id;
xms_th[0].program_location=spi[0]->location;
xms_th[0].program_size=spi[0]->size;
xms_th[0].no_of_dma=0;
xms_th[1].program_id=spi[1]->id;
xms_th[1].program_location=spi[1]->location;
xms_th[1].program_size=spi[1]->size;
xms_th[1].no_of_dma=0;
int i;
int id;
for (i=0;i < number_of_tasks;i++)
{
id=rand()%2;
register_task(xms,spi[id]->id,0,&xms_th[id]);
}
sleep(1);
}
Code: Select all
#include <spexms/spexms_buildtin.h>
int main (spexms_buildtin_t *spexms,spexms_pointers_t *pointers)
{
int value=55;
//char *mychar="Hello World this is my int";
spexms->printInt("Goodbye world",value);
return value;
}