Mercurial > hg > Members > Moririn
changeset 468:ac244346c85d
Change used interface syntax from #include to #interface
line wrap: on
line diff
--- a/src/parallel_execution/AtomicReference.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/AtomicReference.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "Atomic.h" +#interface "Atomic.h" #include <stdio.h> Atomic* createAtomicReference(struct Context* context) {
--- a/src/parallel_execution/CPUWorker.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/CPUWorker.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "TaskManager.h" +#interface "TaskManager.h" static void startWorker(Worker* worker); Worker* createCPUWorker(struct Context* context, int id, Queue* queue) {
--- a/src/parallel_execution/CUDAExecutor.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/CUDAExecutor.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "Executor.h" +#interface "Executor.h" #include <stdio.h> Executor* createCUDAExecutor(struct Context* context, CUdevice device) {
--- a/src/parallel_execution/CUDAWorker.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/CUDAWorker.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "Worker.h" +#interface "Worker.h" extern void cudaInit(struct CUDAWorker *cudaWorker,int phase) ;
--- a/src/parallel_execution/MultiDimIterator.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/MultiDimIterator.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,6 +1,6 @@ #include "../context.h" -#include "Iterator.h" -#include "TaskManager.h" +#interface "Iterator.h" +#interface "TaskManager.h" #include <stdio.h> Iterator* createMultiDimIterator(struct Context* context, int x, int y, int z) {
--- a/src/parallel_execution/RedBlackTree.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/RedBlackTree.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,8 +1,8 @@ #include <stdio.h> #include "../context.h" -#include "Tree.h" -#include "Stack.h" +#interface "Tree.h" +#interface "Stack.h" extern enum Relational compare(struct Node* node1, struct Node* node2);
--- a/src/parallel_execution/RedBlackTreeReWright.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/RedBlackTreeReWright.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -2,8 +2,8 @@ #include "../context.h" #include "../compare.c" -#include "Tree.h" -#include "Stack.h" +#interface "Tree.h" +#interface "Stack.h" extern enum Relational compare(struct Node* node1, struct Node* node2);
--- a/src/parallel_execution/SemaphoreImpl.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/SemaphoreImpl.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "semaphore.h" +#interface "semaphore.h" Semaphore* createSemaphoreImpl(struct Context* context, int n) { struct Semaphore* semaphore = new Semaphore();
--- a/src/parallel_execution/SingleLinkedQueue.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/SingleLinkedQueue.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "Queue.h" +#interface "Queue.h" #include <stdio.h> Queue* createSingleLinkedQueue(struct Context* context) {
--- a/src/parallel_execution/SingleLinkedStack.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/SingleLinkedStack.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "Stack.h" +#interface "Stack.h" #include <stdio.h> // typedef struct SingleLinkedStack {
--- a/src/parallel_execution/SynchronizedQueue.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/SynchronizedQueue.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,6 +1,6 @@ #include "../context.h" -#include "Queue.h" -#include "Atomic.h" +#interface "Queue.h" +#interface "Atomic.h" #include <stdio.h>
--- a/src/parallel_execution/TaskIterator.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/TaskIterator.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../context.h" -#include "Iterator.h" +#interface "Iterator.h" #include <stdio.h> createTaskIterator(struct Context, struct List list) {
--- a/src/parallel_execution/TaskManagerImpl.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/TaskManagerImpl.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,8 +1,8 @@ #include "../context.h" -#include "TaskManager.h" -#include "Iterator.h" -#include "Queue.h" -#include "Worker.h" +#interface "TaskManager.h" +#interface "Iterator.h" +#interface "Queue.h" +#interface "Worker.h" #include <stdio.h> #include <unistd.h>
--- a/src/parallel_execution/TimerImpl.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/TimerImpl.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -2,7 +2,7 @@ #include <sys/time.h> #include "../context.h" -#include "Timer.h" +#interface "Timer.h" Timer* createTimerImpl(struct Context* context) { struct Timer* timer = new Timer();
--- a/src/parallel_execution/examples/bitonicSort/bitonicSort.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/bitonicSort/bitonicSort.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -5,7 +5,7 @@ #include <math.h> #include "../../../context.h" -#include "TaskManager.h" +#interface "TaskManager.h" int cpu_num = 1; int length = 1024;
--- a/src/parallel_execution/examples/bitonicSort/makeArray.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/bitonicSort/makeArray.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,6 +1,6 @@ #include "../../../context.h" #include <stdio.h> -#include "Timer.h" +#interface "Timer.h" extern int length; __code makeArray(__code next(struct SortArray* output, struct Timer* output1, ...)){
--- a/src/parallel_execution/examples/bitonicSort/printArray.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/bitonicSort/printArray.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../../../context.h" -#include "Timer.h" +#interface "Timer.h" #include <stdio.h> __code printArray(struct SortArray* inputArray, struct Timer* inputTimer, __code next(...)){
--- a/src/parallel_execution/examples/calc/calc.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/calc/calc.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -5,7 +5,7 @@ #include <assert.h> #include "../../../context.h" -#include "TaskManager.h" +#interface "TaskManager.h" int cpu_num = 1; int length = 100;
--- a/src/parallel_execution/examples/twice/createArray.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/twice/createArray.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,6 +1,6 @@ #include <stdio.h> #include "../../../context.h" -#include "Timer.h" +#interface "Timer.h" extern int length; extern int split;
--- a/src/parallel_execution/examples/twice/main.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/twice/main.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -4,7 +4,7 @@ #include <unistd.h> #include "../../../context.h" -#include "TaskManager.h" +#interface "TaskManager.h" int cpu_num = 1; int length = 102400;
--- a/src/parallel_execution/examples/twice/printArray.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/examples/twice/printArray.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../../../context.h" -#include "Timer.h" +#interface "Timer.h" #include <stdio.h> __code printArray(struct Array* array, struct Timer* inputTimer, __code next(...)){
--- a/src/parallel_execution/generate_stub.pl Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/generate_stub.pl Mon Dec 25 18:10:56 2017 +0900 @@ -110,8 +110,8 @@ if ( -f "$codeGearName.cbc") { &getCodeGear("$codeGearName.cbc"); } - } elsif(/^#include "(.*)"/) { - # interface include + } elsif(/^#interface "(.*)"/) { + # use interface my $interfaceHeader = $1; next if ($interfaceHeader =~ /context.h/); if (-f $interfaceHeader) { @@ -295,9 +295,9 @@ $inTypedef = 1; } elsif (/^int main\((.*)\) \{/) { $inMain = 1; - } elsif(/^#include "(.*)"/) { + } elsif(/^#interface "(.*)"/) { my $interfaceHeader = $1; - # interface include not write + # #interface not write next unless ($interfaceHeader =~ /context.h/); } elsif (/^\_\_code (\w+)\((.*)\)(.*)/) { %localVarType = {};
--- a/src/parallel_execution/test/multiDimIterator_test.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/test/multiDimIterator_test.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -2,7 +2,7 @@ #include <string.h> #include <stdlib.h> #include <unistd.h> -#include "Iterator.h" +#interface "Iterator.h" #include "../../context.h" @@ -26,7 +26,7 @@ goto initDataGears(context, loopCounter, taskManager); } -__code code1() { +__code code1(struct LoopCounter* loopCounter) { printf("cpus:\t\t%d\n", cpu_num); printf("gpus:\t\t%d\n", gpu_num); printf("length:\t\t%d\n", length);
--- a/src/parallel_execution/test/queue_test.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/test/queue_test.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../../context.h" -#include "Queue.h" +#interface "Queue.h" #include <assert.h> __code queueTest1(struct Queue* queue) {
--- a/src/parallel_execution/test/rbTree_test.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/test/rbTree_test.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../../context.h" -#include "Tree.h" +#interface "Tree.h" /* #include <assert.h> */ __code rbTreeTest1(struct Tree* tree) {
--- a/src/parallel_execution/test/stack_test.cbc Thu Dec 21 20:58:39 2017 +0900 +++ b/src/parallel_execution/test/stack_test.cbc Mon Dec 25 18:10:56 2017 +0900 @@ -1,5 +1,5 @@ #include "../../context.h" -#include "Stack.h" +#interface "Stack.h" #include <assert.h> __code stackTest1(struct Stack* stack) {