view 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
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-04-30</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>
          16th April , 2013
        </p>
      </article>
      
      <article>
        <h3>
        研究目的
        </h3>
        <p>
        本研究室では、Cell用に作られたCeriumにて並列プログラミングを行なっている。
近年、マルチコアCPUが主流となっているが、それをフルに使用させるためにはプログラムの並列度を上げる必要がある。(続く)
        </p>
        <p>
        現在は正規表現を並列実装している段階である。
        </p>
      </article>

      <article>
        <h3>
          今週までにしたこと
        </h3>
        <p>
        a*bが含まれている行を出力するようにした。
        </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>