Mercurial > hg > Game > Cerium
changeset 1833:cfa08ee89d64 draft
move printf in GpuScheduler
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Dec 2013 20:10:32 +0900 |
parents | be9076dc8d49 |
children | 9f5dbb845689 |
files | TaskManager/Gpu/GpuScheduler.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Gpu/GpuScheduler.cc Wed Dec 18 19:53:52 2013 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Wed Dec 18 20:10:32 2013 +0900 @@ -44,6 +44,7 @@ { clGetPlatformIDs(1, &platform_id, &ret_num_platforms); clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU, 1, &device_id, &ret_num_devices); + // clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_CPU, 1, &device_id, &ret_num_devices); // unavailable GPU if(ret_num_devices == 0) { exit(EXIT_FAILURE); @@ -150,6 +151,7 @@ } if(reply) { connector->mail_write(reply); + printf("GPU %d %s\t%lld\n",taskList->self->cpu_type,(char*)(gpu_task_list[taskList->tasks[0].command].name),taskList->task_end_time-taskList->task_start_time); reply = 0; } } @@ -347,7 +349,6 @@ } memout[cur].size = param - memin[cur].size; - tasklist->task_start_time = gettime(); if (tasklist->dim > 0) { ret = clEnqueueNDRangeKernel(command_queue, kernel[cur], tasklist->dim, NULL, &tasklist->x, 0, memin[cur].size, memin[cur].event, &kernel_event[cur]); @@ -379,12 +380,11 @@ nextTask = nextTask->next(); continue; } - printf("GPU %d %s\t%lld\n",tasklist->self->cpu_type,(char*)(gpu_task_list[tasklist->tasks[0].command].name),tasklist->task_end_time-tasklist->task_start_time); // wait kernel[1-cur] and write[1-cur] wait_for_event(kernel_event, memout, tasklist, cur); - // pipeline : 1-cur - // no pipeline : cur + // pipeline : cur + // no pipeline : 1-cur cur = 1 - cur; nextTask = nextTask->next(); }