comparison 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
comparison
equal deleted inserted replaced
21:737a900518be 22:4c3c0ad4a75d
1 #include "llrbContext.h" 1 #include "llrbContext.h"
2 extern __code code1(struct Context*); 2 extern __code code1(struct Context*);
3 extern __code code2(struct Context*); 3 extern __code code2(struct Context*);
4 extern __code code3(struct Context*); 4 extern __code code3(struct Context*);
5 extern __code code4(struct Context*);
6 extern __code code5(struct Context*);
5 extern __code meta(struct Context*); 7 extern __code meta(struct Context*);
6 extern __code allocate(struct Context*); 8 extern __code allocate(struct Context*);
7 extern __code put(struct Context*); 9 extern __code put(struct Context*);
8 extern __code insertDown(struct Context*); 10 extern __code insertDown(struct Context*);
9 extern __code insertUp(struct Context*); 11 extern __code insertUp(struct Context*);
12 __code initLLRBContext(struct Context* context) { 14 __code initLLRBContext(struct Context* context) {
13 context->codeSize = 3; 15 context->codeSize = 3;
14 context->code[Code1] = code1; 16 context->code[Code1] = code1;
15 context->code[Code2] = code2; 17 context->code[Code2] = code2;
16 context->code[Code3] = code3; 18 context->code[Code3] = code3;
19 context->code[Code4] = code4;
20 context->code[Code5] = code5;
17 context->code[Allocate] = allocate; 21 context->code[Allocate] = allocate;
18 context->code[Put] = put; 22 context->code[Put] = put;
19 context->code[InsertD] = insertDown; 23 context->code[InsertD] = insertDown;
20 context->code[InsertU] = insertUp; 24 context->code[InsertU] = insertUp;
21 context->code[Exit] = exit_code; 25 context->code[Exit] = exit_code;