Mercurial > hg > Gears > GearsAgda
view src/llrb/llrbContext.h @ 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
/* Context definition for llrb example */ enum Code { Code1, Code2, Code3, Code4, Code5, Allocate, Put, InsertD, InsertU, Exit, }; enum Color { Red, Black, }; struct Context { int codeSize; __code (**code) (struct Context *); void* heap; union Data* root; union Data* current; int dataSize; union Data **data; }; union Data { long count; struct Node { int key; int value; enum Color color; union Data* parent; union Data* left; union Data* right; } node; struct Allocate { long size; enum Code next; enum Code after_put; int key; int value; } allocate; };