Mercurial > hg > Members > Moririn
diff src/parallel_execution/context.h @ 186:dbc064c26b98
generate context script
author | mir3636 |
---|---|
date | Thu, 15 Dec 2016 19:38:18 +0900 |
parents | 247a2c4a8908 |
children | bacc37265386 |
line wrap: on
line diff
--- a/src/parallel_execution/context.h Thu Dec 15 18:10:48 2016 +0900 +++ b/src/parallel_execution/context.h Thu Dec 15 19:38:18 2016 +0900 @@ -35,98 +35,8 @@ meta->type; }) #define Gearef(context, t) (&(context)->data[D_##t]->t) -enum Code { - C_code1, - C_code2, - C_code3, - C_code4, - C_code5, - C_find, - Not_find, - Code6, - Allocator, - C_put, - C_replaceNode, - C_replaceNode1, - C_insertNode, - Compare, - C_rotateLeft, - C_rotateLeft1, - C_rotateRight, - C_rotateRight1, - SetTree, - C_insertCase1, - C_insertCase2, - C_insertCase3, - C_insertCase4, - C_insertCase5, - C_insertCase51, - C_stackClear, - C_get, - C_search, - Delete, - Delete1, - Delete2, - Delete3, - Replace_d1, - Replace_d2, - FindMax1, - FindMax2, - DeleteCase1, - DeleteCase2, - DeleteCase3, - DeleteCase4, - DeleteCase5, - DeleteCase6, - CreateWorker, - TaskManager, - C_spawnTaskManager, - C_shutdownTaskManager, - C_QueueTest1, - C_QueueTest2, - C_QueueTest3, - C_QueueTest4, - CreateData1, - CreateData2, - CreateTask1, - CreateTask2, - CreateTask3, - CreateTask4, - PutQueue1, - PutQueue2, - PutQueue3, - PutQueue4, - C_getTask1, - C_getTask2, - C_clearSingleLinkedStack, - C_pushSingleLinkedStack, - C_popSingleLinkedStack, - C_pop2SingleLinkedStack, - C_getSingleLinkedStack, - C_get2SingleLinkedStack, - C_isEmptySingleLinkedStack, - C_takeSingleLinkedQueue, - C_putSingleLinkedQueue, - C_isEmptySingleLinkedQueue, - C_clearSingleLinkedQueue, - C_takeSynchronizedQueue, - C_putSynchronizedQueue, - C_isEmptySynchronizedQueue, - C_clearSynchronizedQueue, - C_putRedBlackTree, - C_getRedBlackTree, - C_removeRedBlackTree, - C_clearRedBlackTree, - SpawnTask, - C_executeWorker, - C_taskSendWorker, - C_taskReciveWorker, - C_shutdownWorker, - Twice, - StartTime, - EndTime, - Exit, -}; + +#include "c/enumCode.h" enum Relational { EQ, @@ -134,26 +44,7 @@ LT, }; -enum DataType { - D_Worker, - D_Allocate, - D_SingleLinkedStack, - D_Stack, - D_RedBlackTree, - D_Tree, - D_Task, - D_Traverse, - D_RotateTree, - D_Node, - D_LoopCounter, - D_Time, - D_Element, - D_ActiveQueue, - D_WaitQueue, - D_SingleLinkedQueue, - D_SynchronizedQueue, - D_Queue -}; +#include "c/enumData.h" struct Context { enum Code next; @@ -312,28 +203,9 @@ struct OutPutDataSegments { union Data **data; } ods; -}; +}; // union Data end -// typedef struct RotateTree D_RotateTree; -typedef struct Time Time; -typedef struct LoopCounter LoopCounter; -typedef struct Worker Worker; -typedef struct CudaTask CudaTask; -typedef struct Task Task; -typedef struct Queue Queue; -typedef struct SingleLinkedQueue SingleLinkedQueue; -typedef struct SynchronizedQueue SynchronizedQueue; -typedef struct Stack Stack; -typedef struct SingleLinkedStack SingleLinkedStack; -typedef struct ArrayStack ArrayStack; -typedef struct Element Element; -typedef struct Array Array; -typedef struct RedBlackTree RedBlackTree; -typedef struct Tree Tree; -typedef struct RotateTree RotateTree; -typedef struct Node Node; -typedef struct Allocate Allocate; -typedef struct OutputDataSegments OutputDataSegments; +#include "c/typedefData.h" union MetaData { struct Queue waitMeTasks;