Mercurial > hg > Members > Moririn
annotate src/parallel_execution/compare.c @ 437:2c1b1d56bf1e
Work CUDAbitonicSort by CUDAExecutor
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 04 Nov 2017 08:30:25 +0900 |
parents | a4507906938c |
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 } |