Mercurial > hg > Members > Moririn
view 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 |
line wrap: on
line source
#include "llrbContext.h" extern __code code1(struct Context*); extern __code code2(struct Context*); extern __code code3(struct Context*); extern __code code4(struct Context*); extern __code code5(struct Context*); extern __code meta(struct Context*); extern __code allocate(struct Context*); extern __code put(struct Context*); extern __code insertDown(struct Context*); extern __code insertUp(struct Context*); extern __code exit_code(struct Context*); __code initLLRBContext(struct Context* context) { context->codeSize = 3; context->code[Code1] = code1; context->code[Code2] = code2; context->code[Code3] = code3; context->code[Code4] = code4; context->code[Code5] = code5; context->code[Allocate] = allocate; context->code[Put] = put; context->code[InsertD] = insertDown; context->code[InsertU] = insertUp; context->code[Exit] = exit_code; context->dataSize = 0; context->data[context->dataSize] = context->heap; context->heap += sizeof(struct Allocate); context->root = 0; context->current = 0; }