CPU与GPU比赛。 [英] The CPU vs the GPU contest.

查看:84
本文介绍了CPU与GPU比赛。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


在本次比赛中,CPU将面向GPU。


哪个处理器能够更快地执行代码/概念? br />

// cpu / serial概念代码是:


var

mTab​​le:整数数组的数组;

mRowCount:整数;

mColumnCount:整数;


程序AllocateTable;

begin

mRowCount:= 8000;

mColumnCount:= 9000;

SetLength(mTable,mRowCount,mColumnCount);

end;


程序WorkToDo;

var

vRowIndex1:整数;

vRowIndex2:整数;

vColumnIndex:整数;

vValue1:整数;

vValue2:整数;

开始

vRowIndex1:= 5;

vRowIndex2:= 8;

vValue1:= 5;

vValue2:= 10;

//计算可以在GPU上并行完成。

for vColumnIndex:= 0 to mColumnCount-1 do

begin

mTab​​le [vRowIndex1,vColumnIndex]:=(mTable [vRowIndex1,

vColumnIndex] * vValue1) - (mTable [vRowIndex2,vColumnIndex] * vValue2);

结束;

结束;


对于cpu:

可以制作MMX / XMM / SIMD / SSE / SSE2版本。


对于gpu:

可以制作OpenGL或DirectX版本。


这是CPU与之间的较量GPU因此互相帮助

允许。


我的测试系统将是:


X2 3800+和两个GTX 7900 512 MB卡。


^^^代码可能会针对此系统进行大量优化或类似^^^。


替代测试系统可能是:


奔腾III 450 mhz和FX5200 128 MB内存。


^^^可以忽略。


代码可以是ASM,C / C ++或Delphi。


再见,

Skybuck。

解决方案

" Skybuck Flying" < sp ** @ hotmail.comwrote in message

news:eo ********** @ news4.zwoll1.ov.home.nl ...
< blockquote class =post_quotes>
>

// cpu / serial概念代码是:


var

mTab​​le:整数数组的数组;

mRowCount:整数;

mColumnCount:整数;


过程AllocateTable;

开始

mRowCount:= 8000;

mColumnCount:= 9000;

SetLength(mTable,mRowCount,mColumnCount);

结束;


程序WorkToDo;

var

vRowIndex1:整数;

vRowIndex2:整数;

vColumnIndex:整数;

vValue1:整数;

vValue2:整数;

开始

vRowIndex1:= 5;

vRowIndex2:= 8;

vValue1:= 5;

vValue2:= 10;

//计算可以在GPU上并行完成。

for vColumnIndex:= 0到mColumnCount-1做

开始

mTab​​le [vRowIndex1,vColumnIndex]:=(mTable [vRowIndex1,

vColumnIndex] * vValue1) - (mTable [vRowIndex2,vColumnIndex] *

vValue2);

end;

end;



#1)感谢您将Pascal(或类似内容)发布到C语言组。


#2)你是阿基米德钚吗?


--------------------------------- ---------------------------

David T. Ashley(d ... @ e3ft.com)
http://www.e3ft.com (咨询主页) http://www.dtashley.com (个人主页)
< a rel =nofollowhref =http://gpl.e3ft.comtarget =_ blank> http://gpl.e3ft.com (GPL出版物和项目)




David T. Ashley写道:


" Skybuck Flying" < sp ** @ hotmail.comwrote in message


#1)感谢您将Pascal(或类似内容)发布到C语言组。


#2)你是阿基米德钚吗?



Skybuck是一个飞行的疯子。请参阅:

http://groups.google.com/group/alt.l...6e8caff4d1a9cb
http://groups.google.com/group/alt.l...d694f9f550dbdd


不要给他任何关注。


P?¥Fri,2007年1月12日07:29:05 +0100,skrev Evenbit< nb ******** @ charter.net>:


Skybuck是一个飞行的疯子。请参阅:

http://groups.google.com/group/alt.l...6e8caff4d1a9cb
http://groups.google.com/group/alt.l...d694f9f550dbdd


别给他任何关注。



更好的SkyBuck然后是HLA。这家伙很有趣,对他来说不那么难。

他在做什么我相信是讽刺。他的全名只是一个嘲讽。

他可能过度了,但他实际上更有趣的是那些做他所做的事情的人。真实的。 />

