Mercurial > hg > Game > Cerium
comparison example/Prime/spe/PrintTask.cc @ 1243:9df036b11eae draft
fix printtask
author | Daichi Toma <amothic@gmail.com> |
---|---|
date | Tue, 01 Nov 2011 19:23:11 +0900 |
parents | 247da1f5e625 |
children | d2f70da2aa19 |
comparison
equal
deleted
inserted
replaced
1242:9d37fa6bc1da | 1243:9df036b11eae |
---|---|
15 } | 15 } |
16 | 16 |
17 long length = (long)smanager->get_param(0); /* 出力する範囲 */ | 17 long length = (long)smanager->get_param(0); /* 出力する範囲 */ |
18 bool *input = (bool*)smanager->get_input(rbuf, 0); /* 出力する配列 */ | 18 bool *input = (bool*)smanager->get_input(rbuf, 0); /* 出力する配列 */ |
19 | 19 |
20 input[0] = false; | |
21 input[1] = false; | |
22 | |
20 /* 素数の判定結果が1ならば出力する */ | 23 /* 素数の判定結果が1ならば出力する */ |
21 for (long i = 0; i < length; i++) { | 24 for (long i = 0; i < length; i++) { |
22 if ( input[i] == true ) { | 25 if ( input[i] == true ) { |
23 printf("%ld ",i); | 26 printf("%ld ",i); |
24 } | 27 } |