Why comm.gpu.AWGNChannel is not faster than comm.AWGNChannel?
2 次查看(过去 30 天)
显示 更早的评论
I am trying to understand GPU enabled communication System functions. In order to analyse it's processing speed, i wrote the below sample program,
M = 8;
modData = pskmod(randi([0 M-1],8192,1),M,pi/M);
tic;
% modData1 = gpuArray(modData);
gpuChannel = comm.gpu.AWGNChannel('NoiseMethod','Signal to noise ratio (SNR)','SNR',15);
channelOutput = gpuChannel(modData);
toc
tic;
Channel = comm.AWGNChannel('NoiseMethod','Signal to noise ratio (SNR)','SNR',15);
channelOutput1 = Channel(modData);
toc;
tic;
channelOutput2 = add_awgn_noise(modData,15);
toc;
tic;
channelOutput3 = awgn(modData,15);
toc;
scatterplot(channelOutput);
scatterplot(channelOutput1);
scatterplot(channelOutput2);
scatterplot(channelOutput3);
The output of this matlab programm is,
>> gpu_awgnchannel
Elapsed time is 0.067871 seconds.
Elapsed time is 0.002515 seconds.
Elapsed time is 0.000550 seconds.
Elapsed time is 0.000703 seconds.
As can be seen, the processing time taken by the gpu System function is more than ten times the normal function. Why is this Happening even though the GPU device is selected? Is it even running on the GPU? Is there any particular Settings to run on the gpu?
MATLAB : 2017a
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PSK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!