#include #include #include #include #include extern spe_program_handle_t SPU; #define SPU_THREADS 8 void *ppu_pthread_function(void *arg){ spe_context_ptr_t ctx; unsigned int entry = SPE_DEFAULT_ENTRY; ctx = *((spe_context_ptr_t *)arg); if (spe_context_run(ctx, &entry, 0, NULL, NULL, NULL) < 0){ perror ("Failed running context"); exit (1); } pthread_exit(NULL); } int main(){ int i; spe_context_ptr_t ctxs[SPU_THREADS]; pthread_t threads[SPU_THREADS]; /* Create several SPE-threads to execute 'SPU'. */ for(i=0; i