Mercurial > hg > Game > Cerium
view example/task_queue/spe/spe-main.cc @ 2069:26aa08c9a1de draft default tip
cuda example fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Feb 2017 10:04:55 +0900 |
parents | d17459601f28 |
children |
line wrap: on
line source
#include "Func.h" #include "Scheduler.h" #include "main.h" SchedExternTask(Hello); /** * この関数は SpeScheduler から呼ばれるので * 必ずこの関数名でお願いします。 */ void task_init(Scheduler *s) { SchedRegisterTask(HELLO_TASK, Hello); //QueuePtr q = (QueuePtr) s->allocate(sizeof(Queues)); QueuePtr q = (QueuePtr) s->global_alloc(0, sizeof(Queues)); s->global_set(0, (void *)q); q->i = 0; q->j = 0; #if 0 for (int i = 0; i < MAX_QUEUE; i++) { q->q[i] = new TaskQueueInfo() ; } #endif }