ラベル raspberry の投稿を表示しています。 すべての投稿を表示
ラベル raspberry の投稿を表示しています。 すべての投稿を表示

2024年4月2日火曜日

Raspberry Pi OS (12.5)でvimのvisualモードがうざい

普段はvimなのでvimを入れたのだが、visualモードになってしまってめんどくさかった 

.vmrcに set mouse= を設定しても効かなかった 

どうやら

 /usr/share/vim/vim90/defaults.vim

 の設定が効いているっぽいので、こっちの設定をコメントアウトしてやったわ 

具体的には

 77 " In many terminal emulators the mouse works just fine.  By enabling it you
 78 " can position the cursor, Visually select and scroll with the mouse.
 79 " Only xterm can grab the mouse events when using the shift key, for other
 80 " terminals use ":", select text and press Esc.
 81 if has('mouse')
 82 if &term =~ 'xterm'
 83    set mouse=a
 84   else
 85     set mouse=nvi
 86   endif
 87 endif
 
 77 " In many terminal emulators the mouse works just fine.  By enabling it you
 78 " can position the cursor, Visually select and scroll with the mouse.
 79 " Only xterm can grab the mouse events when using the shift key, for other
 80 " terminals use ":", select text and press Esc.
 81 " if has('mouse')
 82 "  if &term =~ 'xterm'
 83 "    set mouse=a
 84 "  else
 85 "    set mouse=nvi
 86 "  endif
 87 " endif
とコメントアウト 

2021年9月16日木曜日

raspberry piでopencl

raspberry piに乗ってるGPUでopenCLしてみた
ぐぐると、VC4Cを使う方法がまず出てくる。
軽く試してみたところ
  • VC4CLStdLib はビルドできる。
  • VC4C はビルドエラー。
  • という状況になった。


    できないのもなんか悔しいので試行錯誤した結果、なんとか動いたので、その時のメモ。以下手順
    1. 必要なものを入れる
    2.   $ sudo apt-get update
        $ sudo apt-get upgrade
        $ sudo apt-get install cmake git libraspberrypi-dev
        $ sudo apt-get install ocl-icd-opencl-dev ocl-icd-dev
        $ sudo apt-get install opencl-headers clinfo
        $ sudo apt-get install clang clang-format clang-tidy
        
    3. gitからVC4Cを持ってくる
    4.   $ mkdir opencl
        $ cd opencl
        $ git clone https://github.com/doe300/VC4CLStdLib.git
        $ git clone https://github.com/doe300/VC4C.git
        $ git clone https://github.com/doe300/VC4CL.git
        
    5. 順番にビルド&インストール
    6.   $ bash -c "cd VC4CLStdLib && mkdir build && cd build && cmake .. && make && sudo make install && sudo ldconfig"
        $ bash -c "cd VC4C && mkdir build && cd build && cmake .. && make && sudo make install && sudo ldconfig"
        $ bash -c "cd VC4CL && mkdir build && cd build && cmake .. && make && sudo make install && sudo ldconfig"
        
    7. clinfoで確認
    8.   $ sudo clinfo