How can I solve the unneccesary communication overhead problem caused by the broadcast variable error?

4 ビュー (過去 30 日間)
%% Errror description Even though I tried to solve it by assigning variable Y to a temporary variable, it didn't work?
%% The entire array or structure Y-temp is broadcast variable. This might result in unneccesary comunicaiton overhead?
for k=0:1:(M-1)
z_plane_path(k+1)=A*W^(-k);
end
ChirpZ_outY(1:M)=0;
Y_temp=Y(:,1);
parfor k=0:M-1
sum1=0;
for n=0:N-1
sum1=sum1+(Y_temp(n+1)*z_plane_path(k+1)^(-n));
end
ChirpZ_outY(k+1)=sum1;
end
DFT_SS_Eq_out=ChirpZ_outY/N*2;
disp(i);
end

回答 (1 件)

Shubham
Shubham 2024 年 9 月 18 日
編集済み: Shubham 2024 年 9 月 18 日
Hey Alexi,
I understand that you are facing the following error: "The entire array or structure Y-temp is broadcast variable. This might result in unneccesary comunicaiton overhead" through your above code snippet.
I hope this helps!

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by