I run the example "Stencil Operations on a GPU" in matlab command. I got following output. I don't have any advantage in using of Arrayfun on GPU compared with simple GPU array. my GPU device is GeForce GTX 980 Ti. is it reasonable?

4 ビュー (過去 30 日間)
paralleldemo_gpu_stencil
Average time on the CPU: 1.906ms per generation.
Average time on the GPU: 0.792ms per generation (2.4x faster).
Average time using GPU arrayfun: 0.996ms per generation (1.9x faster).
CPU: 1.906ms per generation.
Simple GPU: 0.792ms per generation (2.4x faster).
Arrayfun GPU: 0.996ms per generation (1.9x faster).

採用された回答

Joss Knight
Joss Knight 2016 年 2 月 26 日
Yes, it's perfectly reasonable.
  2 件のコメント
masoumeh mousavi
masoumeh mousavi 2016 年 2 月 26 日
編集済み: masoumeh mousavi 2016 年 2 月 26 日
thank you, is it the reason due to the kind of GPU? I expected more computational speed using arrayfun on GPU as claimed!(it means the usage of arrayfun strictly depends on the kind of GPU!?)
Joss Knight
Joss Knight 2016 年 3 月 2 日
The speed of everything you do on the GPU depends on the kind of GPU. You should always experiment with different approaches and use whichever works best for you - we don't claim that arrayfun will always be the best approach. It looks like for your device MATLAB is doing a great job of making the simplest approach the fastest, which is ideal.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGPU Computing in MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by