Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/main.cc @ 1626:4fed76f4d101 draft
add gpuNum
author | shuhei kokubo |
---|---|
date | Thu, 30 May 2013 18:35:08 +0900 |
parents | 4443d59a8210 |
children | a11565fea1e5 |
comparison
equal
deleted
inserted
replaced
1625:6ff0c34c8a3c | 1626:4fed76f4d101 |
---|---|
33 | 33 |
34 int | 34 int |
35 main(int argc, char *argv[]) | 35 main(int argc, char *argv[]) |
36 { | 36 { |
37 int machineNum = 1; | 37 int machineNum = 1; |
38 int gpuNum = 0; | |
38 int speIdle = 0; | 39 int speIdle = 0; |
39 int useRefDma = 0; | 40 int useRefDma = 0; |
40 | 41 |
41 for (int i = 1; argv[i]; ++i) { | 42 for (int i = 1; argv[i]; ++i) { |
42 if (strcmp(argv[i], "-cpu") == 0) { | 43 if (strcmp(argv[i], "-cpu") == 0) { |
43 machineNum = atoi(argv[++i]); | 44 machineNum = atoi(argv[++i]); |
45 } else if (strcmp(argv[i], "-gpu") == 0) { | |
46 gpuNum = atoi(argv[++i]); | |
44 } else if (strcmp(argv[i], "-p") == 0) { | 47 } else if (strcmp(argv[i], "-p") == 0) { |
45 profile = 1; | 48 profile = 1; |
46 } else if (strcmp(argv[i], "-export") == 0) { | 49 } else if (strcmp(argv[i], "-export") == 0) { |
47 export_task_log = 1; | 50 export_task_log = 1; |
48 } else if (strcmp(argv[i], "-speidle") == 0) { // これなんだよ? | 51 } else if (strcmp(argv[i], "-speidle") == 0) { // これなんだよ? |
52 } else if (strcmp(argv[i], "-pre") == 0) { // deplicated | 55 } else if (strcmp(argv[i], "-pre") == 0) { // deplicated |
53 useRefDma |= 0x10; | 56 useRefDma |= 0x10; |
54 } | 57 } |
55 } | 58 } |
56 | 59 |
57 TaskManager *manager = new TaskManager(machineNum); | 60 TaskManager *manager = new TaskManager(machineNum, gpuNum); |
58 manager->init(speIdle,export_task_log, useRefDma); | 61 manager->init(speIdle,export_task_log, useRefDma); |
59 | 62 |
60 manager->set_TMend(defaultTMend); | 63 manager->set_TMend(defaultTMend); |
61 | 64 |
62 for (int i = 1; argv[i]; ++i) { | 65 for (int i = 1; argv[i]; ++i) { |