﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Der See der Vergessens-随笔分类-奇思妙想</title><link>http://www.cppblog.com/Jedimaster/category/2854.html</link><description>    忘却之湖</description><language>zh-cn</language><lastBuildDate>Mon, 19 May 2008 14:31:13 GMT</lastBuildDate><pubDate>Mon, 19 May 2008 14:31:13 GMT</pubDate><ttl>60</ttl><item><title>给大家看一下德国的家居装潢技术，在装修房子的朋友可以欣赏一下</title><link>http://www.cppblog.com/Jedimaster/archive/2007/02/25/18962.html</link><dc:creator>周波</dc:creator><author>周波</author><pubDate>Sun, 25 Feb 2007 04:46:00 GMT</pubDate><guid>http://www.cppblog.com/Jedimaster/archive/2007/02/25/18962.html</guid><wfw:comment>http://www.cppblog.com/Jedimaster/comments/18962.html</wfw:comment><comments>http://www.cppblog.com/Jedimaster/archive/2007/02/25/18962.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Jedimaster/comments/commentRss/18962.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Jedimaster/services/trackbacks/18962.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 德国的家居装潢技术，手工打造的实用家具宛如艺术品&nbsp;&nbsp;<a href='http://www.cppblog.com/Jedimaster/archive/2007/02/25/18962.html'>阅读全文</a><img src ="http://www.cppblog.com/Jedimaster/aggbug/18962.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Jedimaster/" target="_blank">周波</a> 2007-02-25 12:46 <a href="http://www.cppblog.com/Jedimaster/archive/2007/02/25/18962.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Pure GPU Computing Platform : NVIDIA CUDA Tutorial</title><link>http://www.cppblog.com/Jedimaster/archive/2007/02/24/18939.html</link><dc:creator>周波</dc:creator><author>周波</author><pubDate>Sat, 24 Feb 2007 06:42:00 GMT</pubDate><guid>http://www.cppblog.com/Jedimaster/archive/2007/02/24/18939.html</guid><wfw:comment>http://www.cppblog.com/Jedimaster/comments/18939.html</wfw:comment><comments>http://www.cppblog.com/Jedimaster/archive/2007/02/24/18939.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cppblog.com/Jedimaster/comments/commentRss/18939.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Jedimaster/services/trackbacks/18939.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 近距离接触NVIDIA新发布的GPU计算平台CUDA&nbsp;&nbsp;<a href='http://www.cppblog.com/Jedimaster/archive/2007/02/24/18939.html'>阅读全文</a><img src ="http://www.cppblog.com/Jedimaster/aggbug/18939.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Jedimaster/" target="_blank">周波</a> 2007-02-24 14:42 <a href="http://www.cppblog.com/Jedimaster/archive/2007/02/24/18939.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Python与Microsoft Office自动化操作</title><link>http://www.cppblog.com/Jedimaster/archive/2007/02/21/18895.html</link><dc:creator>周波</dc:creator><author>周波</author><pubDate>Wed, 21 Feb 2007 04:37:00 GMT</pubDate><guid>http://www.cppblog.com/Jedimaster/archive/2007/02/21/18895.html</guid><wfw:comment>http://www.cppblog.com/Jedimaster/comments/18895.html</wfw:comment><comments>http://www.cppblog.com/Jedimaster/archive/2007/02/21/18895.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/Jedimaster/comments/commentRss/18895.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Jedimaster/services/trackbacks/18895.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 用Python语言及其库对Excel进行操作实现自动化&nbsp;&nbsp;<a href='http://www.cppblog.com/Jedimaster/archive/2007/02/21/18895.html'>阅读全文</a><img src ="http://www.cppblog.com/Jedimaster/aggbug/18895.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Jedimaster/" target="_blank">周波</a> 2007-02-21 12:37 <a href="http://www.cppblog.com/Jedimaster/archive/2007/02/21/18895.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Perl穷举破解表单密码的实现</title><link>http://www.cppblog.com/Jedimaster/archive/2007/02/16/18831.html</link><dc:creator>周波</dc:creator><author>周波</author><pubDate>Fri, 16 Feb 2007 13:55:00 GMT</pubDate><guid>http://www.cppblog.com/Jedimaster/archive/2007/02/16/18831.html</guid><wfw:comment>http://www.cppblog.com/Jedimaster/comments/18831.html</wfw:comment><comments>http://www.cppblog.com/Jedimaster/archive/2007/02/16/18831.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/Jedimaster/comments/commentRss/18831.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Jedimaster/services/trackbacks/18831.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Perl穷举破解表单密码的实现&nbsp;&nbsp;<a href='http://www.cppblog.com/Jedimaster/archive/2007/02/16/18831.html'>阅读全文</a><img src ="http://www.cppblog.com/Jedimaster/aggbug/18831.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Jedimaster/" target="_blank">周波</a> 2007-02-16 21:55 <a href="http://www.cppblog.com/Jedimaster/archive/2007/02/16/18831.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>偏激的形容词</title><link>http://www.cppblog.com/Jedimaster/archive/2007/01/28/18106.html</link><dc:creator>周波</dc:creator><author>周波</author><pubDate>Sun, 28 Jan 2007 03:56:00 GMT</pubDate><guid>http://www.cppblog.com/Jedimaster/archive/2007/01/28/18106.html</guid><wfw:comment>http://www.cppblog.com/Jedimaster/comments/18106.html</wfw:comment><comments>http://www.cppblog.com/Jedimaster/archive/2007/01/28/18106.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Jedimaster/comments/commentRss/18106.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Jedimaster/services/trackbacks/18106.html</trackback:ping><description><![CDATA[
		<p>没有任何的意思，形容词可能有些骂人的意味，我只是想形容一下。想拍砖的就来吧。<br /><br /><br />六十年代及以前人<br /><br /><strong>偏激的形容词：蠢货</strong><br /><br />原因：大部分生不逢时，能够接受到教育的都是今天的中上层阶级。教育下一代的时候充满了对那个时代的又爱又恨，诸如“毛主席在的时候”，“想当年我们插队啊”。<br /><br />七十年代晚期出生的人<br /><br /><strong>偏激的形容词：吝啬鬼<br /></strong><br />原因：差不多都是第一代独生子女，生于计划经济时代，真正形成思想的却是在市场经济刚出现的时候。那个时代所依靠的是掠夺和强占，关系和权势，到如今对别人，甚至对家庭吝啬也不足为奇。<br /><br />八十年代中期左右的人<br /><br /><strong>偏激的形容词：废物</strong><br /><br />原因：我们被称为垮掉的一代，差不多是人们印象中比较差的一代了。我们中的大部分正在逐渐地接触上一代人，也是拥有最多亲戚的最后一代人了。成长于自由思想刚刚萌芽的阶段，可惜大部分已经被误导，永远无法摆脱。社会格局正是最疯狂巨变的时候。<br /><br />九十年代的人<br /><br /><strong>偏激的形容词：恶魔</strong><br /><br />原因：无可救药，没有希望。君不见小学内掏手机 mp3的多了去，更是攀比车房，比成年人还要老道得多。另一个面，家长对孩子高等教育的梦还远没有认识清楚 —— 谁叫他们是七十年代的人呢？网吧里，迪厅里，酒吧里，身影绝对不少。可是 …… 这里是中国，不是北欧。<br /></p>
