<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/gottaniwiki/">
    <title>gottaniwiki @ ウィキ</title>
    <link>http://w.atwiki.jp/gottaniwiki/</link>
    <atom:link href="https://w.atwiki.jp/gottaniwiki/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>gottaniwiki @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2014-03-08T03:30:02+09:00</dc:date>
    <utime>1394217002</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/1.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/27.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/25.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/26.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/22.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/24.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/18.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/21.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/20.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/gottaniwiki/pages/19.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/1.html">
    <title>トップページ</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/1.html</link>
    <description>
      * ごった煮ウィキ

** 学習関連
*** 漢字
[[漢字の部屋]]
[[漢字の部屋（復習）]]
[[漢字辞書（漢検勉強用）]]
[[漢字辞書（漢字パズル用）]]

** プログラミング関連
*** ツール紹介
[[プログラミング/Tools/Mercurial]]
*** 並列計算（OpenCL）関連
- [[プログラミング/OpenCL]]
-- [[プログラミング/OpenCL/Wrapper]]
-- [[プログラミング/OpenCL/CA]]

**@wikiへようこそ
-ウィキはみんなで気軽にホームページ編集できるツールです。
-このページは自由に編集することができます。
-メールで送られてきたパスワードを用いてログインすることで、各種変更（サイト名、トップページ、メンバー管理、サイドページ、デザイン、ページ管理、等）することができます

