Mercurial > hg > Papers > 2018 > nozomi-master
view paper/src/akashaMeta.c @ 116:ed6719c301fc
Update slide
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 13 Feb 2017 17:31:45 +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); }