マルチコアCPUとGPUを併用した並列計算 / Parallel computing combined use of multi-core CPU and multi-GPU
显示 更早的评论
以下のプログラムをマルチコアCPUとGPUを併用して並列計算をしたいのですが、parpoolで並列プールを呼び出しても、マルチコアCPU物理コア数のみしか呼び出せません。どのように設定すればGPUを併用した並列計算をできるのでしょうか?
I would like to perform parallel computation of the following program by combined use of multi-core CPU and multi-GPU, but when I call the parpool('local'), MATLAB can only be called the multi-core CPU. How should I set it up so that I can do the parallel calculation by combined use of multi-core CPU and multi-GPU?
n = 10000;
m = 500;
v = zeros(1,n);
parpool('local');
parfor i=1:n
A = rand(1,m);
B = rand(m,1);
v(i) = A*B;
end
delete(gcp('nocreate'));
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 並列計算の基礎 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!