# HG changeset patch # User Tatsuki IHA # Date 1516544839 -32400 # Node ID 3bb5da57ddb5c605bbec31ecf3645f03c13d47c5 # Parent e28e3bd6b181dd5e881e20b1b0b6c2270535e2a2 Fix diff -r e28e3bd6b181 -r 3bb5da57ddb5 src/parallel_execution/RedBlackTreeReWright.cbc --- a/src/parallel_execution/RedBlackTreeReWright.cbc Sun Jan 21 22:30:44 2018 +0900 +++ b/src/parallel_execution/RedBlackTreeReWright.cbc Sun Jan 21 23:27:19 2018 +0900 @@ -211,7 +211,7 @@ tree->current->right->color = Black; goto stack->pop(insertBalance); - } else if(tree->current->color == Black && tree->current->left->color == Red && tree->current->left->right->color == Red) { + } else if (tree->current->color == Black && tree->current->left->color == Red && tree->current->left->right->color == Red) { struct Node* tmpCurrent = tree->current; struct Node* tmpLeft = tree->current->left; struct Node* tmpLeftRight = tree->current->left->right; diff -r e28e3bd6b181 -r 3bb5da57ddb5 src/parallel_execution/SemaphoreImpl.cbc --- a/src/parallel_execution/SemaphoreImpl.cbc Sun Jan 21 22:30:44 2018 +0900 +++ b/src/parallel_execution/SemaphoreImpl.cbc Sun Jan 21 23:27:19 2018 +0900 @@ -19,7 +19,7 @@ } __code pOperationSemaphoreImpl1(struct SemaphoreImpl* semaphore, __code next(...)) { - if(semaphore->value == 0) { + if (semaphore->value == 0) { pthread_cond_wait(&semaphore->cond, &semaphore->mutex); goto meta(context, C_pOperationSemaphoreImpl1); } diff -r e28e3bd6b181 -r 3bb5da57ddb5 src/parallel_execution/TaskManagerImpl.cbc --- a/src/parallel_execution/TaskManagerImpl.cbc Sun Jan 21 22:30:44 2018 +0900 +++ b/src/parallel_execution/TaskManagerImpl.cbc Sun Jan 21 23:27:19 2018 +0900 @@ -99,7 +99,7 @@ __code setWaitTaskTaskManagerImpl(struct TaskManagerImpl* taskManager, struct Context* task, __code next(...)) { int i = taskManager->loopCounter; - if(task->idg+i < task->maxIdg) { + if (task->idg+i < task->maxIdg) { struct Queue* queue = GET_WAIT_LIST(task->data[task->idg + i]); taskManager->loopCounter++; goto queue->put(task, setWaitTaskTaskManagerImpl); @@ -122,7 +122,7 @@ task->taskManager = taskManager; if (task->idgCount == 0) { // iterator task is normal task until spawned - if(task->iterator != NULL && task->iterate == 0) { + if (task->iterator != NULL && task->iterate == 0) { pthread_mutex_unlock(&taskManagerImpl->mutex); struct Iterator* iterator = task->iterator; goto iterator->exec(task, taskManagerImpl->cpu - taskManagerImpl->gpu, next(...)); @@ -156,7 +156,7 @@ __code taskSend1(struct TaskManagerImpl* taskManager, struct Context* task, __code next(...)) { int workerId = taskManager->sendGPUWorkerIndex; - if(++taskManager->sendGPUWorkerIndex >= taskManager->cpu) { + if (++taskManager->sendGPUWorkerIndex >= taskManager->cpu) { taskManager->sendGPUWorkerIndex = taskManager->gpu; } pthread_mutex_unlock(&taskManager->mutex); @@ -166,7 +166,7 @@ __code taskSend2(struct TaskManagerImpl* taskManager, struct Context* task, __code next(...)) { int workerId = taskManager->sendCPUWorkerIndex; - if(++taskManager->sendCPUWorkerIndex >= taskManager->maxCPU) { + if (++taskManager->sendCPUWorkerIndex >= taskManager->maxCPU) { taskManager->sendCPUWorkerIndex = taskManager->cpu; } pthread_mutex_unlock(&taskManager->mutex); diff -r e28e3bd6b181 -r 3bb5da57ddb5 src/parallel_execution/examples/bitonicSort/sort.cbc --- a/src/parallel_execution/examples/bitonicSort/sort.cbc Sun Jan 21 22:30:44 2018 +0900 +++ b/src/parallel_execution/examples/bitonicSort/sort.cbc Sun Jan 21 23:27:19 2018 +0900 @@ -36,7 +36,7 @@ __code print(struct SortArray* sortArray){//配列表示 if (sortArray->sortArray->loop_counter == MAX){//ループの終了→ソートへ printf("\n"); - if(sortArray->sortArray->sort_finish == 1){//ソート終わってたら終了 + if (sortArray->sortArray->sort_finish == 1){//ソート終わってたら終了 goto meta(context, C_exit_code); } sortArray->sortArray->loop_counter = 0; diff -r e28e3bd6b181 -r 3bb5da57ddb5 src/parallel_execution/examples/boundedBuffer/SemaphoreImpl.cbc --- a/src/parallel_execution/examples/boundedBuffer/SemaphoreImpl.cbc Sun Jan 21 22:30:44 2018 +0900 +++ b/src/parallel_execution/examples/boundedBuffer/SemaphoreImpl.cbc Sun Jan 21 23:27:19 2018 +0900 @@ -22,7 +22,7 @@ } __code pOperationSemaphoreImpl1(struct SemaphoreImpl* semaphore, __code next(...)) { - if(semaphore->value == 0) { + if (semaphore->value == 0) { context->next= C_pOperationSemaphoreImpl; struct Queue* queue = semaphore->waitThreadQueue; goto queue->put(context, pOperationSemaphoreImpl2); // put this context(thread, process) diff -r e28e3bd6b181 -r 3bb5da57ddb5 src/parallel_execution/examples/twice/printArray.cbc --- a/src/parallel_execution/examples/twice/printArray.cbc Sun Jan 21 22:30:44 2018 +0900 +++ b/src/parallel_execution/examples/twice/printArray.cbc Sun Jan 21 23:27:19 2018 +0900 @@ -16,7 +16,7 @@ __code printArray1(struct Array* array, __code next(...), struct LoopCounter* loopCounter){ int i = loopCounter->i; //printf("%d\n", array->array[i]); - if(i < GET_LEN(array->array)) { + if (i < GET_LEN(array->array)) { if (array->array[i] == i*2) { loopCounter->i++; goto meta(context, C_printArray1);