function [a,b]=skaicia (lab,dydis,z)
comi=gpuArray(0.05);
t=gpuArray(0.6);
d=gpuArray(50001);
langas=gpuArray(50000);
atidaryta=gpuArray(50000);
x1 = zeros(dydis,65,1);
for i=1:z
x1(:,:,i)=lab(i*dydis+1-dydis:i*dydis,:);
x=gpuArray(x1(:,:,i));
x23=x(1:end-d,:);
[n1,n2]=size(x);
n1=gpuArray(n1);
n2=gpuArray(n2);
xt=permute(x,[2 1 3]);
dx1=(d-langas-1:d-2);
dx=permute(dx1,[2 1])+ (1:n1-d);
[sujn1(:,:,i),sujn2(:,:,i)]=mazinta(xt,dx,n2,n1,d,x23,t,langas,atidaryta,comi);
end
a=sujn1;
b=sujn2;
end
2 Comments
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/453461-is-there-a-way-to-speed-up-for-loop-when-grouped-with-gpu#comment_688039
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/453461-is-there-a-way-to-speed-up-for-loop-when-grouped-with-gpu#comment_688039
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/453461-is-there-a-way-to-speed-up-for-loop-when-grouped-with-gpu#comment_688095
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/453461-is-there-a-way-to-speed-up-for-loop-when-grouped-with-gpu#comment_688095
Sign in to comment.