annotate example/Bulk/main.cc @ 701:44095db8cb61 draft TaskArray

Bulk task worked on Mac OS X
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 14 Dec 2009 12:46:48 +0900
parents ef08dd70eafb
children 64f1d80dc650
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include <stdio.h>
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include <stdlib.h>
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include <string.h>
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "TaskManager.h"
688
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 687
diff changeset
5 #include "Task.h"
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
6 #include "ListData.h"
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 #include "Func.h"
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 extern void task_init(void);
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 static int length = DATA_NUM;
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
12 static int task = 3;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
13 static int count = 3;
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
14 static int data_count = 3;
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 const char *usr_help_str = "Usage: ./twice [-length data_length] [-count task_num]\n\
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 -length Number of data (default DATA_NUM (Func.h))\n\
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 -count Number of task (default 1)\n";
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
21 static void
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 print_data(int *data, int size, const char *title)
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 printf("%s ---\n", title);
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 for (int i = 0; i < size; i++) {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 printf("%2d ", data[i]);
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 printf("\n");
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 /**
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 * タスク終了後の data1, data2 の確認
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 */
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
34 static void
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 twice_result(SchedTask *s, void *a, void *b)
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 int* data = (int*)a;
688
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 687
diff changeset
38 int* task_buf = (int*)b;
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
39 print_data(data, length*count, "after");
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 free(data);
688
77c89477daa8 on going...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 687
diff changeset
41 free(task_buf);
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
44 static int
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 init(int argc, char **argv)
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 for (int i = 1; argv[i]; ++i) {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 if (strcmp(argv[i], "-length") == 0) {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 length = atoi(argv[++i]);
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
50 } else if (strcmp(argv[i], "-task") == 0) {
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 task = atoi(argv[++i]);
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
52 } else if (strcmp(argv[i], "-count") == 0) {
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 count = atoi(argv[++i]);
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
54 } else if (strcmp(argv[i], "-data_count") == 0) {
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
55 data_count = atoi(argv[++i]);
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 return 0;
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
62 #if 0
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
63 static void print_ListData(int size, ListElement *t)
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
64 {
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
65 for(int i = 0;i<size;i++) {
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
66 printf("ListData %d %d %lx\n",i,t[i].size,(unsigned long)t[i].addr);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
67 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
68 }
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
69 #endif
699
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 698
diff changeset
70
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 void
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
72 twice_init(TaskManager *manager,int *data, int length)
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
76 for (int i = 0; i < length*count; i++) {
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 data[i] = i;
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
80 print_data(data, length*count, "before");
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 /**
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 * Create Task
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 * create_task(Task ID);
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 */
687
25afcd4ae380 test code for TaskArray
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 686
diff changeset
86
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
87 HTask *twice_main = manager->create_task_array(Twice,count,data_count+1,data_count,data_count);
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
88 Task *t = twice_main->next_task_array(Twice, 0);
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
89 #if 0
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
90 printf("allocate task size 0x%0x\n",t->size());
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
91 printf("allocate task total size 0x%0x = 0x%0x * %d\n",twice_main->r_size,
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
92 t->size(), count);
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
93 #endif
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
94 void *task_buf = twice_main->rbuf;
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
95 twice_main->set_post(twice_result, (void*)data, task_buf);
687
25afcd4ae380 test code for TaskArray
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 686
diff changeset
96
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
97 t = 0;
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 for(int i = 0;i<count;i++) {
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
99 t = twice_main->next_task_array(Twice, t);
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
100 int length2 = length/data_count;
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
101 t->set_param(0, (memaddr)data_count);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
102
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
103 for(int j = 0;j<data_count;j++) {
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
104 /**
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
105 * Set 32bits parameter
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
106 * add_param(32bit parameter);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
107 */
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
108 t->set_param(j+1, (memaddr)length2);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
109 /**
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
110 * Set of Input Data
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
111 * add_inData(address of input data, size of input data);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
112 */
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
113 t->set_inData(j,data, sizeof(int)*length2);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
114 /**
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
115 * Set of Output area
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
116 * add_outData(address of output area, size of output area);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
117 */
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
118 t->set_outData(j,data, sizeof(int)*length2);
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
119 data += length2;
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
120 }
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
121 #if 0
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
122 print_ListData(data_count,t->inData(0));
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
123 print_ListData(data_count,t->outData(0));
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
124 printf("pos 0x%0lx size 0x%0x\n",(unsigned long)t, t->size());
701
44095db8cb61 Bulk task worked on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 700
diff changeset
125 #endif
689
ecf63089f5bb Task Array generation worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 688
diff changeset
126 }
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
127 twice_main->spawn_task_array(t->next());
684
ecf7e09b1fe8 adding Array Task.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 659
diff changeset
128
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 twice_main->set_cpu(SPE_ANY);
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 /*
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 * set_post() で ppe task を渡せるようにしたい
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 */
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 // add Active Queue
684
ecf7e09b1fe8 adding Array Task.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 659
diff changeset
134 twice_main->spawn();
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 int
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 TMmain(TaskManager *manager,int argc, char *argv[])
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 if (init(argc, argv) < 0) {
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 return -1;
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 // Task Register
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 // ppe/task_init.cc
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 task_init();
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 for (int i = 0; i < task; ++i) {
700
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
149 int *data = (int*)manager->allocate(sizeof(int)*length*count);
ef08dd70eafb fix fix ...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 699
diff changeset
150 twice_init(manager, data, length);
659
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 }
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 return 0;
c7199f162b64 bulk task list start.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 }