我有一个程式已经用上parfor加速了
在我i7-3770 with 4-parpool的PC上面大概需要200s来完成一次计算
而我大概需要算至少7.5k次....Orz
请问在这个逻辑下还有办法更快吗?
我有560ti可用但我目前还没想到适合的算法,现在搬上GPU算不划算
先感谢各位了
程式大约如下:
parfor uu1=1:60
for uu2=1:60
if (uu2 == uu1)
continue
end
for uu3=1:60
if(uu3 == uu2)
continue
elseif(uu3 == uu1)
continue
end
for uu4=1:60
if(uu4 == uu3)
continue
elseif(uu4 == uu2)
continue
elseif(uu4 == uu1)
continue
example1 = norm(exmp(:,:,uu1)*ex(1,1,uu1)) / ...
norm(examp(:,:,uu1)*ex(2,1,uu2));
example2 = norm(exmp(:,:,uu2)*ex(2,1,uu2)) / ...
norm(examp(:,:,uu2)*ex(3,1,uu3));
example3 = norm(exmp(:,:,uu3)*ex(3,1,uu3)) / ...
norm(examp(:,:,uu3)*ex(4,1,uu4));
example4 = norm(exmp(:,:,uu3)*ex(4,1,uu4)) / ...
norm(examp(:,:,uu4)*ex(1,1,uu1));
end
end
end
end