Mercurial > hg > GearsTemplate
comparison src/parallel_execution/main.c @ 196:119c035e0e36
replace Array and Stack for array and stack
author | ikkun |
---|---|
date | Fri, 16 Dec 2016 23:27:14 +0900 |
parents | bacc37265386 |
children | 962fbfe777bb |
comparison
equal
deleted
inserted
replaced
194:081607dcf893 | 196:119c035e0e36 |
---|---|
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 void print_tree(struct Node* node) { | 23 void print_tree(struct Node* node) { |
24 if (node != 0) { | 24 if (node != 0) { |
25 printf("%d\n", node->value->array.index); | 25 printf("%d\n", node->value->Array.index); |
26 print_tree(node->left); | 26 print_tree(node->left); |
27 print_tree(node->right); | 27 print_tree(node->right); |
28 } | 28 } |
29 } | 29 } |
30 | 30 |
64 | 64 |
65 goto meta(context, C_code2); | 65 goto meta(context, C_code2); |
66 } | 66 } |
67 | 67 |
68 __code code2_stub(struct Context* context) { | 68 __code code2_stub(struct Context* context) { |
69 goto code2(context, &context->data[D_Node]->node.value->array, &context->data[D_LoopCounter]->loopCounter); | 69 goto code2(context, &context->data[D_Node]->node.value->Array, &context->data[D_LoopCounter]->loopCounter); |
70 } | 70 } |
71 | 71 |
72 __code createData1(struct Context* context, struct Allocate* allocate, struct LoopCounter* loopCounter) { | 72 __code createData1(struct Context* context, struct Allocate* allocate, struct LoopCounter* loopCounter) { |
73 int i = loopCounter->i; | 73 int i = loopCounter->i; |
74 | 74 |
104 } | 104 } |
105 | 105 |
106 __code createData2_stub(struct Context* context) { | 106 __code createData2_stub(struct Context* context) { |
107 goto createData2(context, | 107 goto createData2(context, |
108 &context->data[D_LoopCounter]->loopCounter, | 108 &context->data[D_LoopCounter]->loopCounter, |
109 &context->data[context->dataNum]->array, | 109 &context->data[context->dataNum]->Array, |
110 &context->data[D_Node]->node, | 110 &context->data[D_Node]->node, |
111 Gearef(context, Tree)); | 111 Gearef(context, Tree)); |
112 } | 112 } |
113 | 113 |
114 __code createTask1(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Element* element) { | 114 __code createTask1(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Element* element) { |
126 __code createTask1_stub(struct Context* context) { | 126 __code createTask1_stub(struct Context* context) { |
127 Task* task = &ALLOCATE(context, Task)->Task; | 127 Task* task = &ALLOCATE(context, Task)->Task; |
128 goto createTask1(context, | 128 goto createTask1(context, |
129 &context->data[D_LoopCounter]->loopCounter, | 129 &context->data[D_LoopCounter]->loopCounter, |
130 task, | 130 task, |
131 &context->data[D_Element]->element); | 131 &context->data[D_Element]->Element); |
132 } | 132 } |
133 | 133 |
134 //__code createTask4(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Queue* waitMe, struct OdsQueue* waitI, struct Element* element, struct Queue* activeQueue) { | 134 //__code createTask4(struct Context* context, struct LoopCounter* loopCounter, struct Task* task, struct Queue* waitMe, struct OdsQueue* waitI, struct Element* element, struct Queue* activeQueue) { |
135 // int i = loopCounter->i; | 135 // int i = loopCounter->i; |
136 // | 136 // |