Mercurial > hg > Members > Moririn
changeset 429:54352ed97f34
Rename macro from ALLOC_ARRAY to ALLOCATE_PTR_ARRAY
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 09 Oct 2017 14:55:23 +0900 |
parents | ff4ab9add959 |
children | 35b37fe8d3a7 |
files | src/parallel_execution/TaskManagerImpl.cbc src/parallel_execution/context.h src/parallel_execution/examples/bitonicSort/sort.cbc |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/TaskManagerImpl.cbc Sat Oct 07 19:00:22 2017 +0900 +++ b/src/parallel_execution/TaskManagerImpl.cbc Mon Oct 09 14:55:23 2017 +0900 @@ -34,7 +34,7 @@ void createWorkers(struct Context* context, TaskManager* taskManager, TaskManagerImpl* taskManagerImpl) { int i = 0; - taskManagerImpl->workers = (Worker**)ALLOC_ARRAY(context, Worker, taskManager->maxCPU); + taskManagerImpl->workers = (Worker**)ALLOCATE_PTR_ARRAY(context, Worker, taskManager->maxCPU); for (;i<taskManager->gpu;i++) { Queue* queue = createSynchronizedQueue(context); taskManagerImpl->workers[i] = (Worker*)createCPUWorker(context, i, queue);
--- a/src/parallel_execution/context.h Sat Oct 07 19:00:22 2017 +0900 +++ b/src/parallel_execution/context.h Mon Oct 09 14:55:23 2017 +0900 @@ -45,7 +45,7 @@ #define ALLOC(context, t) (&ALLOCATE(context, t)->t) -#define ALLOC_ARRAY(context, dseg, len) ({\ +#define ALLOCATE_PTR_ARRAY(context, dseg, len) ({\ struct Meta* meta = (struct Meta*)context->heap;\ context->heap += sizeof(struct Meta);\ union Data* data = context->heap; \
--- a/src/parallel_execution/examples/bitonicSort/sort.cbc Sat Oct 07 19:00:22 2017 +0900 +++ b/src/parallel_execution/examples/bitonicSort/sort.cbc Mon Oct 09 14:55:23 2017 +0900 @@ -13,7 +13,7 @@ __code sort_start(struct SortArray* sortArray){ sortArray->sortArray = new SortArray(); - sortArray->sortArray->array = (Integer**)ALLOC_ARRAY(context, Integer, MAX);//ALLOC_ARRAYはDSの配列なのでintではできない + sortArray->sortArray->array = (Integer**)ALLOCATE_PTR_ARRAY(context, Integer, MAX);//ALLOC_ARRAYはDSの配列なのでintではできない sortArray->sortArray->loop_counter = 0; sortArray->sortArray->loop_counter2 = 0; sortArray->sortArray->loop_counter3 = 0;