Parallel and Concurrent Programming in Haskell 読書会 第4回
![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH Floyd-Warshal で Int を入力に取ると、各 i に対して「f i を計算する kernel 」を生成する(=O(n)個の kernel を生成する) という意味になる。でも欲しいのは「各 i に対して f i を計算する」kernel を一つだけ。
2013-09-29 16:56:47![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
CUDA使うときにOSの制限により長時間カーネルを走らせるとエラーになってしまうのでめんどくさかった記憶が。Linuxだと画面出力しているGPUでやらかすと画面更新が止まります。焦ります #PCPjH
2013-09-29 17:04:20![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
accelerate-cuda.cabal [http://t.co/fMXWdcO5k2 ] の Flag debug #miteru #PCPjH
2013-09-29 17:05:16![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
OpenCL 版欲しい → この本では特に言及されてませんが、accelerate パッケージのドキュメントにあるように「ICC/Cilk + OpenCL 版」が現在進行形で開発されています。 https://t.co/euZo3VyyrC #PCPjH
2013-09-29 17:09:47![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
会場で ICC/Cilk + OpenCL 版のみを OpenCL 版として紹介したのは、もう一つの OpenCL 版 [https://t.co/hMQPcLLQwu ] は長らくメンテされていないためです…… #PCPjH
2013-09-29 17:18:14![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH ? 演算子って ImplicitParams と衝突しないのか。試した範囲ではちゃんとパースされるっぽいけど。
2013-09-29 17:18:29![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH Accelerate の Mandelbrot が CPU と比較されてないのでピンとこないと文句が出ております。
2013-09-29 17:36:52![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH この mandelbrot って、どうも繰り返し毎に device から host に戻って device 呼び出し直してるように見えるんだけど、n 回漸化式適用するまでずっと GPU 側で繰り返せないのかな?
2013-09-29 17:38:20![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
parconc-examples の Mandelbrow のコード https://t.co/Nw63uS5r9R #PCPjH
2013-09-29 17:40:43![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
accelerate-io パッケージの http://t.co/raqJP41q9v モジュール http://t.co/3PT2wQIEqL #miteru #PCPjH
2013-09-29 17:42:38![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH Concurrent 編開始。スレッドは forkIO で作る。動作は pthreads のスレッド作成とかと一緒。
2013-09-29 17:55:04![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH Concurrent Haskell では main thread が main から返ると他のスレが全部直ちにヌッ殺されて終了する。ウェイトしてほしけりゃ自分で書きな!
2013-09-29 17:59:20![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH スレ同士の通信は MVar。MVar というのは何回でも読み書きできる IVar です。IVar は一回しか読み書きできない MVar です。#循環定義
2013-09-29 18:00:35![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
Fire-and-forgetってのは http://t.co/ZFDHvEtfIo にあるように発火したらあとは自動で追いかけるような何からしい? #PCPjH
2013-09-29 18:11:37![](https://tgfile.tg-static.com/static/web/img/placeholder.gif)
#PCPjH 複合的なデータをMVar に突っ込んで takeMVar / putMVar するだけで排他アクセスが実現する! #おいしい
2013-09-29 18:23:15