comparison 13/April-2013/16th.html @ 51:d8f499590d82

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