annotate TaskManager/test/UtilizationTest/main.cc @ 1697:ef1099c41449 draft

UtilizationTest
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Fri, 04 Oct 2013 16:41:23 +0900
parents
children 7673e2ad2623
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1697
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <stdio.h>
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <stdlib.h>
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include <string.h>
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include <sys/time.h>
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 #include "TaskManager.h"
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 #include "Func.h"
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 extern void task_init(void);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 static int task = 1;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 static int length = DATA_NUM;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 const char *usr_help_str = "Usage: ./multiply \n";
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 static int print_flag = 0;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 void TMend(TaskManager *);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 float *A,*B,*C;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 static double st_time = 0 ;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 static double ed_time = 0;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 static double
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 getTime() {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 struct timeval tv;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 gettimeofday(&tv, NULL);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 return tv.tv_sec + (double)tv.tv_usec*1e-6;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 static void
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 check_data() {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 for(int i=0; i<length;i++) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 if (A[i]*B[i]!=C[i]) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 printf("Multiplication went wrong.\n");
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 return;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 printf("Multiplication was succeeded.\n");
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 return;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 static void
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 print_result() {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 printf("---\n");
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 if(print_flag == 1) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 for (int i =0;i<length;i++) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 printf("%f * %f = %f \n",A[i],B[i],C[i]);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 printf("---\n");
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 void
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 init(int args, char *argv[]) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 for (int i = 1; argv[i]; ++i) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 if (strcmp(argv[i], "--length") == 0 || strcmp(argv[i], "-l") == 0) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 length = atoi(argv[++i]);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 } else if (strcmp(argv[i], "-t") == 0) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 task = atoi(argv[++i]);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 } else if (strcmp(argv[i], "-print") == 0) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 print_flag = 1;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 void
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 multi_init(TaskManager *manager)
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 A = new float[length];
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 B = new float[length];
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 C = new float[length];
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 for(int i=0; i<length; i++) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 A[i]=(float)(i+1000);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 B[i]=(float)(i+1)/10.f;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 HTask *multiply = manager->create_task(MULTIPLY_TASK);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 multiply->set_cpu((CPU_TYPE)((int)SPE_0));
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 multiply->set_inData(0,(memaddr)A, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 multiply->set_inData(1,(memaddr)B, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 multiply->set_outData(0,(memaddr)C, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 multiply->spawn();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 HTask* previous = multiply;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 for(int i=1;i<4;i++) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 multiply = manager->create_task(MULTIPLY_TASK);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 multiply->set_cpu((CPU_TYPE)((int)SPE_0+i));
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 multiply->set_inData(0,(memaddr)A, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 multiply->set_inData(1,(memaddr)B, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 multiply->set_outData(0,(memaddr)C, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 multiply->wait_for(previous);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 multiply->spawn();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 previous = multiply;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 // // HTask* second_multiply = manager->create_task(MULTIPLY_TASK);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 // // second_multiply->set_cpu(SPE_1);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 // // second_multiply->set_inData(0,(memaddr)A, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 // // second_multiply->set_inData(1,(memaddr)B, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 // // second_multiply->set_outData(0,(memaddr)C, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 // // second_multiply->wait_for(multiply);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 // second_multiply->spawn();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 // multiply = manager->create_task(MULTIPLY_TASK);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 // multiply->set_cpu(SPE_2);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 // multiply->set_inData(0,(memaddr)A, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 // multiply->set_inData(1,(memaddr)B, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 // multiply->set_outData(0,(memaddr)C, sizeof(float)*length);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 // multiply->spawn();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 int
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 TMmain(TaskManager *manager,int argc, char *argv[])
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 init(argc, argv);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 // Task Register
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 task_init();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 for (int i = 0; i < task; ++i) {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 multi_init(manager);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 st_time = getTime();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 manager->set_TMend(TMend);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 return 0;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 }
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 void
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 TMend(TaskManager *manager)
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 {
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 ed_time = getTime();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 print_result();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 printf("Time: %0.6f\n",ed_time-st_time);
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 check_data();
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 delete A;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 delete B;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 delete C;
ef1099c41449 UtilizationTest
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 }