# HG changeset patch # User mir3636 # Date 1485083831 -32400 # Node ID 47588c28f189e41949935c57ae2a6728f7729855 # Parent 06133afb3b5ba0bb37912254e919f5bde3f81705 TaskManager diff -r 06133afb3b5b -r 47588c28f189 src/parallel_execution/Todo --- a/src/parallel_execution/Todo Sun Jan 22 20:02:21 2017 +0900 +++ b/src/parallel_execution/Todo Sun Jan 22 20:17:11 2017 +0900 @@ -1,3 +1,12 @@ +Sun Jan 22 20:11:28 JST 2017 + TaskManagerから必要なCPUWorkerを生成する + WorkerはcreateWorker時に新しくthreadを作る + + TaskManager->createTaskで新しいContextを生成する + この時点でWorkerを番号で指定する + このContextにGearefで値を設定していく + 待ち合わせ用のDSを設定する + taskManager->spawnでWorkerにcontextを送る Fri Jan 13 17:47:40 JST 2017 Task は contextを直接使うことにする DS には, まっているcontextをListを作る diff -r 06133afb3b5b -r 47588c28f189 src/parallel_execution/context.h --- a/src/parallel_execution/context.h Sun Jan 22 20:02:21 2017 +0900 +++ b/src/parallel_execution/context.h Sun Jan 22 20:17:11 2017 +0900 @@ -83,7 +83,8 @@ } LoopCounter; struct TaskManager { union Data* taskManager; - enum Code spawn; + enum Code createTask; // create NEW contexts for execution & argument + enum Code spawn; // start NEW context on the worker enum Code shutdown; enum Code next; diff -r 06133afb3b5b -r 47588c28f189 src/parallel_execution/taskManager.c --- a/src/parallel_execution/taskManager.c Sun Jan 22 20:02:21 2017 +0900 +++ b/src/parallel_execution/taskManager.c Sun Jan 22 20:17:11 2017 +0900 @@ -16,6 +16,7 @@ taskManager->io = 0; taskManager->gpu = numIO; taskManeger->cpu = numIO+numGPU; + taskManager->createTask = C_createTask; taskManager->spawn = C_spawnTaskManager; taskManager->shutdown = C_shutdownTaskManager; return (union Data*)(taskManager);