**まずはこちらをご覧ください。
-[[@wikiの基本操作&gt;http://atwiki.jp/guide/category2.html]]
-[[用途別のオススメ機能紹介&gt;http://atwiki.jp/guide/category22.html]]
-[[@wikiの設定/管理&gt;http://atwiki.jp/guide/category6.html]]

**分からないことは？
-[[@wiki ご利用ガイド&gt;http://atwiki.jp/guide/]]
-[[よくある質問&gt;http://atwiki.jp/guide/category1.html]]
-[[無料で会員登録できるSNS内の@wiki助け合いコミュニティ&gt;http://sns.atfb.jp/view_community2.php?no=112]]
-[[@wiki更新情報&gt;http://www1.atwiki.jp/guide/pages/264.html]]
-[[@wikiへのお問合せフォーム&gt;http://atwiki.jp/helpdesk]]
等をご活用ください

**@wiki助け合いコミュニティの掲示板スレッド一覧
#atfb_bbs_list(112)

**その他お勧めサービスについて
-[[大容量１Ｇ、PHP/CGI、MySQL、FTPが使える無料ホームページは@PAGES&gt;&gt;http://atpages.jp/]]
-[[無料ブログ作成は@WORDをご利用ください&gt;&gt;http://atword.jp/]]
-[[2ch型の無料掲示板は@chsをご利用ください&gt;&gt;http://atchs.jp/]]
-[[フォーラム型の無料掲示板は@bbをご利用ください&gt;&gt;http://atbb.jp/]]
-[[お絵かき掲示板は@paintをご利用ください&gt;&gt;http://atpaint.jp/]]
-[[その他の無料掲示板は@bbsをご利用ください&gt;&gt;http://atbbs.jp/]]
-[[無料ソーシャルプロフィールサービス @flabo(アットフラボ)&gt;&gt;http://sns.atfb.jp]]

**おすすめ機能
-[[気になるニュースをチェック&gt;http://atwiki.jp/guide/17_174_ja.html]]
-[[関連するブログ一覧を表示&gt;http://atwiki.jp/guide/17_161_ja.html]]

**その他にもいろいろな機能満載！！
-[[@wikiプラグイン&gt;http://atwiki.jp/guide/category17.html]]
-[[@wiki便利ツール&gt;http://atwiki.jp/guide/category32.html]]
-[[@wiki構文&gt;http://atwiki.jp/guide/category16.html]]
-[[@wikiプラグイン一覧&gt;http://www1.atwiki.jp/guide/pages/264.html]]
-[[まとめサイト作成支援ツール&gt;http://atwiki.jp/matome/]]

**バグ・不具合を見つけたら？ 要望がある場合は？
お手数ですが、[[お問合せフォーム&gt;http://atwiki.jp/helpdesk]]からご連絡ください。

合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-03-08T03:30:02+09:00</dc:date>
    <utime>1394217002</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/27.html">
    <title>プログラミング/OpenCL/CA</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/27.html</link>
    <description>
      * OpenCL/セルオートマトン

** CA1.cl

 #define     BLOCK_SIZE      128
 
 __constant
 const  int  RULE[8] = {
     //  000 001 010 011 100 101 110 111
          0,  1,  0,  1,  1,  0,  1,  0
     };
 
 __kernel  void
 runCA90(
         __global  const  int  *     input1,
         __global  int  *            output,
         __local   int  *            work)
         
 {
     int  index  = get_global_id(0) + 1;
 ////    int  before = (input1[index - 1] * 4) + (input1[index +1]);
 ////    output[index]   = RULE[before];
 ////    return;
     
 ////    output[index]   = (input1[index - 1] ^ input1[index + 1]);
 ////    return;
 
     int  lx     = get_local_id(0)  + 1;
     
     work[lx]    = input1[index];
     if ( lx == 1 ) {
         work[0]             = input1[index - 1];
         work[BLOCK_SIZE +1] = input1[index + BLOCK_SIZE];
     }
     barrier(CLK_LOCAL_MEM_FENCE);
     
     int  before = (work[lx - 1] * 4) + (work[lx] * 2) + (work[lx +1]);
     output[index]   = RULE[before];
 ////    output[index]   = (work[lx - 1] ^ work[lx + 1]);
 }

** LifeGame.cpp
 #include    &quot;../Common/OclWrap.h&quot;
 #include    &quot;../Common/SimpleTimer.h&quot;
 #include    &lt;fstream&gt;
 #include    &lt;sstream&gt;
 #include    &lt;iostream&gt;
 
 const  int  MAX_TIMES   = 500;
 const  int  BLOCK_SIZE  = 128;
 
 typedef     int     INPUT_TYPE;
 
 void
 runOnHost(
         const  INPUT_TYPE  *   input1,
         INPUT_TYPE  *          output,
         const  size_t   NUM)
 {
     for ( size_t index = 1; index &lt;= NUM; ++ index ) {
         output[index]   = (input1[index - 1] ^ input1[index + 1]);
     }
     return;
 }
 
 int  main(int argc, char * argv[])
 {
     cl_int          err = CL_SUCCESS;
 
     const  size_t   NUM = (argc &gt;= 2 ? atol(argv[1]) : BLOCK_SIZE * 100000);
     const  size_t   BUFFER_SIZE = (NUM + 2);
     std::vector&lt;INPUT_TYPE&gt;    vecInput1(BUFFER_SIZE);
     std::vector&lt;INPUT_TYPE&gt;    vecInput2(BUFFER_SIZE);
     std::vector&lt;int&gt;            vecOutputCPU(BUFFER_SIZE, 0);
     std::vector&lt;INPUT_TYPE&gt;    vecOutputGPU(BUFFER_SIZE, 0);
 
     INPUT_TYPE  *  const   input1  = &amp;(vecInput1[0]);
     INPUT_TYPE  *  const   input2  = &amp;(vecInput2[0]);
     INPUT_TYPE  *  const   output1 = &amp;(vecOutputGPU[0]);
 
     CLWRAP::OclWrap wrapper;
 
     //  データの準備。  //
     for ( size_t i = 0; i &lt; BUFFER_SIZE; ++ i ) {
         input1[i]   = 0;
         input2[i]   = 0;
     }
     input1[BUFFER_SIZE / 2] = 1;
 
     //  Running By GPU  //
     CLWRAP::SimpleTimer  timer;
     CLWRAP::SimpleTimer  timeGPU;
 
     timer.startTimer();
     try {
         wrapper.setupInstance(std::cerr);
         wrapper.readSourceFile(&quot;CA1.cl&quot;);
         wrapper.buildPrograms(std::cerr);
         cl::Kernel  kernel(wrapper.getProgram(), &quot;runCA90&quot;, &amp;err);
 
         cl::Buffer  memInput1   = wrapper.createBuffer(
                 CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
                 sizeof(INPUT_TYPE) * BUFFER_SIZE, input1, &amp;err);
 
         cl::Buffer  memInput2   = wrapper.createBuffer(
                 CL_MEM_READ_ONLY | CL_MEM_COPY_HOST_PTR,
                 sizeof(INPUT_TYPE) * BUFFER_SIZE, input2, &amp;err);
 
         cl::CommandQueue    queue   = wrapper.createCommandQueue(0, &amp;err);
         kernel.setArg(2, sizeof(INPUT_TYPE) * (BLOCK_SIZE + 2) , NULL);
 
         timeGPU.startTimer();
         for ( size_t t = 0; t &lt; MAX_TIMES; t += 2 ) {
             kernel.setArg(0, memInput1);
             kernel.setArg(1, memInput2);
             queue.enqueueNDRangeKernel(kernel, cl::NullRange,
                 cl::NDRange(NUM), cl::NDRange(BLOCK_SIZE), NULL, NULL);
 
             kernel.setArg(0, memInput2);
             kernel.setArg(1, memInput1);
             queue.enqueueNDRangeKernel(kernel, cl::NullRange,
                 cl::NDRange(NUM), cl::NDRange(BLOCK_SIZE), NULL, NULL);
         }
         timeGPU.stopTimer();
 
         queue.enqueueReadBuffer(memInput1, CL_TRUE, 0,
             sizeof(INPUT_TYPE) * BUFFER_SIZE, output1, NULL, NULL);
 
 //    } catch ( cl::Error &amp;err ) {
 //        std::cerr   &lt;&lt; &quot;ERROR : &quot; &lt;&lt; err.what() &lt;&lt; &quot;(&quot; &lt;&lt; err.err() &lt;&lt; &quot;)&quot; &lt;&lt; std::endl;
     } catch ( std::exception &amp; err ) {
         std::cerr   &lt;&lt; &quot;ERROR : &quot; &lt;&lt; err.what() &lt;&lt; std::endl;
         exit( EXIT_FAILURE );
     } catch ( ... ) {
         std::cerr   &lt;&lt; &quot;Unknown Exception&quot; &lt;&lt; std::endl;
         exit( EXIT_FAILURE );                
     }
     timer.stopTimer();
 
     std::cerr   &lt;&lt; &quot;Run On GPU --- &quot;
                 &lt;&lt; &quot;CLOCK : &quot;  &lt;&lt; timer.getClockTime()
                 &lt;&lt; &quot;, REAL : &quot; &lt;&lt; timer.getRealTime()
                 &lt;&lt; std::endl;
     std::cerr   &lt;&lt; &quot;In Kernel  --- &quot;
                 &lt;&lt; &quot;CLOCK : &quot;  &lt;&lt; timeGPU.getClockTime()
                 &lt;&lt; &quot;, REAL : &quot; &lt;&lt; timeGPU.getRealTime()
                 &lt;&lt; std::endl;
 ////    const  size_t   SHOW_OFFSET = (BUFFER_SIZE - 30) / 2;
     const  size_t   SHOW_OFFSET = 0;
     for ( int i = 0; i &lt; 30; ++ i ) {
         std::cout   &lt;&lt; output1[i + SHOW_OFFSET];
     }
     std::cout   &lt;&lt; std::endl;
 
     //  Running By CPU  //
     input2[BUFFER_SIZE / 2] = 1;
     timer.startTimer();
     for ( size_t t = 0; t &lt; MAX_TIMES; t += 2 ) {
         runOnHost(input2, input1, NUM);
         runOnHost(input1, input2, NUM);
     }
     timer.stopTimer();
 
     std::cerr   &lt;&lt; &quot;Run On CPU --- &quot;
                 &lt;&lt; &quot;CLOCK : &quot;  &lt;&lt; timer.getClockTime()
                 &lt;&lt; &quot;, REAL : &quot; &lt;&lt; timer.getRealTime()
                 &lt;&lt; std::endl;
     for ( int i = 0; i &lt; 30; ++ i ) {
         std::cout   &lt;&lt; input1[i + SHOW_OFFSET];
     }
     std::cout   &lt;&lt; std::endl;
 
     return ( 0 );
 }
 
* リンク
** [[トップページ]]
合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-03-08T03:26:07+09:00</dc:date>
    <utime>1394216767</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/25.html">
    <title>プログラミング/OpenCL</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/25.html</link>
    <description>
      * OpenCL

** ヘルパー
- [[C++ ラッパー&gt;プログラミング/OpenCL/Wrapper]]

** サンプル
- これらのサンプルでは、上記のラッパーを利用しています。
-+ [[ベクトルの加算&gt;プログラミング/OpenCL/AddVector]]
-+ [[行列演算&gt;プログラミング/OpenCL/Matrix]]
-+ [[セルオートマトン&gt;プログラミング/OpenCL/CA]]

* リンク
** [[トップページ]]
合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-03-08T03:22:53+09:00</dc:date>
    <utime>1394216573</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/26.html">
    <title>プログラミング/OpenCL/Wrapper</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/26.html</link>
    <description>
      * OpenCL/Wrapper

** OclWrap.h
 #if !defined( OCLPROJ_COMMON_INCLUDED_OCL_WRAP_H )
 #    define   OCLPROJ_COMMON_INCLUDED_OCL_WRAP_H
 
 #pragma     once
 
 #include    &lt;iosfwd&gt;
 #include    &lt;string&gt;
 #include    &lt;vector&gt;
 #include    &lt;CL/cl.hpp&gt;
 
 //  クラスの前方宣言。  //
 
 namespace  CLWRAP  {
 
 //========================================================================
 //
 //    ErrCode.
 //
 /**
 **    エラーコード型。
 **/
 typedef  enum  {
     ERR_SUCCESS = 0,            /**&lt;  正常終了。    **/
     ERR_FAILURE = 1,            /**&lt;  異常終了。    **/
     ERR_FILE_NOT_FOUND  = 2,    /**&lt;  ファイルが見つからない。  **/
 }  ErrCode;
 
 //========================================================================
 //
 //    OclWrap class.
 //
 /**
 **    ラッパークラス。
 **/
 class  OclWrap
 {
 
 //========================================================================
 //
 //    初期化と終了。
 //
 public:
 
     //----------------------------------------------------------------
     /**   インスタンスを初期化する。
     **
     **  @param[out] os    ログ出力用ストリーム。
     **  @return     エラーコードを返す。
     **      -   異常終了時はエラーの種類を示す非ゼロ値を返す。
     **      -   正常終了の場合はゼロを返す。
     **/
     const   ErrCode
     setupInstance(
             std::ostream   &amp;os);
 
     //----------------------------------------------------------------
     /**   インスタンスの後始末をする。
     **
     **  @return     エラーコードを返す。
     **      -   異常終了時はエラーの種類を示す非ゼロ値を返す。
     **      -   正常終了の場合はゼロを返す。
     **/
     const   ErrCode
     clearInstance();
 
 //========================================================================
 //
 //    プログラムの読み込みとカーネルの準備。
 //
 public:
 
     //----------------------------------------------------------------
     /**   ソースファイルを指定する。
     **
     **  @param [in] filename    ファイル名。
     **  @return     エラーコードを返す。
     **      -   異常終了時はエラーの種類を示す非ゼロ値を返す。
     **      -   正常終了の場合はゼロを返す。
     **/
     const   ErrCode
     readSourceFile(
             const  std::string  &amp;filename);
 
     //----------------------------------------------------------------
     /**   読み込んだソースコードからプログラムをビルドする。
     **
     **  @param[out] os    ログ出力用ストリーム。
     **  @return     エラーコードを返す。
     **      -   異常終了時はエラーの種類を示す非ゼロ値を返す。
     **      -   正常終了の場合はゼロを返す。
     **/
     const   ErrCode
     buildPrograms(
             std::ostream   &amp;os);
 
     //----------------------------------------------------------------
     /**   ビルドしたプログラムからカーネルを作成する。
     **
     **  @param [in] kname   カーネル名。
     **  @return     エラーコードを返す。
     **      -   異常終了時はエラーの種類を示す非ゼロ値を返す。
     **      -   正常終了の場合はゼロを返す。
     **/
     const   ErrCode
     createKernel(
             const  std::string  &amp;kname);
 
 //========================================================================
 //
 //    メモリ管理。
 //
 public:
 
     //----------------------------------------------------------------
     /**   バッファを作成する。
     **
     **/
     cl::Buffer
     createBuffer(
         cl_mem_flags    flags,
         ::size_t        size,
         void  *         ptrHost = NULL,
         cl_int  *       ptrErr  = NULL)
     {
         return ( cl::Buffer(this-&gt;m_context, flags, size, ptrHost, ptrErr) );
     }
 
 //========================================================================
 //
 //    カーネルの実行。
 //
 public:
 
     //----------------------------------------------------------------
     /**   コマンドキューを作成する。
     **
     **/
     cl::CommandQueue
     createCommandQueue(
         cl_command_queue_properties properties = 0,
         cl_int  *   ptrErr  = NULL)
     {
         return ( cl::CommandQueue(this-&gt;m_context, this-&gt;m_device, properties, ptrErr) );
     }
 
 //========================================================================
 //
 //    Accessors.
 //
 public:
 
     //----------------------------------------------------------------
     /**   コンテキストを取得する。
     **
     **  @return     コンテキストの参照を返す。
     **/
     const  cl::Context  &amp;
     getContext()  const
     {
         return ( (this-&gt;m_context) );
     }
 
     const   cl::Device  &amp;
     getDevice()  const
     {
         return ( this-&gt;m_device );
     }
 
     //----------------------------------------------------------------
     /**   ビルドしたプログラムを取得する。
     **
     **  @return     プログラムの参照を返す。
     **/
     const  cl::Program  &amp;
     getProgram()  const
     {
         return ( this-&gt;m_program );
     }
 
 //========================================================================
 //
 //    Member Variables.
 //
 private:
     cl::Platform                m_clPlatform;
     cl::Context                 m_context;
     std::vector&lt;cl::Device&gt;     m_devices;
     cl::Device                  m_device;
     std::vector&lt;std::string&gt;    m_srcFiles;
     cl::Program                 m_program;
 };
 
 }   //  End of namespace  CLWRAP
 
 #endif

** OclWrap.cpp
 #include    &quot;OclWrap.h&quot;
 
 #pragma comment (lib, &quot;OpenCL.lib&quot;)
 
 #include    &lt;fstream&gt;
 #include    &lt;ostream&gt;
 
 namespace  CLWRAP  {
 
 //========================================================================
 //
 //    OclWrap class.
 //
 
 //========================================================================
 //
 //    初期化と終了。
 //
 
 //----------------------------------------------------------------
 //    インスタンスを初期化する。
 //
 const   ErrCode
 OclWrap::setupInstance(
         std::ostream   &amp;os)
 {
     cl_int  err = CL_SUCCESS;
 
     //  プラットフォーム取得。  //
     std::vector&lt;cl::Platform&gt;   platforms;
     cl::Platform::get(&amp;platforms);
 
     if ( (platforms.empty()) ) {
         throw  std::runtime_error(&quot;No Platforms!&quot;);
         return ( ERR_FAILURE );
     }
 
     os  &lt;&lt; &quot;# of Platforms = &quot; &lt;&lt; (platforms.size()) &lt;&lt; std::endl;
     this-&gt;m_clPlatform  = platforms.at(0);
 
     cl_context_properties   properties[] = {
         CL_CONTEXT_PLATFORM,
         reinterpret_cast&lt;cl_context_properties&gt;(this-&gt;m_clPlatform()),
         0
     };
 
     //  コンテキスト作成。  //
     this-&gt;m_context = cl::Context(
             CL_DEVICE_TYPE_GPU, properties, NULL, NULL, &amp;err);
     if ( err != CL_SUCCESS ) {
         throw  std::runtime_error(&quot;Failed to Create Context&quot;);
         return ( ERR_FAILURE );
     }
     cl::Context  &amp; context  = (this-&gt;m_context);
 
     //  デバイス取得。  //
     std::vector&lt;cl::Device&gt;  &amp; devices  = (this-&gt;m_devices);
     devices = context.getInfo&lt;CL_CONTEXT_DEVICES&gt;();
     os  &lt;&lt; &quot;# of Devices = &quot; &lt;&lt; (devices.size()) &lt;&lt; std::endl;
     if ( (devices.empty()) ) {
         throw  std::runtime_error(&quot;No Devices!&quot;);
         return ( ERR_FAILURE );
     }
     this-&gt;m_device  = devices.at(0);
 
     os  &lt;&lt; &quot;Device Name   : &quot; &lt;&lt; this-&gt;m_device.getInfo&lt;CL_DEVICE_NAME&gt;() &lt;&lt; std::endl
         &lt;&lt; &quot;Device Vendor : &quot; &lt;&lt; this-&gt;m_device.getInfo&lt;CL_DEVICE_VENDOR&gt;() &lt;&lt; std::endl;
 
     return ( ERR_SUCCESS );
 }
 
 //----------------------------------------------------------------
 //    インスタンスの後始末をする。
 //
 const   ErrCode
 OclWrap::clearInstance()
 {
     return ( ERR_SUCCESS );
 }
 
 //========================================================================
 //
 //    プログラムの読み込みとカーネルの準備。
 //
 
 //----------------------------------------------------------------
 //    ソースファイルを指定する。
 //
 const   ErrCode
 OclWrap::readSourceFile(
         const  std::string  &amp;filename)
 {
     //  この時点では未だ読み込まずに、ファイル名のリストだけ作成する。  //
     this-&gt;m_srcFiles.push_back(filename);
 
     return ( ERR_SUCCESS );
 }
 
 //----------------------------------------------------------------
 //    読み込んだソースコードからプログラムをビルドする。
 //
 const   ErrCode
 OclWrap::buildPrograms(
         std::ostream   &amp;os)
 {
     cl_int  err = CL_SUCCESS;
 
     typedef     std::vector&lt;std::string&gt;::const_iterator    NameItr;
 
     std::vector&lt;std::string&gt;    buffers;
     cl::Program::Sources        srcs;
 
     ErrCode     ret = ERR_SUCCESS;
     srcs.clear();
     srcs.reserve(this-&gt;m_srcFiles.size());
     const  NameItr  itrEnd  = this-&gt;m_srcFiles.end();
     for ( NameItr itr = (this-&gt;m_srcFiles.begin()); itr != itrEnd; ++ itr ) {
         //  存在しないファイルはまとめて通知した方が良いので、  //
         //  途中でファイル読み込みエラーが発生しても、          //
         //  ファイルの存在チェックだけは最後まで継続して行う。  //
         std::ifstream   fsSource(itr-&gt;c_str());
         if ( !fsSource ) {
             os  &lt;&lt; &quot;Source File [&quot; &lt;&lt; (*itr) &lt;&lt; &quot;] Not Found!&quot; &lt;&lt; std::endl;
             ret = ERR_FAILURE;
         }
         if ( ret != ERR_SUCCESS ) {
             //  途中でエラーを見つけている場合は、  //
             //  ファイルの存在チェックのみ行う。    //
             continue;
         }
 
         //  ファイルの内容を読み込む。  //
         buffers.push_back( std::string(
             std::istreambuf_iterator&lt;char&gt;(fsSource),
             (std::istreambuf_iterator&lt;char&gt;()) ));
         ////os  &lt;&lt; strSrc &lt;&lt; std::endl;
         const  std::string  &amp;strSrc = buffers.back();
         srcs.push_back( std::make_pair(strSrc.c_str(), strSrc.length()) );
     }
     if ( ret != ERR_SUCCESS ) {
         throw  std::runtime_error(&quot;Source File(s) Not Found!&quot;);
         return ( ret );
     }
 
     cl::Context   &amp; context = (this-&gt;m_context);
     cl::Program     program = cl::Program(context, srcs, &amp;err);
     if ( err != CL_SUCCESS ) {
         throw  std::runtime_error(&quot;Failed to Read Sources!&quot;);
         return ( ERR_FAILURE );
     }
 
     err = program.build(this-&gt;m_devices);
     std::string log = program.getBuildInfo&lt;CL_PROGRAM_BUILD_LOG&gt;(this-&gt;m_device);
     if ( err != CL_SUCCESS ) {
         os  &lt;&lt; &quot;Build Error ... \n&quot; &lt;&lt; log &lt;&lt; std::endl;
         throw  std::runtime_error(&quot;Build Error!&quot;);
         return ( ERR_FAILURE );
     }
 
     //  ソーステキストはもう要らない。  //
     buffers.clear();
     this-&gt;m_program = program;
 
     return ( ERR_SUCCESS );
 }
 
 //----------------------------------------------------------------
 //    ビルドしたプログラムからカーネルを作成する。
 //
 const   ErrCode
 OclWrap::createKernel(
         const  std::string  &amp;kname)
 {
     return ( ERR_SUCCESS );
 }
 
 }   //  End of namespace  CLWRAP
 
* リンク
** [[トップページ]]
合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-02-20T20:02:14+09:00</dc:date>
    <utime>1392894134</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/22.html">
    <title>プログラミング/Tools/Mercurial/Windows</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/22.html</link>
    <description>
      * 分散バージョン管理システム mercurial

* 使用例（Win/TortoiseHg）
ここでは、Windows 版の TortoiseHg の使用例を説明します。

** レポジトリの準備
*** 適当なディレクトリ（フォルダ）を準備します。
- ここでは、R:\MercurialRepos 以下にプロジェクト毎にレポジトリを作成します。
- 今回の例では、R:\MercurialRepos\Hello と言う名前にします。
- 作業手順は以下の通り：
-+ エクスプローラで、R:\MercurialRepos へ移動し、Hello ディレクトリ（フォルダ）を新規作成します。
-+ さらに、Hello を右クリックし、メニューから、TortoiseHg → Create Repository Here をクリック。&amp;ref(Mercurial-0001.jpg)
-+ レポジトリを作成と言うダイアログが出たら、「作成」をクリック。&amp;ref(Mercurial-0002.jpg)

*** レポジトリのクローンを作成します。
- このディレクトリ内で、そのまま作業することもできます。
- しかし、今回のサンプルでは、この場所は中央レポジトリと言う位置づけにして、作業場所は別に作ってみたいと思います。
- ここでは、作業場所を R:\MercurialWork 以下にしました（このディレクトリは予め作ってあるものとします）。
- 作業手順は以下の通り：
-+ エクスプローラで、R:\MercurialWork を開きます。
-+ 何もないところで、右クリックし、メニューから、TortoiseHg → Clone... をクリック。&amp;ref(Mercurial-0003.jpg)
-+ 「クローン」ダイアログが表示されたら、ソースとターゲットを適切に設定します：&amp;ref(Mercurial-0004.jpg)
-++ ソースは、コピー元、つまり最初に作った、R:\MercurialRepos\Hello を指定
-++ ターゲットは、好きな名前で結構です。今回は、R:\MercurialWork\HelloClone1 としておきました。
-++ 設定が終わったら、右下「クローン」をクリック。

** ファイルの登録とコミット
*** バージョン管理下に置きたいファイルを作成します。
- 作業場所 R:\MercurialWork\HelloClone1 にファイルを作成します。
-- 今回はサンプルと言うことで、以下のような内容で Hello.cpp を作成しました。
-- 序でに Hello.h と言う空のファイルも作成してみました。
 int  main(int argc, char * argv[])
 {
     return ( 0 );
 }
- このままでは、このファイルは未だ管理されていません。これらのファイルを登録します。
- 作業手順は以下の通り：
-+ エクスプローラで作業場所を開きます。
-+ 何もファイルを選択しないで右クリック、メニューから、TortoiseHg → Add Files を選択。&amp;ref(Mercurial-0005.jpg)
-+ ダイアログが出たら、「追加」をクリック。&amp;ref(Mercurial-0006.jpg)
-+- この画面で、登録するファイル、除外するファイルを選択することもできます。
-+- 中間生成物など、バージョン管理する必要の無いファイルは除外すると良いでしょう。
-+ 追加が完了すると、アイコンにプラスのマークがつきました。&amp;ref(Mercurial-0007.jpg)
-+- これで、これらのファイルは次回以降の「コミット」でレポジトリに記録されるようになります。
-+- この時点で間違ったファイルを登録してしまった場合、コミット前であれば、TortoiseHg → Forget Files で登録除外できます。

* リンク
** [[トップページ]]
合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-02-20T19:50:36+09:00</dc:date>
    <utime>1392893436</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/24.html">
    <title>プログラミング/Tools/Mercurial</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/24.html</link>
    <description>
      * 分散バージョン管理システム mercurial

** 使用例（Win/TortoiseHg）
- [[プログラミング Tips/Mercurial/Windows]]
- ここでは、Windows 版の TortoiseHg の使用例を説明します。
 
* リンク
** [[トップページ]]
合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-02-20T19:50:18+09:00</dc:date>
    <utime>1392893418</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/18.html">
    <title>漢字辞書（漢字パズル用）</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/18.html</link>
    <description>
      漢字パズル（漢字ナンクロ）でよく出てきた、難しい熟語の一覧。
解く時に、毎回調べるのは無駄なので作りました。

|No .|登録日|単語|よみ|意味|
|1|2014/02/06|意見広告|||
|2|2014/02/10|一家衆|||
|3|2014/02/12|一生面|||
|4|2014/02/06|一知半解|||
|5|2014/02/12|一文人形|||
|6|2014/02/14|雲合霧集|||
|7|2014/02/10|横面|||
|8|2014/02/12|下戸|||
|9|2014/02/10|化楽天|||
|10|2014/02/10|家人|||
|11|2014/02/06|家族制度|||
|12|2014/02/04|家刀自|いえとじ||
|13|2014/02/10|家難|||
|14|2014/02/10|火熱|||
|15|2014/02/10|寒冷高気圧|||
|16|2014/02/10|間日|||
|17|2014/02/06|気質物|||
|18|2014/02/06|気味合|||
|19|2014/02/12|吉事|||
|19|2014/02/12|急追|||
|20|2014/02/10|鏡花水月|きょうかすいげつ|はかない幻のたとえ。|
|21|2014/02/06|金目銀目|||
|22|2014/02/12|言下|||
|23|2014/02/12|五加|||
|24|2014/02/14|後天的|||
|25|2014/02/06|交情|||
|26|2014/02/14|合一|||
|27|2014/02/06|合文|||
|28|2014/02/04|合方|あいかた||
|29|2014/02/04|合薬|||
|30|2014/02/13|国定|||
|31|2014/02/12|根気仕事|||
|32|2014/02/12|山下水|||
|33|2014/02/06|山高|||
|34|2014/02/06|山里人|やまさとびと||
|35|2014/02/12|事事物々|||
|36|2014/02/14|字書|||
|37|2014/02/10|手水鉢|||
|38|2014/02/10|手腕家|||
|39|2014/02/06|緒戦|||
|40|2014/02/06|書記生|しょきせい|外務書記生の略。大使館等で庶務に従う職員。|
|41|2014/02/07|小路名|||
|42|2014/02/06|情趣|||
|43|2014/02/06|情状証人|||
|44|2014/02/12|色文|||
|45|2014/02/10|心一杯|||
|46|2014/02/12|心事|||
|47|2014/02/12|心誓文|||
|48|2014/02/04|新道|||
|49|2014/02/04|新風|||
|50|2014/02/10|人間模様|||
|51|2014/02/10|人相身|||
|52|2014/02/04|人民戦線|||
|53|2014/02/06|水運|||
|54|2014/02/12|水屋|||
|55|2014/02/12|水上機|||
|56|2014/02/04|酔生夢死|||
|57|2014/02/10|世間気|||
|58|2014/02/12|生者|||
|59|2014/02/04|戦国家法|||
|60|2014/02/06|速記録|そっきろく|速記術で書き取った後、普通の文字に直したもの。|
|61|2014/02/10|対日理事会|||
|62|2014/02/12|大屋根|||
|63|2014/02/12|大形|||
|64|2014/02/04|大所|||
|65|2014/02/14|大水|||
|66|2014/02/04|大道商人|||
|67|2014/02/07|大和大路|||
|68|2014/02/10|炭柱式採炭|||
|69|2014/02/12|端五|||
|70|2014/02/13|地外|||
|71|2014/02/12|地水|||
|72|2014/02/06|中間宿主|||
|73|2014/02/04|中新世|||
|74|2014/02/04|中正|||
|75|2014/02/13|朝雲暮雨|||
|76|2014/02/04|長大|||
|77|2014/02/14|追分|||
|78|2014/02/10|天漢|||
|79|2014/02/10|天機|||
|80|2014/02/10|天災地変|||
|81|2014/02/14|天山|||
|82|2014/02/14|天上天下|||
|83|2014/02/14|天長|||
|84|2014/02/13|天日製塩|||
|85|2014/02/10|土面|||
|86|2014/02/04|道外方|とうけがた||
|87|2014/02/10|道者|||
|88|2014/02/04|道人|||
|89|2014/02/06|得手勝手|||
|90|2014/02/12|日一日|||
|91|2014/02/10|年百年中|ねんびゃくねんじゅう|一年中いつも。|
|92|2014/02/10|白炭|||
|93|2014/02/12|箱物|||
|94|2014/02/06|品文字|||
|95|2014/02/14|風体|||
|96|2014/02/12|風土色|||
|97|2014/02/10|文心|||
|98|2014/02/06|報国|ほうこく|国恩に報いること|
|99|2014/02/06|法外組合|ほうがいくみあい||
|100|2014/02/10|法式|||
|101|2014/02/06|法人株主|||
|102|2014/02/10|夢見鳥|ゆめみどり||
|103|2014/02/04|夢殿|||
|104|2014/02/14|無宿|||
|105|2014/02/04|霧島山|||
|106|2014/02/07|明明年|||
|107|2014/02/06|木食明満|もくじきみょうまん|江戸後期の僧|
|108|2014/02/04|夜霧|||
|109|2014/02/12|野暮天|||
|110|2014/02/12|役人根性|||
|111|2014/02/12|用字|||
|112|2014/02/04|流注|||
|113|2014/02/10|力水|||
|114|2014/02/10|烈寒|||

* リンク
** [[トップページ]]

合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-02-15T17:26:26+09:00</dc:date>
    <utime>1392452786</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/21.html">
    <title>プログラミング Tips/OpenCL</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/21.html</link>
    <description>
      * OpenCL

** OpenCL C++ Binding のラッパー

* リンク
** [[トップページ]]
合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-02-15T17:00:45+09:00</dc:date>
    <utime>1392451245</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/20.html">
    <title>漢字の部屋（復習）</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/20.html</link>
    <description>
      問題集、過去問などで間違えた問題などをピックアップ。
あるいは、同じ参考書を何回やっても間違える問題など。

* 準１級
** 読み問題（音読み）
|問題|読み|
|亨通|？？？|
|鰐魚|？？？|
|葦火|？？？|
|蝦根|？？？|

** 読み問題（訓読み）
|問題|読み|
|濡い|？？？|
|燦らかさ|？？？|
|湊まる|？？？|

** 読み問題（表外読み）
|問題|読み|その他の表外読み|常用の読み|備考|
|玉の「台」|うてな|||「こし」じゃ無い|
|辛い|つらい|つらい、かのと|シン、からい|つらいは実は表外読み！！|

** 書き問題
|問題|標準回答|


** 四字熟語
|四字熟語|読み|意味|
|犬牙相制|けんがそうせい||
|同党伐異|どうとうばつい||

** 対義語・類義語
|語句|種別|選択肢|標準回答|備考|
|仰天|類義語|きっきょう|吃驚|訓読みでは「びっくり」|


* リンク
** [[トップページ]]

合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-02-02T17:59:50+09:00</dc:date>
    <utime>1391331590</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/gottaniwiki/pages/19.html">
    <title>漢字辞書（漢検勉強用）</title>
    <link>https://w.atwiki.jp/gottaniwiki/pages/19.html</link>
    <description>
      * 漢字

** 国字


* 熟語

* 熟字訓、当て読み

** 国名、地名
|単語|読み|
|牛津|オックスフォード|
|諾威|ノルウェー|
|牙買加|ジャマイカ|

* リンク
** [[トップページ]]

合計：&amp;counter()
今日：&amp;counter(today)
昨日：&amp;counter(yesterday)
トップページの合計：&amp;counter(total, page=トップページ)    </description>
    <dc:date>2014-01-26T07:48:29+09:00</dc:date>
    <utime>1390690109</utime>
  </item>
  </rdf:RDF>
