annotate example/word_count3/README @ 800:54f0180cea0f draft

run16 word count ( not yet worked. )
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 21 May 2010 07:47:25 +0900
parents 217d7c53442b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
508
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 /*
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 * $Id: README,v 1.2 2008/10/21 07:38:41 gongo Exp $
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3 */
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 - 概要
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 基本的には HelloWorld と同じなんですが、
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8 Hello Task が終了すると、set_post で指定した関数を呼び出すようにしています。
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 この関数を使えば、タスクが終了した事が検知できる。きっと多分。
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 引数は void* のみです。特に問題はないと信じてます。
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
12 API
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 set_post(void (*func)(void*), void *arg);
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 func の実装
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 void
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 func(void *p) {}
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
19 - 実行方法
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 % ./post [-cpu CPU_NUM] [-count COUNT]
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
23 -cpu 使用する SPU の数です。
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 -count 表示する "Hello, World!!" の数。
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
25 正確には post_func を使って繰り返し呼ぶ Hello Task の数。
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
26
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
27 - 実行例
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
28
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
29 % ./post
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
30 Hello, World!! post_func output 1
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
31 post function : 1
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
32
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
33 % ./post -count 10
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
34 Hello, World!! post_func output 10
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
35 post function : 10
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
36 Hello, World!! post_func output 9
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
37 post function : 9
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
38 Hello, World!! post_func output 8
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
39 post function : 8
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
40 Hello, World!! post_func output 7
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
41 post function : 7
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
42 Hello, World!! post_func output 6
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
43 post function : 6
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
44 Hello, World!! post_func output 5
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
45 post function : 5
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
46 Hello, World!! post_func output 4
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
47 post function : 4
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
48 Hello, World!! post_func output 3
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
49 post function : 3
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
50 Hello, World!! post_func output 2
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
51 post function : 2
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
52 Hello, World!! post_func output 1
217d7c53442b add word_count3
yutaka@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
53 post function : 1