Mercurial > hg > GearsTemplate
diff src/parallel_execution/context.h @ 148:473b7d990a1f
fix data gears type enum
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 10 Nov 2016 12:07:53 +0900 |
parents | f2275f5777f4 |
children | 63ab65b28466 |
line wrap: on
line diff
--- a/src/parallel_execution/context.h Thu Nov 10 10:35:48 2016 +0900 +++ b/src/parallel_execution/context.h Thu Nov 10 12:07:53 2016 +0900 @@ -12,22 +12,22 @@ #define ALLOC_DATA(context, dseg) ({\ struct Meta* meta = (struct Meta*)context->heap;\ - meta->type = dseg;\ + meta->type = D_##dseg;\ context->heap += sizeof(struct Meta);\ - context->data[dseg] = context->heap; context->heap += sizeof(struct dseg); (struct dseg *)context->data[dseg]; }) + context->data[D_##dseg] = context->heap; context->heap += sizeof(struct dseg); (struct dseg *)context->data[D_##dseg]; }) #define ALLOC_DATA_TYPE(context, dseg, t) ({\ struct Meta* meta = (struct Meta*)context->heap;\ - meta->type = t;\ + meta->type = D_##t;\ context->heap += sizeof(struct Meta);\ - context->data[dseg] = context->heap; context->heap += sizeof(struct t); (struct t *)context->data[dseg]; }) + context->data[D_##dseg] = context->heap; context->heap += sizeof(struct t); (struct t *)context->data[D_##dseg]; }) #define ALLOCATE(context, t) ({ \ struct Meta* meta = (struct Meta*)context->heap;\ context->heap += sizeof(struct Meta);\ union Data* data = context->heap; \ context->heap += sizeof(struct t); \ - meta->type = t; \ + meta->type = D_##t; \ data; }) #define GET_TYPE(dseg) ({ \ @@ -111,20 +111,20 @@ }; enum DataType { - Worker, - Allocate, - SingleLinkedStack, - Stack, - Tree, - Traverse, - RotateTree, - Node, - LoopCounter, - Time, - Element, - ActiveQueue, - WaitQueue, - Queue + D_Worker, + D_Allocate, + D_SingleLinkedStack, + D_Stack, + D_Tree, + D_Traverse, + D_RotateTree, + D_Node, + D_LoopCounter, + D_Time, + D_Element, + D_ActiveQueue, + D_WaitQueue, + D_Queue }; struct Context {