Mercurial > hg > Members > masakoha > masa
comparison 2013/April-2013/30th.html @ 9:e4748bca1eb3
mkdir 2013
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Jan 2014 04:18:59 +0900 |
parents | April-2013/30th.html@c9b2998eb516 |
children |
comparison
equal
deleted
inserted
replaced
8:0ce451f35622 | 9:e4748bca1eb3 |
---|---|
1 <!DOCTYPE html> | |
2 | |
3 <!-- | |
4 Google HTML5 slide template | |
5 | |
6 Authors: Luke Mahé (code) | |
7 Marcin Wichary (code and design) | |
8 | |
9 Dominic Mazzoni (browser compatibility) | |
10 Charles Chen (ChromeVox support) | |
11 | |
12 URL: http://code.google.com/p/html5slides/ | |
13 --> | |
14 | |
15 <html> | |
16 <head> | |
17 <title>2013-04-30</title> | |
18 | |
19 <meta charset='utf-8'> | |
20 <script | |
21 src='http://html5slides.googlecode.com/svn/trunk/slides.js'></script> | |
22 </head> | |
23 | |
24 <style> | |
25 /* Your individual styles here, or just use inline styles if that’s | |
26 what you want. */ | |
27 .slides article { background-image: none !important; background-color: white; } | |
28 | |
29 | |
30 </style> | |
31 | |
32 <body style='display: none'> | |
33 | |
34 <section class='slides layout-regular template-default'> | |
35 | |
36 <!-- Your slides (<article>s) go here. Delete or comment out the | |
37 slides below.--> | |
38 | |
39 <article> | |
40 <h1> | |
41 Ceriumによる | |
42 <br> | |
43 正規表現マッチャの実装 | |
44 </h1> | |
45 <p> | |
46 Masataka Kohagura | |
47 <br> | |
48 16th April , 2013 | |
49 </p> | |
50 </article> | |
51 | |
52 <article> | |
53 <h3> | |
54 研究目的 | |
55 </h3> | |
56 <p> | |
57 本研究室では、Cell用に作られたCeriumにて並列プログラミングを行なっている。 | |
58 近年、マルチコアCPUが主流となっているが、それをフルに使用させるためにはプログラムの並列度を上げる必要がある。(続く) | |
59 </p> | |
60 <p> | |
61 現在は正規表現を並列実装している段階である。 | |
62 </p> | |
63 </article> | |
64 | |
65 <article> | |
66 <h3> | |
67 今週までにしたこと | |
68 </h3> | |
69 <p> | |
70 a*bが含まれている行を出力するようにした。 | |
71 </p> | |
72 | |
73 <p> | |
74 (*は任意の文字のゼロ個以上の繰り返し) | |
75 </p> | |
76 </article> | |
77 | |
78 <article class='smaller'> | |
79 <h3> | |
80 Exec.cc | |
81 </h3> | |
82 <section> | |
83 <pre> | |
84 | |
85 for (; i < length; i++) { | |
86 if (i_data[i] == 0x0A) { | |
87 | |
88 if (match_flag == true) { | |
89 line_print(line_num,line_length,line_data); | |
90 } | |
91 match_flag = false; | |
92 line_length = 0; | |
93 line_num++; | |
94 } else { | |
95 line_data[line_length] = i_data[i]; | |
96 line_length++; | |
97 if (i_data[i] == 0x61) { | |
98 a_flag = true; | |
99 }else if ((i_data[i] == 0x62) && (a_flag == true)) { | |
100 match_flag = true; | |
101 }else if (i_data[i] == 0x20) { | |
102 a_flag = false; | |
103 } | |
104 } | |
105 } | |
106 </pre> | |
107 </article> | |
108 <article class='smaller'> | |
109 <h3> | |
110 line_print(line_num,line_length,line_data); | |
111 </h3> | |
112 <section> | |
113 <pre> | |
114 void line_print(int _line_num,int _line_length,char *input_data){ | |
115 | |
116 printf("%d : ",_line_num); | |
117 for (int k = 0; k < _line_length; k++) { | |
118 printf("%c",input_data[k]); | |
119 } | |
120 printf("\n"); | |
121 } | |
122 </pre> | |
123 </section> | |
124 </article> | |
125 | |
126 <article class='smaller'> | |
127 <h3> | |
128 実行結果(分割されないような小さなファイル) | |
129 </h3> | |
130 <section> | |
131 <pre> | |
132 [Masa]~% ./regex -file b.txt [~/hg/Cerium/example/regex_mas] | |
133 1 : ab aaa dddd ssss abab | |
134 2 : ab bbbbbbbbbb aaaaaaa | |
135 4 : ab aaaab | |
136 </pre> | |
137 <h3> | |
138 実行結果(分割されるようなファイル) | |
139 </h3> | |
140 <pre> | |
141 [Masa]~% ./regex -file c.txt [~/hg/Cerium/example/regex_mas] | |
142 1 : Pakistan who've volunteered to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. | |
143 5 : Pakistani military officials credit the lashkars with helping chase the Taliban out of Swat Valley and neighboring districts once infested with the militants. | |
144 6 : Pakistan who've volunteered to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. | |
145 [中略] | |
146 196 : Pakistan who've volunteered to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. | |
147 200 : Pakistani military officials credit the lashkars with helping chase the Taliban out of Swat Valley and neighboring districts once infested with the militants. | |
148 1 : red to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. | |
149 5 : Pakistani military officials credit the lashkars with helping chase the Taliban out of Swat Valley and neighboring districts once infested with the militants. | |
150 </pre> | |
151 </section> | |
152 </article> | |
153 | |
154 </body> | |
155 </html> |