Mercurial > hg > Members > masakoha > masa
view 2013/May-2013/7th.html @ 31:5c7d17c36564
fix 02nd.txt & add 03rd.txt
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 03 Feb 2014 17:47:55 +0900 |
parents | e4748bca1eb3 |
children |
line wrap: on
line source
<!DOCTYPE html> <!-- Google HTML5 slide template Authors: Luke Mahé (code) Marcin Wichary (code and design) Dominic Mazzoni (browser compatibility) Charles Chen (ChromeVox support) URL: http://code.google.com/p/html5slides/ --> <html> <head> <title>2013-05-07</title> <meta charset='utf-8'> <script src='http://html5slides.googlecode.com/svn/trunk/slides.js'></script> </head> <style> /* Your individual styles here, or just use inline styles if that’s what you want. */ .slides article { background-image: none !important; background-color: white; } </style> <body style='display: none'> <section class='slides layout-regular template-default'> <!-- Your slides (<article>s) go here. Delete or comment out the slides below.--> <article> <h1> Ceriumによる <br> 正規表現マッチャの実装 </h1> <p> Masataka Kohagura <br> 7th May , 2013 </p> </article> <article> <h3> 研究目的 </h3> <p> 本研究室では、Cell用に作られたCeriumにて並列プログラミングを行なっている。 近年、マルチコアCPUが主流となっているが、それをフルに使用させるためにはプログラムの並列度を上げる必要がある。(続く) </p> <p> 現在は正規表現を並列実装している段階である。 </p> </article> <article> <h3> 今週までにしたこと </h3> <p> C言語ポインタ完全制覇でポインタの勉強(半分ほど) </p> <p> </p> </article> <article class='smaller'> <h3> Exec.cc </h3> <section> <pre> for (; i < length; i++) { if (i_data[i] == 0x0A) { if (match_flag == true) { line_print(line_num,line_length,line_data); } match_flag = false; line_length = 0; line_num++; } else { line_data[line_length] = i_data[i]; line_length++; if (i_data[i] == 0x61) { a_flag = true; }else if ((i_data[i] == 0x62) && (a_flag == true)) { match_flag = true; }else if (i_data[i] == 0x20) { a_flag = false; } } } </pre> </article> <article class='smaller'> <h3> line_print(line_num,line_length,line_data); </h3> <section> <pre> void line_print(int _line_num,int _line_length,char *input_data){ printf("%d : ",_line_num); for (int k = 0; k < _line_length; k++) { printf("%c",input_data[k]); } printf("\n"); } </pre> </section> </article> <article class='smaller'> <h3> 実行結果(分割されないような小さなファイル) </h3> <section> <pre> [Masa]~% ./regex -file b.txt [~/hg/Cerium/example/regex_mas] 1 : ab aaa dddd ssss abab 2 : ab bbbbbbbbbb aaaaaaa 4 : ab aaaab </pre> <h3> 実行結果(分割されるようなファイル) </h3> <pre> [Masa]~% ./regex -file c.txt [~/hg/Cerium/example/regex_mas] 1 : Pakistan who've volunteered to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. 5 : Pakistani military officials credit the lashkars with helping chase the Taliban out of Swat Valley and neighboring districts once infested with the militants. 6 : Pakistan who've volunteered to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. [中略] 196 : Pakistan who've volunteered to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. 200 : Pakistani military officials credit the lashkars with helping chase the Taliban out of Swat Valley and neighboring districts once infested with the militants. 1 : red to join private militias, called lashkars. These groups have vowed to help Pakistan's military in fighting the Taliban. 5 : Pakistani military officials credit the lashkars with helping chase the Taliban out of Swat Valley and neighboring districts once infested with the militants. </pre> </section> </article> </body> </html>