<img src ="http://www.cppblog.com/Jedimaster/aggbug/18106.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Jedimaster/" target="_blank">周波</a> 2007-01-28 11:56 <a href="http://www.cppblog.com/Jedimaster/archive/2007/01/28/18106.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>A Smalltalk about General Computing Platform</title><link>http://www.cppblog.com/Jedimaster/archive/2006/10/28/14307.html</link><dc:creator>周波</dc:creator><author>周波</author><pubDate>Sat, 28 Oct 2006 03:58:00 GMT</pubDate><guid>http://www.cppblog.com/Jedimaster/archive/2006/10/28/14307.html</guid><wfw:comment>http://www.cppblog.com/Jedimaster/comments/14307.html</wfw:comment><comments>http://www.cppblog.com/Jedimaster/archive/2006/10/28/14307.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Jedimaster/comments/commentRss/14307.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Jedimaster/services/trackbacks/14307.html</trackback:ping><description><![CDATA[
		<p>When Brook Meets ICE<br />A Smalltalk about General Computing Platform<br />Bosch Chou （<a href="mailto:zhoubo22@hotmail.com">zhoubo22@hotmail.com</a>）</p>
		<p>    As we have seen, techniques about distributed communication such as CORBA, DCOM, even JAVA have been used widely at some corners on the earth. All of these could implement purposes such as RPC, distributed computing, and some others applications for business and science.<br />     Let’s have a look at development of hardware on platform of PC. CPU is becoming much faster, and much cheaper than any time before. At the same time, GPU, or more generally, is the card we call Display Adapter. Since 1999, NVIDIA released the new generation graphic card series named Geforce, challenge the performance until now, next year we can buy DX10 cards on the markets. Graphic card could do vertex transform and lighting instead of CPU. It’s a great progress on both CPU and GPU. How to use these rich SIMD resources? We can easily understand why we will focus to GPU.<br />     Calm down, what’s our desire platform?</p>
		<ul>
				<li>Cross Operation System</li>
				<li>Cross Networks</li>
				<li>Cross hardware – This is the key problem I try to solve.</li>
		</ul>
		<p>     The specialties I showed here, except the last one, most of them had been solved by some current technique. So, how to ? I found 2 treasures. ICE, Internet Communication Engine, is much similar as classic CORBA, but much easily used than CORBA. Brook, from Stanford University, developed for years, designed for GPU stream computing. Both of them have the same usage, a front-compiler, which could translate string-codes to C++ language. Then we can add the .h, .cpp files to our projects, code the interface.<br />    The process how does client pass its call to server as showed below.<br /></p>
		<ul>
				<li>Client pass the data which need to be computed to interface declared both side</li>
				<li>Server receives the data, compute them, pass the results back to client</li>
				<li>Client receives the result, do its work itself continually.</li>
		</ul>
		<p>    But, the problem is, it’s too kinds of IDL language, one is for internet application, another is for local GPU stream computing. And more, ICE have no stream data property. It sounds like C++ metaprogramming, but it’s quite different from each other. So, does it meaning that we must redefine a new IDL language? Let’s check current tools we have had now.<br />      In fact, the most important is the base model. ICE supports a property called “Sequence”, mapped into STL container of C++. It could be considerate as the base data type in the language we thought should to invert one. When a client sent a request, server accepted, and then the client sent data wrapped in this container which will rebuild in memory of “Server” as texture structure. After server had prepared all the textures contained the data ready to compute, it called API, used the Shaders to computed data. All the progress I have illustrated as follows.<br />For example, we wrote these IDL sentences.<br /> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">GPU Interface Foo<br /><img id="Codehighlighter1_18_94_Open_Image" onclick="this.style.display='none'; Codehighlighter1_18_94_Open_Text.style.display='none'; Codehighlighter1_18_94_Closed_Image.style.display='inline'; Codehighlighter1_18_94_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_18_94_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_18_94_Closed_Text.style.display='none'; Codehighlighter1_18_94_Open_Image.style.display='inline'; Codehighlighter1_18_94_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_18_94_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_18_94_Open_Text">
						<span style="COLOR: #000000">{<br /><img id="Codehighlighter1_73_92_Open_Image" onclick="this.style.display='none'; Codehighlighter1_73_92_Open_Text.style.display='none'; Codehighlighter1_73_92_Closed_Image.style.display='inline'; Codehighlighter1_73_92_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_73_92_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_73_92_Closed_Text.style.display='none'; Codehighlighter1_73_92_Open_Image.style.display='inline'; Codehighlighter1_73_92_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />Add([</span>
						<span style="COLOR: #0000ff">in</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #0000ff">float</span>
						<span style="COLOR: #000000"> a</span>
						<span style="COLOR: #000000">&lt;&gt;</span>
						<span style="COLOR: #000000"> , [</span>
						<span style="COLOR: #0000ff">in</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #0000ff">float</span>
						<span style="COLOR: #000000"> b</span>
						<span style="COLOR: #000000">&lt;&gt;</span>
						<span style="COLOR: #000000">, [</span>
						<span style="COLOR: #0000ff">out</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #0000ff">float</span>
						<span style="COLOR: #000000"> c</span>
						<span style="COLOR: #000000">&lt;&gt;</span>
						<span style="COLOR: #000000">)</span>
						<span id="Codehighlighter1_73_92_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_73_92_Open_Text">
								<span style="COLOR: #000000">{<br /><img id="Codehighlighter1_75_90_Open_Image" onclick="this.style.display='none'; Codehighlighter1_75_90_Open_Text.style.display='none'; Codehighlighter1_75_90_Closed_Image.style.display='inline'; Codehighlighter1_75_90_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_75_90_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_75_90_Closed_Text.style.display='none'; Codehighlighter1_75_90_Open_Image.style.display='inline'; Codehighlighter1_75_90_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /></span>
								<span id="Codehighlighter1_75_90_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
								<span id="Codehighlighter1_75_90_Open_Text">
										<span style="COLOR: #008000">/*</span>
										<span style="COLOR: #008000"> some stuff </span>
										<span style="COLOR: #008000">*/</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />CPU Interface Bar<br /><img id="Codehighlighter1_114_191_Open_Image" onclick="this.style.display='none'; Codehighlighter1_114_191_Open_Text.style.display='none'; Codehighlighter1_114_191_Closed_Image.style.display='inline'; Codehighlighter1_114_191_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_114_191_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_114_191_Closed_Text.style.display='none'; Codehighlighter1_114_191_Open_Image.style.display='inline'; Codehighlighter1_114_191_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_114_191_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_114_191_Open_Text">
						<span style="COLOR: #000000">{<br /><img id="Codehighlighter1_169_189_Open_Image" onclick="this.style.display='none'; Codehighlighter1_169_189_Open_Text.style.display='none'; Codehighlighter1_169_189_Closed_Image.style.display='inline'; Codehighlighter1_169_189_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_169_189_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_169_189_Closed_Text.style.display='none'; Codehighlighter1_169_189_Open_Image.style.display='inline'; Codehighlighter1_169_189_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> Add([</span>
						<span style="COLOR: #0000ff">in</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #0000ff">float</span>
						<span style="COLOR: #000000"> a[], [</span>
						<span style="COLOR: #0000ff">in</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #0000ff">float</span>
						<span style="COLOR: #000000"> b[], [</span>
						<span style="COLOR: #0000ff">out</span>
						<span style="COLOR: #000000">] </span>
						<span style="COLOR: #0000ff">float</span>
						<span style="COLOR: #000000"> c[])</span>
						<span id="Codehighlighter1_169_189_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_169_189_Open_Text">
								<span style="COLOR: #000000">{<br /><img id="Codehighlighter1_172_187_Open_Image" onclick="this.style.display='none'; Codehighlighter1_172_187_Open_Text.style.display='none'; Codehighlighter1_172_187_Closed_Image.style.display='inline'; Codehighlighter1_172_187_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_172_187_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_172_187_Closed_Text.style.display='none'; Codehighlighter1_172_187_Open_Image.style.display='inline'; Codehighlighter1_172_187_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> </span>
								<span id="Codehighlighter1_172_187_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
								<span id="Codehighlighter1_172_187_Open_Text">
										<span style="COLOR: #008000">/*</span>
										<span style="COLOR: #008000"> some stuff </span>
										<span style="COLOR: #008000">*/</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />}</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p> We declared the 2 interface, attention, the “GPU” and ”CPU” is the key word here, they’are used to mark where the interface is used for, here, one will run on traditional CPU, another will run on GPU.<br />  </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">On Server Side<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />  </span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">verify the validity of data</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">  vector</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #0000ff">float</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000"> tex1;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />  vector</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #0000ff">float</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000"> tex2;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />  vector</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #0000ff">float</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000"> result;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />  Add(tex1,tex2,result) </span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">use reference, avoid stack-copy</span>
				<span style="COLOR: #008000">
						<br />
						<img id="Codehighlighter1_177_506_Open_Image" onclick="this.style.display='none'; Codehighlighter1_177_506_Open_Text.style.display='none'; Codehighlighter1_177_506_Closed_Image.style.display='inline'; Codehighlighter1_177_506_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_177_506_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_177_506_Closed_Text.style.display='none'; Codehighlighter1_177_506_Open_Image.style.display='inline'; Codehighlighter1_177_506_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				</span>
				<span style="COLOR: #000000">  </span>
				<span id="Codehighlighter1_177_506_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_177_506_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />   GLfloat</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000"> Tex1Ptr </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> GLfloat[tex1.size()];<br /><img id="Codehighlighter1_230_293_Open_Image" onclick="this.style.display='none'; Codehighlighter1_230_293_Open_Text.style.display='none'; Codehighlighter1_230_293_Closed_Image.style.display='inline'; Codehighlighter1_230_293_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_230_293_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_230_293_Closed_Text.style.display='none'; Codehighlighter1_230_293_Open_Image.style.display='inline'; Codehighlighter1_230_293_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />   </span>
						<span id="Codehighlighter1_230_293_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
						<span id="Codehighlighter1_230_293_Open_Text">
								<span style="COLOR: #008000">/*</span>
								<span style="COLOR: #008000"> some stuff as above, convert container to texture structure</span>
								<span style="COLOR: #008000">*/</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />   GLuint hTex1; glGenTextures(</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">&amp;</span>
						<span style="COLOR: #000000">Tex1);<br /><img id="Codehighlighter1_352_355_Open_Image" onclick="this.style.display='none'; Codehighlighter1_352_355_Open_Text.style.display='none'; Codehighlighter1_352_355_Closed_Image.style.display='inline'; Codehighlighter1_352_355_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_352_355_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_352_355_Closed_Text.style.display='none'; Codehighlighter1_352_355_Open_Image.style.display='inline'; Codehighlighter1_352_355_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />   glTexImage2D(</span>
						<span id="Codehighlighter1_352_355_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
						<span id="Codehighlighter1_352_355_Open_Text">
								<span style="COLOR: #008000">/**/</span>
						</span>
						<span style="COLOR: #000000">,Tex1Ptr); </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">upload the data into memory as texture</span>
						<span style="COLOR: #008000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">   glUseProgram(g_hArithmetic);<br /><img id="Codehighlighter1_443_502_Open_Image" onclick="this.style.display='none'; Codehighlighter1_443_502_Open_Text.style.display='none'; Codehighlighter1_443_502_Closed_Image.style.display='inline'; Codehighlighter1_443_502_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_443_502_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_443_502_Closed_Text.style.display='none'; Codehighlighter1_443_502_Open_Image.style.display='inline'; Codehighlighter1_443_502_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />   </span>
						<span id="Codehighlighter1_443_502_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span>
						<span id="Codehighlighter1_443_502_Open_Text">
								<span style="COLOR: #008000">/*</span>
								<span style="COLOR: #008000">Draw something to get all the data out, a rectangle etc.</span>
								<span style="COLOR: #008000">*/</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />  }</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p>     If you’re familiar with GL programming, you will point out, “Why not add glFlush, glSwapBuffer above ? “, in fact that’s the key of my whole article. If we only need 1 + 1, even we do not need GPU. The men are greedy all the time. If we want GPU to compute the π for us, what’s should we do ? Assume, we want to compute π , 16 million digitals, but texture unit of GPU can only hold 4096x4096 floating texture size. When GPU will swap buffer, we must move all the data from framebuffer to disk, save them, then make GPU continue compute data. But How to ? I checked the OpenGL and D3D Manual, found nothing useful. So I thought several way to implement this key problem.<br /></p>
		<ul>
				<li>Next generation hardware architecture, CPU integrates GPU, I think AMD &amp; ATi will do this.</li>
				<li>Improve the current API &amp; Drivers, support operate SIMD register directly.</li>
		</ul>
		<p>All I said was above, about a special aspect of distributed computing, about how to use GPU to do compute as CPU. If this can be implemented one day, I think the modern science will be benefited much from this.</p>
		<p>Reference:<br />ICE, Internet Communications Engine, Zeroc,Inc <a href="http://www.zeroc.com/">http://www.zeroc.com/</a><br />Brook, Stardford University, <a href="http://sf.net/projects/brook">http://sf.net/projects/brook</a><br />NVIDIA Develper Zone, <a href="http://developer.nvidia.com/">http://developer.nvidia.com/</a><br />OpenGL official Site, <a href="http://www.opengl.org/">http://www.opengl.org/</a><br /></p>
		<p align="center"> </p>
<img src ="http://www.cppblog.com/Jedimaster/aggbug/14307.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Jedimaster/" target="_blank">周波</a> 2006-10-28 11:58 <a href="http://www.cppblog.com/Jedimaster/archive/2006/10/28/14307.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>