Why does GPU processing not offer significant speed-up over CPU processing for simple processes like addition of two matrices?
古いコメントを表示
I measured the time required to create two large matrices using RANDN and then to add them. There was no significant difference between the times taken by the CPU and the GPU.
The code to measure the CPU processing time is:
size = 10000;
tic
x = rand(size);
y = rand(size);
z = x + y;
toc
The code to measure the GPU processing time is:
size = 10000;
tic
xm = gpuArray(rand(size));
ym = gpuArray(rand(size));
zm = xm + ym;
toc
The attached excel sheet tabulates the speed-up for different sizes of the matrices.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で GPU Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!