comparison paper/src/init_twice_cerium.cc @ 16:958634b9fa32

make paper directory
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Wed, 17 Feb 2016 16:59:46 +0900
parents src/init_twice_cerium.cc@12d1c2f53258
children
comparison
equal deleted inserted replaced
15:94c9c506bba9 16:958634b9fa32
1 void
2 twice_init(TaskManager *manager, int* data, int length)
3 {
4 /**
5 * Create Task
6 * create_task(Task ID);
7 */
8 HTask* twice = manager->create_task(TWICE_TASK);
9
10 /**
11 * Set of Device
12 * set_cpu(CPU or GPU)
13 */
14 twice->set_cpu(SPE_ANY);
15
16 /**
17 * Set of Input Data
18 * set_inData(index, address of input data, size of input data);
19 */
20 twice->set_inData(0, data, sizeof(int)*length);
21
22 /**
23 * Set of OutPut area
24 * set_outData(index, address of output area, size of output area);
25 */
26 twice->set_outData(0, data, sizeof(int)*length);
27
28 /**
29 * Enqueue Task
30 * iterate(Number of Tasks)
31 */
32 twice->iterate(length);
33 }