和SkyBuck真的是一个非常有趣的名字。还有讽刺,我相信。


-

Funn 1a ?? 10 av omlag 89 700 000 som inneheldt" Disaster"
/>
Funn 1a ?? 10 av omlag 2 470 000 000 som inneheldt M


Hello,

In this contest the CPU will face the GPU.

Which processor will execute the code/concept faster ?

// cpu/serial concept code is:

var
mTable : array of array of integer;
mRowCount : integer;
mColumnCount : integer;

procedure AllocateTable;
begin
mRowCount := 8000;
mColumnCount := 9000;
SetLength( mTable, mRowCount, mColumnCount );
end;

procedure WorkToDo;
var
vRowIndex1 : integer;
vRowIndex2 : integer;
vColumnIndex : integer;
vValue1 : integer;
vValue2 : integer;
begin
vRowIndex1 := 5;
vRowIndex2 := 8;
vValue1 := 5;
vValue2 := 10;
// calculations could be done in parallel on GPU.
for vColumnIndex := 0 to mColumnCount-1 do
begin
mTable[ vRowIndex1, vColumnIndex ] := (mTable[ vRowIndex1,
vColumnIndex ] * vValue1) - (mTable[ vRowIndex2, vColumnIndex ] * vValue2);
end;
end;

For cpu:
MMX/XMM/SIMD/SSE/SSE2 version could be made.

For gpu:
OpenGL or DirectX version could be made.

This is a contest between the CPU and GPU thus helping each other is
allowed.

My test system will be:

X2 3800+ and two GTX 7900 512 MB cards.

^^^ Code may be heavily optimized for this system or similiar ^^^.

Alternative test system could be:

Pentium III 450 mhz and FX5200 with 128 MB ram.

^^^ can be ignored.

Code can be in ASM, C/C++ or Delphi.

Bye,
Skybuck.

解决方案

"Skybuck Flying" <sp**@hotmail.comwrote in message
news:eo**********@news4.zwoll1.ov.home.nl...

>
// cpu/serial concept code is:

var
mTable : array of array of integer;
mRowCount : integer;
mColumnCount : integer;

procedure AllocateTable;
begin
mRowCount := 8000;
mColumnCount := 9000;
SetLength( mTable, mRowCount, mColumnCount );
end;

procedure WorkToDo;
var
vRowIndex1 : integer;
vRowIndex2 : integer;
vColumnIndex : integer;
vValue1 : integer;
vValue2 : integer;
begin
vRowIndex1 := 5;
vRowIndex2 := 8;
vValue1 := 5;
vValue2 := 10;
// calculations could be done in parallel on GPU.
for vColumnIndex := 0 to mColumnCount-1 do
begin
mTable[ vRowIndex1, vColumnIndex ] := (mTable[ vRowIndex1,
vColumnIndex ] * vValue1) - (mTable[ vRowIndex2, vColumnIndex ] *
vValue2);
end;
end;

#1)Thanks for posting Pascal (or something similar) to a C-language group.

#2)Are you Archimedes Plutonium?

------------------------------------------------------------
David T. Ashley (d...@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)



David T. Ashley wrote:

"Skybuck Flying" <sp**@hotmail.comwrote in message

#1)Thanks for posting Pascal (or something similar) to a C-language group.

#2)Are you Archimedes Plutonium?

Skybuck is a flying loony. See:

http://groups.google.com/group/alt.l...6e8caff4d1a9cb

http://groups.google.com/group/alt.l...d694f9f550dbdd

Don''t give him any attention.


P?¥ Fri, 12 Jan 2007 07:29:05 +0100, skrev Evenbit <nb********@charter.net>:

Skybuck is a flying loony. See:

http://groups.google.com/group/alt.l...6e8caff4d1a9cb

http://groups.google.com/group/alt.l...d694f9f550dbdd

Don''t give him any attention.

Better SkyBuck then HLA. The guy is funny, dont be so hard on him.
What he is doing I belive is sarcasm. His whole name is just a taunt.
He is maybe overdoing it, but he is actually more entertaining then the
guys that does what he does, for real.

And "SkyBuck" is really a very funny name. Also sarcasm, I belive.

--
Funn 1a??10 av omlag 89 700 000 som inneheldt "Disaster"

Funn 1a??10 av omlag 2 470 000 000 som inneheldt M


这篇关于CPU与GPU比赛。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