作者k0286 (k0)
看板MATLAB
标题[问题] gpuArray的值
时间Tue Oct 14 20:33:27 2014
我有一些code想透过gpu跑,
於是去研究了一下PCT box提供的gpu functions
然後写一些测试程式,
发现
data丢到gpuArray跑fft和正常跑fft结果不同
点workspace的变数来看,明明是相同的,但是isrqual却说是不同的
这是什麽问题呢?
==以下是我的测试程式
reset(gpuDevice(1));
% c=rand(10);
d=gpuArray(rand(10,1,'double'));
c=gather(d);
isequal(c,d)
e=fft(c);
f=fft(d);
isequal(e,f)
h=gather(f);
isequal(e,h)
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.251.0.88
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/MATLAB/M.1413290010.A.4B8.html
1F:推 sunev: numerical error ? 10/14 23:25
2F:→ k0286: 可是两边都是double运算阿 10/15 06:39
3F:推 sunev: double 运算就不会有numerical error? 10/15 11:05