Hi
I am trying to change a code that has double for loop to use GPU(single gpu right now).
But it seems fall in endless loop,because simple double for loop ends almost 300 sec but parfor and inner for loop does not end when elapsed 1000 sec over.
please find my error in my code below.
Thank you.
original code
ft_mcd = gpuArray(zeros(npulse,nrbin));
R_real = gpuArray(R_ori + R_ori .* (1 - D_fa_rcmc(k,:)) ./ D_fa_rcmc(k,:));
z = gpuArray(fft(temp_ft_rcd(k,:)));
zp = gpuArray([z(1:half_len) zeros(1, zpadlen) z(half_len + 1:end)]);
tf_sub = gpuArray(ifft(zp) * m);
tf_sub2 = gpuArray([tf_sub tf_sub(1, end:-1:1)]);
idx = gpuArray(round((R_real-R_ori)/ori_sam_dist*m));
temp_ft_mcd = gpuArray(zeros(1,nrbin));
temp_index = gpuArray(1 + m*(rn-1) + idx(rn));
temp_ft_mcd(1,rn) = tf_sub2(1, temp_index);
ft_mcd(k,:) = temp_ft_mcd(k,:);