Mercurial > hg > Papers > 2017 > atton-master
view paper/src/akashaMeta.c @ 130:80a196c82a4c
Update todo
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 18 Feb 2017 15:43:09 +0900 |
parents | 36ce493604fb |
children |
line wrap: on
line source
__code meta(struct Context* context, enum Code next) { struct Iterator* iter = &context->data[Iter]->iterator; switch (context->prev) { case GoToPreviousDepth: if (iter->iteratedPointDataNum == 0) break; if (iter->iteratedPointHeap == NULL) break; unsigned int diff =(unsigned long)context->heap - (unsigned long)iter->iteratedPointHeap; memset(iter->iteratedPointHeap, 0, diff); context->dataNum = iter->iteratedPointDataNum; context->heap = iter->iteratedPointHeap; break; default: break; } switch (next) { case PutAndGoToNextDepth: // with assert check if (context->prev == GoToPreviousDepth) break; if (iter->previousDepth == NULL) break; iter->previousDepth->iteratedPointDataNum = context->dataNum; iter->previousDepth->iteratedPointHeap = context->heap; break; default: break; } context->prev = next; goto (context->code[next])(context); }