annotate example/share_task/README @ 839:1001c4bea1a0 draft

if unnecessary
author Yutaka_Kinjyo
date Fri, 28 May 2010 03:24:52 +0900
parents 028ffc9c0375
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 /*
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 * $Id: README,v 1.2 2008/10/20 08:01:29 gongo Exp $
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 - 概要
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 SPE 上に複数のタスクで共有できる領域を使う例題
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 タスクは二つあって
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 Load : int配列を受け取り、SPE上に allocate した 領域にコピーする。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 global_alloc(領域ID, サイズ) でそれが可能
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 Exec: global_get(ID) で allocate された領域を受け取り、
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 そこにある要素に対して値を加算していく
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 依存関係としては、まずは Load を先にしないと行けないので
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 / Exec 1
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20 Load - Exec 2
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 \ Exec 3
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 みたいな感じ
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25 補足:
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26 http://www.cr.ie.u-ryukyu.ac.jp/~game/pukiwiki/index.php?%A5%DB%A1%BC%A5%E0%2F2008-07-07
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29 - 実行方法
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
30
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 % ./share [-task numtask] [-length data_length]
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
33 -task Exec の数。
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 -length 配列の要素数
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 - 実行例
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39 % ./share
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 [TASK_LOAD] 000 001 002 003 004 005 006 007 008 009 010 011
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 [TASK_EXEC 00] 026 027 028 029 030 031 032 033 034 035 036 037
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
42
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
43 % ./share -task 3
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
44 [TASK_LOAD] 000 001 002 003 004 005 006 007 008 009 010 011
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 [TASK_EXEC 00] 026 027 028 029 030 031 032 033 034 035 036 037
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46 [TASK_EXEC 01] 052 053 054 055 056 057 058 059 060 061 062 063
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47 [TASK_EXEC 02] 078 079 080 081 082 083 084 085 086 087 088 089
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
48