how to use arrayfun for gpu

Hi there, I am calling a function which is a sample used from a matlabs webinar:
for n = 1:100
for m = n:100
[~,~,sh(n,m)] = leadlag(Close,n,m,annualScaling, 0.0006);
end
end
How do I alter this so that gpu is using arrarfun to speed it up?

 채택된 답변

Edric Ellis
Edric Ellis 2012년 4월 27일

0 개 추천

In general, arrayfun allows you to speed up cases where you have lots of elementwise operations to perform. You need to look inside the 'leadlag' function to try and find places where arrayfun can be applied.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 GPU Computing in MATLAB에 대해 자세히 알아보기

태그

질문:

2012년 4월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by