annotate example/get_segment/README @ 354:cfd20d609ace draft

add example/get_segment and change spe/DrawSpan.cpp
author koba
date Wed, 15 Jul 2009 17:39:51 +0900
parents
children 492e60453124
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
354
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
1 /*
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
2 * $Id: README,v 1.5 2008/11/01 02:37:12 gongo Exp $
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
3 */
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
4
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
5 - 概要
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
6
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
7 "Hello, World!!" を出力するプログラムです。
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
8 タスク Hello が文字列を表示します。
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
9
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
10 - 実行方法
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
11
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
12 % ./hello [-count COUNT]
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
13
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
14 -count 表示する "Hello, World!!" の数(つまり、タスク Hello の数)です。
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
15
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
16 - 実行例 (-cpu は Cerium 標準のオプションです)
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
17
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
18 % ./hello
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
19 [0] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
20
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
21 % ./hello -count 10
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
22 [0] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
23 [1] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
24 [2] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
25 [3] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
26 [4] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
27 [5] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
28 [6] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
29 [7] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
30 [8] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
31 [9] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
32
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
33 % ./hello -count 10 -cpu 3
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
34 [0] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
35 [2] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
36 [3] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
37 [5] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
38 [6] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
39 [8] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
40 [9] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
41 [1] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
42 [4] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
43 [7] Hello, World!!
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
44
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
45 上の例では、Hello タスク 10 個を、
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
46 3 つの CPU に振り分けて実行しているので
cfd20d609ace add example/get_segment and change spe/DrawSpan.cpp
koba
parents:
diff changeset
47 表示が順になっていない -> 並列に実行されていることがわかります。