# HG changeset patch # User mir3636 # Date 1501580996 -32400 # Node ID 99c50356d9178638faf0e3210bbbdf19a15c383f # Parent 36964b9ac5fd0a7f424b10cb66127f58d38dec26 fix generate_stub.pl diff -r 36964b9ac5fd -r 99c50356d917 src/parallel_execution/TaskManagerImpl.cbc --- 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(...)) { diff -r 36964b9ac5fd -r 99c50356d917 src/parallel_execution/examples/twice/twice.cbc --- 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) { diff -r 36964b9ac5fd -r 99c50356d917 src/parallel_execution/generate_stub.pl --- 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 $!");