Effacer les filtres
Effacer les filtres

how to use arrayfun for gpu

2 vues (au cours des 30 derniers jours)
Mate 2u
Mate 2u le 26 Avr 2012
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?

Réponse acceptée

Edric Ellis
Edric Ellis le 27 Avr 2012
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.

Plus de réponses (0)

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by