Mercurial > hg > Members > kono > Cerium
comparison example/Simple/spe/Twice.cc @ 635:8cc609285bbe
SimpleTask worked on Mac OS X
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Nov 2009 18:36:25 +0900 |
parents | 0558abba673c |
children | a909c50081c2 |
comparison
equal
deleted
inserted
replaced
634:0558abba673c | 635:8cc609285bbe |
---|---|
13 int *o_data; | 13 int *o_data; |
14 int length; | 14 int length; |
15 | 15 |
16 i_data = (int*)rbuf; | 16 i_data = (int*)rbuf; |
17 o_data = (int*)wbuf; | 17 o_data = (int*)wbuf; |
18 length = s->read_size(); | 18 length = s->read_size()/sizeof(int); |
19 | 19 |
20 for (int i = 0; i < length; i++) { | 20 for (int i = 0; i < length; i++) { |
21 o_data[i] = i_data[i] * 2; | 21 o_data[i] = i_data[i] * 2; |
22 } | 22 } |
23 | 23 |