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?

조회 수: 3 (최근 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 CenterFile Exchange에서 GPU Computing in MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by