diff example/dependency_task/main.cc @ 258:b12e689e17b1 draft

change example/dependency_task
author aaa
date Wed, 03 Jun 2009 19:41:39 +0900
parents 028ffc9c0375
children 768452fab95e
line wrap: on
line diff
--- a/example/dependency_task/main.cc	Wed Jun 03 18:50:15 2009 +0900
+++ b/example/dependency_task/main.cc	Wed Jun 03 19:41:39 2009 +0900
@@ -10,7 +10,7 @@
 int length = DATA_NUM;
 int depend_flg = 1;
 
-char *help_str = "Usage: ./dependency [-cpu spe_num] [-nodepend]\n\
+const char *usr_help_str = "Usage: ./dependency [-cpu spe_num] [-nodepend]\n\
   -nodepend  No Depenendcy";
 
 void
@@ -19,7 +19,7 @@
     HTaskPtr t_exec;
     HTaskPtr t_print;
 
-    idata = (int*)manager->malloc(sizeof(int)*length*2);
+    idata = (int*)manager->allocate(sizeof(int)*length*2);
     for (int i = 0; i < length*2; i++) {
 	idata[i] = 0;
     }
@@ -55,17 +55,13 @@
 	if (strcmp(argv[i], "-nodepend") == 0) {
 	    depend_flg = 0;
 	}
-	if (strcmp(argv[i], "--help") == 0) {
-            printf("%s\n", help_str);
-            return -1;
-	}
     }
 
     return 0;
 }
 
 int
-cerium_main(int argc, char *argv[])
+TMmain(int argc, char *argv[])
 {
     if (init(argc, argv) < 0) {
 	return -1;