Mercurial > hg > Members > Moririn
annotate src/llrb/llrbContext.c @ 22:4c3c0ad4a75d
add benchmark method
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 28 Apr 2015 17:39:44 +0900 |
parents | 737a900518be |
children | 868c2918b634 |
rev | line source |
---|---|
19 | 1 #include "llrbContext.h" |
2 extern __code code1(struct Context*); | |
3 extern __code code2(struct Context*); | |
21 | 4 extern __code code3(struct Context*); |
22
4c3c0ad4a75d
add benchmark method
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
5 extern __code code4(struct Context*); |
4c3c0ad4a75d
add benchmark method
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
6 extern __code code5(struct Context*); |
19 | 7 extern __code meta(struct Context*); |
8 extern __code allocate(struct Context*); | |
9 extern __code put(struct Context*); | |
21 | 10 extern __code insertDown(struct Context*); |
11 extern __code insertUp(struct Context*); | |
19 | 12 extern __code exit_code(struct Context*); |
13 | |
14 __code initLLRBContext(struct Context* context) { | |
15 context->codeSize = 3; | |
16 context->code[Code1] = code1; | |
17 context->code[Code2] = code2; | |
21 | 18 context->code[Code3] = code3; |
22
4c3c0ad4a75d
add benchmark method
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
19 context->code[Code4] = code4; |
4c3c0ad4a75d
add benchmark method
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
21
diff
changeset
|
20 context->code[Code5] = code5; |
19 | 21 context->code[Allocate] = allocate; |
22 context->code[Put] = put; | |
21 | 23 context->code[InsertD] = insertDown; |
24 context->code[InsertU] = insertUp; | |
19 | 25 context->code[Exit] = exit_code; |
26 | |
27 context->dataSize = 0; | |
28 context->data[context->dataSize] = context->heap; | |
29 context->heap += sizeof(struct Allocate); | |
20 | 30 |
31 context->root = 0; | |
32 context->current = 0; | |
19 | 33 } |