Mercurial > hg > GearsTemplate
annotate src/parallel_execution/compare.c @ 131:a4507906938c
Fix compile error but not work
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 25 Oct 2016 00:49:28 +0900 |
parents | 1e074c3878c7 |
children |
rev | line source |
---|---|
86 | 1 #include "context.h" |
2 | |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
3 enum Relational compare(struct Node* node1, struct Node* node2) { |
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
4 int key1 = node1->key; |
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
5 int key2 = node2->key; |
86 | 6 if (key1 == key2) { |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
7 return EQ; |
86 | 8 } else if (key1 < key2) { |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
9 return GT; |
86 | 10 } else { |
131
a4507906938c
Fix compile error but not work
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
11 return LT; |
86 | 12 } |
13 } |