Mercurial > hg > Members > Moririn
changeset 393:99c50356d917
fix generate_stub.pl
author | mir3636 |
---|---|
date | Tue, 01 Aug 2017 18:49:56 +0900 |
parents | 36964b9ac5fd |
children | 0c113f8e5a3f |
files | src/parallel_execution/TaskManagerImpl.cbc src/parallel_execution/examples/twice/twice.cbc src/parallel_execution/generate_stub.pl |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/TaskManagerImpl.cbc Tue Aug 01 17:53:26 2017 +0900 +++ b/src/parallel_execution/TaskManagerImpl.cbc Tue Aug 01 18:49:56 2017 +0900 @@ -13,7 +13,7 @@ taskManager->gpu = numIO; taskManager->cpu = numIO+numGPU; taskManager->maxCPU = numIO+numGPU+numCPU; - taskManager->spawnTasks = C_spawnTasksTaskManager; + taskManager->spawnTasks = C_spawnTasksTaskManagerImpl; taskManager->spawn = C_spawnTaskManager; taskManager->shutdown = C_shutdownTaskManager; struct TaskManagerImpl* taskManagerImpl = new TaskManagerImpl(); @@ -53,7 +53,7 @@ } } -__code spawnTasksTaskManager(struct TaskManagerImpl* taskManagerImpl, struct Context** tasks, __code next1(...)) { +__code spawnTasksTaskManagerImpl(struct TaskManagerImpl* taskManagerImpl, struct Context** tasks, __code next1(...)) { int i = taskManagerImpl->loopCounter->i; if(i < GET_SIZE(tasks)) { struct Context* task = tasks[i]; @@ -72,8 +72,7 @@ goto spawnTasksTaskManager(context, taskManager, Gearef(context, TaskManager)->tasks, - Gearef(context, TaskManager)->next1, - Gearef(context, TaskManager)); + Gearef(context, TaskManager)->next1); } __code spawnTasksTaskManager1(struct TaskManager* taskManager, struct TaskManagerImpl* taskManagerImpl, struct Context** tasks, __code next1(...)) {
--- a/src/parallel_execution/examples/twice/twice.cbc Tue Aug 01 17:53:26 2017 +0900 +++ b/src/parallel_execution/examples/twice/twice.cbc Tue Aug 01 18:49:56 2017 +0900 @@ -154,7 +154,7 @@ tasks[0] = task; // goto crateTask1(); - goto taskManager->spawnTasks(tasks, C_createTask1); + goto taskManager->spawnTasks(tasks, createTask1); } void init(int argc, char** argv) {
--- a/src/parallel_execution/generate_stub.pl Tue Aug 01 17:53:26 2017 +0900 +++ b/src/parallel_execution/generate_stub.pl Tue Aug 01 18:49:56 2017 +0900 @@ -2,6 +2,7 @@ use strict; use Getopt::Std; +use File::Path qw(make_path); # interface.cbc # typedef struct Worker { @@ -21,7 +22,7 @@ if ($opt_d) { $dir = $opt_d; if (! -d $dir) { - mkdir $dir; + make_path $dir; } } @@ -100,7 +101,7 @@ if ( -f "$interface.cbc") { &getDataGear("$interface.cbc"); } - } elsif (/^(\s)*(\w+)\-\>(\w+)\s\=\s\((.*)\)create(\w+)\((\w+)\);$/) { + } elsif (/^(\s)*(\w+)\-\>(\w+)\s\=\s\((.*)\)create(\w+)\((.*)\);$/) { #my $intfn = ucfirst($2); my $impln = $5; if ( -f "$impln.cbc") { @@ -235,7 +236,7 @@ } if ( $fn =~ m=(.*)/[^/]+$= ) { if (! -d $1) { - mkdir $1; + make_path $1; } } open my $fd,">",$fn or die("can't write $fn $!");