Mercurial > hg > Game > Cerium
diff example/many_task/main.cc @ 227:e7faaf516be1 draft
add sort
author | gongo@localhost.localdomain |
---|---|
date | Wed, 11 Feb 2009 11:09:39 +0900 |
parents | 305ac1897c50 |
children | 56314060907f |
line wrap: on
line diff
--- a/example/many_task/main.cc Wed Feb 11 11:02:45 2009 +0900 +++ b/example/many_task/main.cc Wed Feb 11 11:09:39 2009 +0900 @@ -5,9 +5,6 @@ #include "TaskManager.h" #include "Func.h" #include "sort.h" -#include "prof.h" - -//#define DEBUG_CHECK extern void task_init(void); @@ -35,17 +32,11 @@ static void show_data(void) { -#if defined(DEBUG_CHECK) - for(int i = 0; i < data_length; i++) { - printf("%d\n", data[i].index); - } -#else puts("-----------------------------------------------"); for(int i = 0; i < data_length; i++) { printf("data[%02d].index = %d\n", i, data[i].index); } puts("-----------------------------------------------"); -#endif } const char *help_str = "Usage: ./sort [option]\n \ @@ -86,11 +77,10 @@ sort_init(manager->get_cpuNum(), length); st_time = getTime(); - //StartProf(ts); + // 全ての Task が終了した後に実行する関数をセット manager->set_TMend(TMend); - return 0; } @@ -98,17 +88,6 @@ TMend(void) { ed_time = getTime(); - //show_data(); -#if !defined(DEBUG_CHECK) - //StopProf(te, ts); - - //unsigned tmps, tmpe; - - // profile のコスト計算 - //StartProf(tmps); - //StopProf(tmpe, tmps); - - //PrintProf((te - tmpe)); + show_data(); printf("Time: %0.6f\n",ed_time-st_time); -#endif }