changeset 771:9323327f09ae

remove generics
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sat, 09 Jan 2021 17:15:01 +0900
parents 3f62541b7b22
children 1b6c53ca773d
files src/parallel_execution/Atomic.h src/parallel_execution/AtomicT.h src/parallel_execution/Buffer.h src/parallel_execution/CodeGear.h src/parallel_execution/Executor.h src/parallel_execution/Iterator.h src/parallel_execution/Lock.h src/parallel_execution/Queue.h src/parallel_execution/Semaphore.h src/parallel_execution/Stack.h src/parallel_execution/TaskManager.h src/parallel_execution/Timer.h src/parallel_execution/Tree.h src/parallel_execution/Worker.h src/parallel_execution/examples/DPP/Fork.h src/parallel_execution/examples/DPP/ForkImpl.h src/parallel_execution/examples/DPP/Phils.h src/parallel_execution/examples/DPP/PhilsImpl.h src/parallel_execution/examples/bitonicSort/SortArray.h src/parallel_execution/examples/piposaru/Lexer.h src/parallel_execution/examples/piposaru/LexerImpl.h src/parallel_execution/examples/pop_and_push/StackTest.h src/parallel_execution/examples/pop_and_push/StackTest2.h src/parallel_execution/examples/pop_and_push/StackTest2Impl.h src/parallel_execution/examples/pop_and_push/StackTestImpl.h src/parallel_execution/examples/pop_and_push/StackTestImpl3.h src/parallel_execution/examples/pop_and_push/String.h src/parallel_execution/examples/sandbox/GenericsTest.h src/parallel_execution/lib/Gears/Interface.pm src/parallel_execution/plautogen/impl/AtomicReference.h src/parallel_execution/plautogen/impl/CUDAExecutor.h src/parallel_execution/plautogen/impl/CUDAWorker.h src/parallel_execution/plautogen/impl/LockImpl.h src/parallel_execution/plautogen/impl/MultiDimIterator.h src/parallel_execution/plautogen/impl/RedBlackTree.h src/parallel_execution/plautogen/impl/SemaphoreImpl.h src/parallel_execution/plautogen/impl/SingleLinkedQueue.h src/parallel_execution/plautogen/impl/SingleLinkedStack.h src/parallel_execution/plautogen/impl/SpinLock.h src/parallel_execution/plautogen/impl/SynchronizedQueue.h src/parallel_execution/plautogen/impl/TaskManagerImpl.h src/parallel_execution/plautogen/impl/TimerImpl.h src/parallel_execution/plautogen/interface/Allocate.h src/parallel_execution/plautogen/interface/Array.h src/parallel_execution/plautogen/interface/ArrayStack.h src/parallel_execution/plautogen/interface/BoundedBuffer.h src/parallel_execution/plautogen/interface/CPUWorker.h src/parallel_execution/plautogen/interface/CUDABuffer.h src/parallel_execution/plautogen/interface/Element.h src/parallel_execution/plautogen/interface/Integer.h src/parallel_execution/plautogen/interface/LoopCounter.h src/parallel_execution/plautogen/interface/Main.h src/parallel_execution/plautogen/interface/Memory.h src/parallel_execution/plautogen/interface/Meta.h src/parallel_execution/plautogen/interface/MultiDim.h src/parallel_execution/plautogen/interface/Node.h src/parallel_execution/plautogen/interface/RotateTree.h src/parallel_execution/tools/static_gen_header.pl
diffstat 58 files changed, 89 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/Atomic.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Atomic.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Atomic<Impl>{
+typedef struct Atomic<>{
     union Data* atomic;
     union Data** ptr;
     union Data* oldData;
--- a/src/parallel_execution/AtomicT.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/AtomicT.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct AtomicT <Impl,T>{
+typedef struct AtomicT <T>{
     union Data* atomicTImpl;
     T newData;
     __code checkAndSet(Impl* atomicTImpl, T newData, __code next(...), __code fail(...));
--- a/src/parallel_execution/Buffer.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Buffer.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Buffer<Impl>{
+typedef struct Buffer<>{
         union Data* buffer;
         union Data* data;
         __code put(Impl* buffer, union Data* data, __code next(...));
--- a/src/parallel_execution/CodeGear.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/CodeGear.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct CodeGear<Impl>{
+typedef struct CodeGear<>{
         union Data* codeGear;
         enum Code code;
         __code code(struct Integer* input1, struct Integer* input2, __code next(struct Integer* output, ...));
--- a/src/parallel_execution/Executor.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Executor.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Executor<Impl>{
+typedef struct Executor<>{
     union Data* Executor;
     struct Context* task;
     __code next(...);
--- a/src/parallel_execution/Iterator.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Iterator.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Iterator<Impl>{
+typedef struct Iterator<>{
         union Data* iterator;
         struct Context* task;
         int numGPU;
--- a/src/parallel_execution/Lock.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Lock.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Lock<Impl>{
+typedef struct Lock<>{
         union Data* lock;
         __code doLock(Impl* lock, __code next(...)); 
         __code doUnlock(Impl* lock, __code next(...)); 
--- a/src/parallel_execution/Queue.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Queue.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Queue<Impl>{
+typedef struct Queue<>{
     __code whenEmpty(...);
     __code clear(Impl* queue, __code next(...));
     __code put(Impl* queue, union Data* data, __code next(...));
--- a/src/parallel_execution/Semaphore.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Semaphore.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Semaphore<Impl>{
+typedef struct Semaphore<>{
         union Data* semaphore;
         __code p(Impl* semaphore, __code next(...)); 
         __code v(Impl* semaphore, __code next(...)); 
--- a/src/parallel_execution/Stack.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Stack.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Stack<Self, Impl>{
+typedef struct Stack<>{
         __code clear(Impl* stack,__code next(...));
         __code push(Impl* stack,union Data* data, __code next(...));
         __code pop(Impl* stack, __code next(union Data* data, ...));
--- a/src/parallel_execution/TaskManager.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/TaskManager.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct TaskManager<Impl>{
+typedef struct TaskManager<>{
   __code spawn(Impl* taskManager, struct Context* task, __code next(...));
   __code spawnTasks(Impl* taskManagerImpl, struct Element* taskList, __code next1(...));
   __code setWaitTask(Impl* taskManagerImpl, struct Context* task, __code next(...));
--- a/src/parallel_execution/Timer.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Timer.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Timer<Impl>{
+typedef struct Timer<>{
         union Data* timer;
         __code start(Impl* timer, __code next(...));
         __code end(Impl* timer, __code next(...));
--- a/src/parallel_execution/Tree.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Tree.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Tree<Self, Impl>{
+typedef struct Tree<>{
     /* future Code */
     /* Type* tree; */
     /* Type* node; */
--- a/src/parallel_execution/Worker.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/Worker.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Worker<Impl>{
+typedef struct Worker<>{
     union Data* worker;
     struct Queue* tasks;
     struct Context* task;
--- a/src/parallel_execution/examples/DPP/Fork.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/DPP/Fork.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Fork <Type, Impl> {
+typedef struct Fork <> {
   union Data* fork;
   int id;
   struct Phils* owner;
--- a/src/parallel_execution/examples/DPP/ForkImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/DPP/ForkImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct ForkImpl <Type, Isa> impl Fork {
+typedef struct ForkImpl <> impl Fork {
   __code next(...);
 } ForkImpl;
--- a/src/parallel_execution/examples/DPP/Phils.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/DPP/Phils.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Phils <Type, Impl> {
+typedef struct Phils <> {
   __code putdown_lfork(Impl* phils, __code next(...));
   __code putdown_rfork(Impl* phils, __code next(...));
   __code eating(Impl* phils, __code next(...));
--- a/src/parallel_execution/examples/DPP/PhilsImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/DPP/PhilsImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct PhilsImpl <Isa> impl Phils {
+typedef struct PhilsImpl <> impl Phils {
   int self;
   AtomicT<int> Leftfork;
   Atomic<int> Rightfork;
--- a/src/parallel_execution/examples/bitonicSort/SortArray.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/bitonicSort/SortArray.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct SortArray<Impl>{
+typedef struct SortArray<>{
     union Data* sortArray;
     struct Integer *array;
     int loopCounter;
--- a/src/parallel_execution/examples/piposaru/Lexer.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/piposaru/Lexer.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Lexer <Self, Impl> {
+typedef struct Lexer <> {
   __code read_char(Impl* lexer, char* ch, __code next(... ));
   __code eat_whitespace(Impl* lexer, char* ch, __code next(... ));
   __code next_token(Impl* lexer, __code next(struct token* tok, ...));
--- a/src/parallel_execution/examples/piposaru/LexerImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/piposaru/LexerImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct LexerImpl <Self, Isa> impl Lexer{
+typedef struct LexerImpl <> impl Lexer{
     __code next(....);
 } LexerImpl;
--- a/src/parallel_execution/examples/pop_and_push/StackTest.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/pop_and_push/StackTest.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct StackTest <Self, Impl> {
+typedef struct StackTest <> {
   __code insertTest1(Impl* stackTest, struct Stack* stack, __code next(...));
   __code insertTest2(Impl* stackTest, struct Stack* stack, __code next(...));
   __code insertTest3(Impl* stackTest, struct Stack* stack, __code next(union Data* data, union Data* data1, ...));
--- a/src/parallel_execution/examples/pop_and_push/StackTest2.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/pop_and_push/StackTest2.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct StackTest2 <Self, Impl> {
+typedef struct StackTest2 <> {
   __code insertTest1(Impl* stackTest2, struct Stack* stack, union Data* data1, __code next(...));
   __code gotoOtherInterface(Impl* stackTest2, struct Stack* stack, union Data* data1, struct StackTest* stackTest, __code next(...));
   __code next(...);
--- a/src/parallel_execution/examples/pop_and_push/StackTest2Impl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/pop_and_push/StackTest2Impl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct StackTest2Impl <Self, Isa> impl StackTest2 {
+typedef struct StackTest2Impl <> impl StackTest2 {
   __code next(...);
 } StackTest2Impl;
--- a/src/parallel_execution/examples/pop_and_push/StackTestImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/pop_and_push/StackTestImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct StackTestImpl <Self, Isa> impl StackTest {
+typedef struct StackTestImpl <> impl StackTest {
   __code next(....);
 } StackTestImpl;
--- a/src/parallel_execution/examples/pop_and_push/StackTestImpl3.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/pop_and_push/StackTestImpl3.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct StackTestImpl3 <Self, Isa> impl StackTest {
+typedef struct StackTestImpl3 <> impl StackTest {
   __code next(....);
 } StackTestImpl3;
--- a/src/parallel_execution/examples/pop_and_push/String.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/pop_and_push/String.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct String <Self, Impl> {
+typedef struct String <> {
   char* str;
   int size;
 } String;
--- a/src/parallel_execution/examples/sandbox/GenericsTest.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/examples/sandbox/GenericsTest.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,5 @@
 typedef struct GenericsTest <T:Say> {
   __code print(Impl* generics_test, T* pointer, __code next(...));
+  __code print2(Impl* generics_test, D* integer, __code next(...));
   __code next(...);
 } GenericsTest;
--- a/src/parallel_execution/lib/Gears/Interface.pm	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/lib/Gears/Interface.pm	Sat Jan 09 17:15:01 2021 +0900
@@ -37,14 +37,22 @@
     $line = <$fh>;
   }
 
-  if ($line =~ /typedef struct (\w+)\s?<.*>([\s\w{]+)/) {
-    my $vname = $1;
+  my $generics = undef;
+
+  if ($line =~ /typedef struct (\w+)\s?<(.*)>([\s\w{]+)/) {
+    my $vname      = $1;
+    $generics      = $2;
+    my $annotation = $3;
+
     unless ($vname) {
       cluck "[WARN] invalied struct name from $file";
       return undef;
     }
-    $ir->{name} = $vname;
-    my $annotation = $2;
+    $ir->{name}    = $vname;
+
+    if ($generics) {
+      $generics = parse_header_generics($generics);
+    }
 
     if ($annotation =~ m|\s*impl\s*([\w+]+)\s*{|) {
       $ir->{isa} = $1;
@@ -103,6 +111,11 @@
     $static_data_gear_write_mode = 1;
   }
 
+  if ($generics) {
+    use DDP {deparse => 1};
+    p $generics;
+  }
+
   $ir->{inner_code_gears} = \%inner_code_gears;
   push(@{$ir->{content}}, Gears::Util->uniq(@data_gears));
   return $ir;
@@ -212,6 +225,20 @@
   return 1;
 }
 
+sub parse_header_generics {
+  #parsed typedef struct Hoge <S, T> {
+  my $str = shift;
+  my @pair_generics = split /,/, $str;
+  my %generics;
+  for my $pear (@pair_generics) {
+    my ($type, $border) = split /:/, $pear;
+    confess "failed parsed type at $pear\n" unless $type;
+    confess "failed parsed boarder at $pear\n" unless $border;
+    $generics{$type} = $border;
+  }
+  return \%generics;
+}
+
 sub parse_generics {
   my $line = shift;
   return unless ($line =~ /([\w\*]+)\s*<([\w\*]+)>/);
--- a/src/parallel_execution/plautogen/impl/AtomicReference.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/AtomicReference.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,2 +1,2 @@
-typedef struct AtomicReference <Self, Isa> impl Atomic {
+typedef struct AtomicReference <> impl Atomic {
 } AtomicReference;
--- a/src/parallel_execution/plautogen/impl/CUDAExecutor.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/CUDAExecutor.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct CUDAExecutor <Self, Isa> impl Executor {
+typedef struct CUDAExecutor <> impl Executor {
   CUdeviceptr** kernelParams;
   struct CUDABuffer* buffer;
   int maxThreadPerBlock;
--- a/src/parallel_execution/plautogen/impl/CUDAWorker.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/CUDAWorker.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct CUDAWorker <Self, Isa> impl Worker {
+typedef struct CUDAWorker <> impl Worker {
   CUdevice device;
   CUcontext cuCtx;
   struct Context* context;
--- a/src/parallel_execution/plautogen/impl/LockImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/LockImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct LockImpl <Self, Isa> impl Lock {
+typedef struct LockImpl <> impl Lock {
   Int* lock;
   struct Queue* waitThreadQueue;
   struct Atomic* atomic;
--- a/src/parallel_execution/plautogen/impl/MultiDimIterator.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/MultiDimIterator.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct MultiDimIterator <Self, Isa> impl Iterator {
+typedef struct MultiDimIterator <> impl Iterator {
   int x;
   int y;
   int z;
--- a/src/parallel_execution/plautogen/impl/RedBlackTree.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/RedBlackTree.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct RedBlackTree <Self, Isa> impl Tree {
+typedef struct RedBlackTree <> impl Tree {
   struct Node* root;
   struct Node* current; // reading node of original tree;
   struct Node* previous; // parent of reading node of original tree;
--- a/src/parallel_execution/plautogen/impl/SemaphoreImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/SemaphoreImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct SemaphoreImpl <Self, Isa> impl Semaphore {
+typedef struct SemaphoreImpl <> impl Semaphore {
   int value;
   struct Lock* lock;
   struct Queue* waitThreadQueue;
--- a/src/parallel_execution/plautogen/impl/SingleLinkedQueue.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/SingleLinkedQueue.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct SingleLinkedQueue <Self, Isa> impl Queue {
+typedef struct SingleLinkedQueue <> impl Queue {
   struct Element* top;
   struct Element* last;
 } SingleLinkedQueue;
--- a/src/parallel_execution/plautogen/impl/SingleLinkedStack.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/SingleLinkedStack.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct SingleLinkedStack<Self, Isa> impl Stack {
+typedef struct SingleLinkedStack<> impl Stack {
   struct Element* top;
 } SingleLinkedStack;
--- a/src/parallel_execution/plautogen/impl/SpinLock.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/SpinLock.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct SpinLock <Self, Isa> impl Lock {
+typedef struct SpinLock <> impl Lock {
   volatile Int* lock;
   struct Atomic* atomic;
   struct Context* lockContext;
--- a/src/parallel_execution/plautogen/impl/SynchronizedQueue.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/SynchronizedQueue.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct SynchronizedQueue <Self, Isa> impl Queue {
+typedef struct SynchronizedQueue <> impl Queue {
   struct Element* top;
   struct Element* last;
   struct Atomic* atomic;
--- a/src/parallel_execution/plautogen/impl/TaskManagerImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/TaskManagerImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct TaskManagerImpl <Self, Isa> impl TaskManager {
+typedef struct TaskManagerImpl <> impl TaskManager {
   int numWorker;
   int sendCPUWorkerIndex;
   int sendGPUWorkerIndex;
--- a/src/parallel_execution/plautogen/impl/TimerImpl.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/impl/TimerImpl.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct TimerImpl <Self, Isa> impl Timer {
+typedef struct TimerImpl <> impl Timer {
   double time;
 } TimerImpl;
--- a/src/parallel_execution/plautogen/interface/Allocate.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Allocate.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Allocate <Self, Impl> {
+typedef struct Allocate <> {
   __code next(...);
   long size;
 } Allocate;
--- a/src/parallel_execution/plautogen/interface/Array.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Array.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Array <Self, Impl> {
+typedef struct Array <> {
   int prefix;
   struct Integer* array;
 } Array;
--- a/src/parallel_execution/plautogen/interface/ArrayStack.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/ArrayStack.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct ArrayStack <Self, Impl> {
+typedef struct ArrayStack <> {
   int size;
   int limit;
   struct Element* array;
--- a/src/parallel_execution/plautogen/interface/BoundedBuffer.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/BoundedBuffer.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct BoundedBuffer <Self, Impl> {
+typedef struct BoundedBuffer <> {
   struct Element* top;
   struct Element* last;
   struct Semaphore* fullCount;
--- a/src/parallel_execution/plautogen/interface/CPUWorker.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/CPUWorker.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct CPUWorker <Self, Impl> {
+typedef struct CPUWorker <> {
   pthread_mutex_t mutex;
   pthread_cond_t cond;
   struct Context* context;
--- a/src/parallel_execution/plautogen/interface/CUDABuffer.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/CUDABuffer.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct CUDABuffer <Self, Impl> {
+typedef struct CUDABuffer <> {
   int inputLen;
   int outputLen;
   union Data** inputData;
--- a/src/parallel_execution/plautogen/interface/Element.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Element.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Element <Self, Impl> {
+typedef struct Element <> {
   union Data* data;
   struct Element* next;
 } Element;
--- a/src/parallel_execution/plautogen/interface/Integer.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Integer.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct Integer <Self, Impl> {
+typedef struct Integer <> {
   int value;
 } Integer;
--- a/src/parallel_execution/plautogen/interface/LoopCounter.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/LoopCounter.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,3 +1,3 @@
-typedef struct LoopCounter <Self, Impl> {
+typedef struct LoopCounter <> {
   int i;
 } LoopCounter;
--- a/src/parallel_execution/plautogen/interface/Main.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Main.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Main <Self, Impl> {
+typedef struct Main <> {
   __code code(...);
   __code next(...);
   struct Queue* args;
--- a/src/parallel_execution/plautogen/interface/Memory.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Memory.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Memory <Self, Impl> {
+typedef struct Memory <> {
   union Data* adr;
   int length;
   union Data* body;
--- a/src/parallel_execution/plautogen/interface/Meta.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Meta.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Meta <Self, Impl> {
+typedef struct Meta <> {
   enum DataType type;
   long size;
   long len;
--- a/src/parallel_execution/plautogen/interface/MultiDim.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/MultiDim.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct MultiDim <Self, Impl> {
+typedef struct MultiDim <> {
   int x;
   int y;
   int z;
--- a/src/parallel_execution/plautogen/interface/Node.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/Node.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct Node <Self, Impl> {
+typedef struct Node <> {
   int key; // comparable data segment;
   union Data* value;
   struct Node* left;
--- a/src/parallel_execution/plautogen/interface/RotateTree.h	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/plautogen/interface/RotateTree.h	Sat Jan 09 17:15:01 2021 +0900
@@ -1,4 +1,4 @@
-typedef struct RotateTree <Self, Impl> {
+typedef struct RotateTree <> {
   __code next(...);
   struct RedBlackTree* traverse;
   struct Tree* tree;
--- a/src/parallel_execution/tools/static_gen_header.pl	Thu Jan 07 15:36:43 2021 +0900
+++ b/src/parallel_execution/tools/static_gen_header.pl	Sat Jan 09 17:15:01 2021 +0900
@@ -78,12 +78,12 @@
 
 sub emit_interface_header {
   my $interface_name = shift;
-  return "typedef struct $interface_name <Type, Impl> {\n";
+  return "typedef struct $interface_name <> {\n";
 }
 
 sub emit_impl_header {
   my ($interface_name, $impl_name)  = @_;
-  return "typedef struct $impl_name <Type, Isa> impl $interface_name {\n";
+  return "typedef struct $impl_name <> impl $interface_name {\n";
 }
 
 sub emit_last {