<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>IPhVu::iParallel</title>
	<atom:link href="http://vietparallel.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://vietparallel.wordpress.com</link>
	<description>Parallel programming on GPU</description>
	<lastBuildDate>Tue, 12 Apr 2011 16:58:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vietparallel.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>IPhVu::iParallel</title>
		<link>http://vietparallel.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vietparallel.wordpress.com/osd.xml" title="IPhVu::iParallel" />
	<atom:link rel='hub' href='http://vietparallel.wordpress.com/?pushpress=hub'/>
		<item>
		<title>CUDA News</title>
		<link>http://vietparallel.wordpress.com/2011/04/12/cuda-news-2/</link>
		<comments>http://vietparallel.wordpress.com/2011/04/12/cuda-news-2/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 16:55:19 +0000</pubDate>
		<dc:creator>phvu</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://vietparallel.wordpress.com/?p=41</guid>
		<description><![CDATA[Awesome, you now can start streaming 3D content right on your website. Click here to see how! This video show how Jack Levin, CEO of ImageShack, utilize GPUs for his Data centers.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=41&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Awesome, you now can start streaming 3D content right on your website. Click <a href="http://blogs.nvidia.com/2011/04/how-to-stream-3d-video-on-your-website/?sf1308047=1" target="_blank">here</a> to see how!<br />
This <a href="http://www.youtube.com/watch?v=UPUJUa4XgUs&amp;sf1302261=1" target="_blank">video</a> show how Jack Levin, CEO of ImageShack, utilize GPUs for his Data centers.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vietparallel.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vietparallel.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vietparallel.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vietparallel.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vietparallel.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vietparallel.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vietparallel.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vietparallel.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=41&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vietparallel.wordpress.com/2011/04/12/cuda-news-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13c9fd2b3fc44f21488ba3a7afce16b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phvu</media:title>
		</media:content>
	</item>
		<item>
		<title>CUDA News</title>
		<link>http://vietparallel.wordpress.com/2010/12/07/cuda-news/</link>
		<comments>http://vietparallel.wordpress.com/2010/12/07/cuda-news/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 16:22:30 +0000</pubDate>
		<dc:creator>phvu</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[GPU.NET]]></category>
		<category><![CDATA[LIBJACKET]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://vietparallel.wordpress.com/?p=39</guid>
		<description><![CDATA[Some good news from our guys at NVIDIA: 1. LIBJACKET &#8211; a new GPU Computing library has been announced. Although being beta testing, this is promising if we look into 500+ functions inside LIBJACKET. After a while of messing with CULA, CUSPARSE, Thrust, CUSP&#8230; I am really eager to check this one. Nonetheless, Dr. Dobb [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=39&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some good news from our guys at NVIDIA:</p>
<p>1. <a href="http://www.accelereyes.com/products/libjacketemail">LIBJACKET</a> &#8211; a new GPU Computing library has been announced. Although being beta testing, this is promising if we look into 500+ functions inside LIBJACKET. After a while of messing with CULA, CUSPARSE, Thrust, CUSP&#8230; I am really eager to check this one. Nonetheless, <a href="http://www.drdobbs.com/cpp/228400046">Dr. Dobb</a> said that there will be a commercial release of LIBJACKET in the next year, it means that this is not free. Good job, guys! And it&#8217;s better if you have a free edition <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>2. Now you can do GPU Computing right in .NET! Such a crazy thing. Well, I&#8217;m not kidding, you can try this with <a href="http://www.tidepowerd.com/">GPU.NET</a>. Please click the link, simply typing http://gpu.net in your browser will not work at all <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vietparallel.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vietparallel.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vietparallel.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vietparallel.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vietparallel.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vietparallel.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vietparallel.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vietparallel.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=39&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vietparallel.wordpress.com/2010/12/07/cuda-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13c9fd2b3fc44f21488ba3a7afce16b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phvu</media:title>
		</media:content>
	</item>
		<item>
		<title>GTC 2010</title>
		<link>http://vietparallel.wordpress.com/2010/09/29/gtc-2010/</link>
		<comments>http://vietparallel.wordpress.com/2010/09/29/gtc-2010/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 14:08:29 +0000</pubDate>
		<dc:creator>phvu</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[GTC]]></category>
		<category><![CDATA[Matlab]]></category>
		<category><![CDATA[opencv]]></category>

		<guid isPermaLink="false">http://vietparallel.wordpress.com/?p=33</guid>
		<description><![CDATA[NVIDIA&#8217;s CEO Jen-Hsun Huang has given a keynote speech at GTC 2010 last week. There are some interesting announcements in the speech that I note here. The first and foremost announcement is about CUDA-x86 compiler which is developed by PGI. The new compiler is expected to show the first time at SuperComputing conference this November. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=33&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>NVIDIA&#8217;s CEO Jen-Hsun Huang has given a <a href="http://news.nvidia.com:8080/t/145914/14892746/7505/0/">keynote speech at GTC 2010</a> last week. There are some interesting announcements in the speech that I note here.</p>
<p>The first and foremost announcement is about <a href="http://news.nvidia.com:8080/t/145914/14892746/7511/0/">CUDA-x86</a> compiler which is developed by PGI. The new compiler is expected to show the first time at SuperComputing conference this November. It is fancy to know that we can write, compile, debug and deploy CUDA programs on every workstation, server or cluster even when there is not any CUDA-accelerated GPU. When running on systems which do not have CUDA devices, CUDA-x86 will help CUDA programs run as usual thanks to the streaming SIMD instructions set in Intel&#8217;s and AMD&#8217;s CPUs.</p>
<p>The question is how well do they perform on CPUs-only system? It would be great if they can provide approximate speedup as on GPU, but I do not expect this much. Let&#8217;s wait until SC2010 and see what can we do with CUDA-x86.</p>
<p>The remaining part of Jen-Hsun Huang&#8217;s speech is about some fancy demos and some guests from nVidia&#8217;s partners. This includes  CUDA-accelerated real-time rendering tool in <a href="http://news.nvidia.com:8080/t/145914/14892746/7515/0/" target="_blank">Autodesk 3ds Max</a>, a GPU-derived <a href="http://news.nvidia.com:8080/t/145914/14892746/7516/0/" target="_blank">engineering simulation solution</a> from ANSYS, GE Intelligent Platforms&#8217; <a href="http://news.nvidia.com:8080/t/145914/14892746/7324/0/" target="_blank">new development environment</a>, CUDA officially supported <a href="http://news.nvidia.com:8080/t/145914/14892746/7517/0/">right in MATLAB</a> (one of the best news!), OpenCV is <a href="http://news.nvidia.com:8080/t/145914/14892746/7518/0/" target="_blank">now supported by CUDA</a> (another good news, but I hope that CUDA-OpenCV, or whatever they call it, will not add any bugs into OpenCV), Wolfram Research&#8217;s Mathematica added <a href="http://news.nvidia.com:8080/t/145914/14892746/7519/0/" target="_blank">built-in CUDA GPU programming</a>.</p>
<p>The most important part of the conference surely is not the speech from the CEO, but the <a href="http://www.nvidia.com/object/research_summit_posters_2010.html">research posters</a>. There are many interesting researches there. Hope that I will have enough time to read and summarize some of them someday.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vietparallel.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vietparallel.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vietparallel.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vietparallel.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vietparallel.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vietparallel.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vietparallel.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vietparallel.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=33&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vietparallel.wordpress.com/2010/09/29/gtc-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13c9fd2b3fc44f21488ba3a7afce16b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phvu</media:title>
		</media:content>
	</item>
		<item>
		<title>IntelliSense cho CUDA trong VS 2008</title>
		<link>http://vietparallel.wordpress.com/2010/04/18/intellisense-cho-cuda-trong-vs-2008/</link>
		<comments>http://vietparallel.wordpress.com/2010/04/18/intellisense-cho-cuda-trong-vs-2008/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 14:55:00 +0000</pubDate>
		<dc:creator>phvu</dc:creator>
				<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Setup]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[IntelliSense]]></category>

		<guid isPermaLink="false">http://vietparallel.wordpress.com/?p=23</guid>
		<description><![CDATA[Cho Visual Studio Mở regedit, tìm khóa HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Languages\Language Services\C/C++\NCB Default C/C++ Extensions, thêm .cu vào cuối. Cho Visual AssistX B1: Đóng VS, cài Visual Assist. B2: Tìm đến thư mục cài Visual Assist (X:\Program Files\Visual Assist X\AutoText\latest), copy file Cpp.tpl rồi đổi tên thành Cu.tpl B3: Mở Visual Studio, sau đó đóng lại. (Visual Assist [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=23&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Cho Visual Studio</h3>
<p>Mở regedit, tìm khóa <em>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Languages\Language  Services\C/C++\NCB Default C/C++ Extensions</em>, thêm <strong>.cu</strong> vào cuối.</p>
<h3>Cho Visual AssistX</h3>
<p>B1: Đóng VS, cài Visual Assist.</p>
<p>B2: Tìm đến thư mục cài Visual Assist (X:\Program Files\Visual Assist X\AutoText\latest), copy file <em>Cpp.tpl</em> rồi đổi tên thành <em>Cu.tpl</em></p>
<p>B3: Mở Visual Studio, sau đó đóng lại. (Visual Assist sẽ tự tạo một số thư mục và cập nhật thông tin trong registry).</p>
<p>B4: Mở regedit, tìm khóa <em>HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet9</em>. Thêm<strong> .cu</strong> vào key <em>ExtSource</em>, thêm <strong>.cuh</strong> vào key <em>ExtHeader</em>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vietparallel.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vietparallel.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vietparallel.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vietparallel.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vietparallel.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vietparallel.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vietparallel.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vietparallel.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=23&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vietparallel.wordpress.com/2010/04/18/intellisense-cho-cuda-trong-vs-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13c9fd2b3fc44f21488ba3a7afce16b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phvu</media:title>
		</media:content>
	</item>
		<item>
		<title>Thiết lập môi trường phát triển CUDA trên MacOS X</title>
		<link>http://vietparallel.wordpress.com/2009/09/13/cuda_macos/</link>
		<comments>http://vietparallel.wordpress.com/2009/09/13/cuda_macos/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 15:08:58 +0000</pubDate>
		<dc:creator>phvu</dc:creator>
				<category><![CDATA[Setup]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[MacOS]]></category>

		<guid isPermaLink="false">http://vietparallel.wordpress.com/?p=8</guid>
		<description><![CDATA[Trong entry này, tôi sẽ trình bày cách cấu hình và thiết lập môi trường phát triển ứng dụng CUDA trên MacOS X 10.6 (Snow Leopard) và CUDA SDK 2.3. 1. Cài đặt CUDA Đầu tiên, ta cần cài đặt các thành phần sau: Xcode, mục đích là để Xcode cài thêm trình biên dịch [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=8&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Trong entry này, tôi sẽ trình bày cách cấu hình và thiết lập môi trường phát triển ứng dụng CUDA trên MacOS X 10.6 (Snow Leopard) và CUDA SDK 2.3.</p>
<h3>1. Cài đặt CUDA</h3>
<p>Đầu tiên, ta cần <a href="http://www.nvidia.com/object/cuda_get.html" target="_blank">cài đặt</a> các thành phần sau:</p>
<ul>
<li><a href="http://developer.apple.com/tools/xcode/">Xcode</a>, mục đích là để Xcode cài thêm trình biên dịch C/C++.</li>
<li>CUDA driver.</li>
<li>CUDA Toolkit 2.3a for Mac OS</li>
<li>CUDA SDK 2.3a or Mac OS</li>
<li>CUDA Visual Profiler v1.3 for Mac OS (không bắt buộc)</li>
</ul>
<p>Sau khi download các file thích hợp, ta cài theo thứ tự driver, Toolkit và SDK. Bạn có thể đọc thêm trong Getting Started Guide của NVIDIA để biết thêm chi tiết. Thao tác cài Toolkit và SDK rất đơn giản, tuy nhiên cần phải thay đổi một số tham số cấu hình để CUDA chạy đúng trên MacOS.</p>
<h4>Thay đổi các biến môi trường</h4>
<p>Sau khi cài xong,ta cần đặt các biến môi trường PATH và DYLD_LIBRARY_PATH để trình biên dịch CUDA hoạt động được. Trong các bản MacOS từ Leopard trở về sau, một trong những cách để làm điều này là đặt các lệnh sau vào file <em>~/.bash_profile.</em></p>
<p><pre class="brush: plain; light: true;">
export PATH=/opt/local/bin:/usr/local/cuda/bin:$PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
</pre></p>
<h4>Thay đổi các tham số</h4>
<p>Các tham số này được đặt trong file<strong> </strong><em>/Developer/CUDA/common/common.mk</em>. Ta mở file này (bằng <em>vim </em>hoặc <em>TextEdit</em>) rồi tìm và sửa các tham số sau:</p>
<p><pre class="brush: plain; light: true;">
# Compiler-specific flags

NVCCFLAGS := -m32
CXXFLAGS  := -m32 $(CXXWARN_FLAGS)
CFLAGS    := -m32 $(CWARN_FLAGS)
</pre></p>
<p>Các dòng này báo cho trình biên dịch CUDA biết là ta đang muốn compile code với thư viện 32 bit.</p>
<h4>Thay đổi trình biên dịch C/C++</h4>
<p>Mặc dịnh khi cài Xcode, trình biên dịch C/C++ được chọn là gcc 4.2, khi sử dụng các phiên bản mới này, một số file mã nguồn trong CUDA SDK sẽ không biên dịch được, do đó ta cần sửa lại các link về phiên bản 4.0:</p>
<p><pre class="brush: plain; light: true;">
cd /usr/bin
sudo rm ./gcc
sudo ln -s ./gcc-4.0 ./gcc
sudo rm ./g++
sudo ln -s ./g++-4.0 ./g++
</pre></p>
<p>Cuối cùng ta có thể build các project trong SDK:</p>
<p><pre class="brush: plain; light: true;">
cd /Developer/CUDA
make
// hoặc make dbg=1 (debug), make emu=1 (emuRelease), make emu=1 dbg=1 (emuDebug)
</pre></p>
<p>Sau khi build xong, bạn có thể vào thư mục <em>/Developer/CUDA/bin/darwin/release</em> và chạy thử các chương trình mẫu trong đó.</p>
<p>Dưới đây là kết quả khi chạy 1 số project mẫu trong SDK.</p>

<a href='http://vietparallel.wordpress.com/2009/09/13/cuda_macos/particles/' title='particles'><img data-attachment-id='19' data-orig-size='640,501' data-liked='0'width="150" height="117" src="http://vietparallel.files.wordpress.com/2009/09/particles.png?w=150&#038;h=117" class="attachment-thumbnail" alt="particles" title="particles" /></a>
<a href='http://vietparallel.wordpress.com/2009/09/13/cuda_macos/sobel/' title='sobel'><img data-attachment-id='20' data-orig-size='512,533' data-liked='0'width="144" height="150" src="http://vietparallel.files.wordpress.com/2009/09/sobel.png?w=144&#038;h=150" class="attachment-thumbnail" alt="Sobel filter" title="sobel" /></a>

<h3>2. Tạo project CUDA</h3>
<p>Trong thư mục cài đặt CUDA SDK (thường là<strong> </strong><em>/Developer/CUDA</em>) có sẵn 1 project mẫu mà bạn có thể sử dụng nó để tạo các project mới cho mình. Trong thư mục này có sẵn file mã nguồn <strong>*.cu</strong> (cùng với code mẫu) và file <strong>Makefile</strong> định nghĩa các quy tắc biên dịch cần thiết.</p>
<p>Cụ thể bạn có thể tạo project mới cho mình qua một số bước sau:</p>
<h4>1. Copy project mẫu</h4>
<p><pre class="brush: plain; light: true;">
cd &lt;SDK_INSTALL_PATH&gt;/projects        // SDK_INSTALL_PATH là thư mục cài CUDA SDK
cp -r template &lt;myproject&gt;            // myproject: tên project mới
</pre></p>
<h4>2. Sửa tên các file mã nguồn trong project</h4>
<p><pre class="brush: plain; light: true;">
mv template.cu myproject.cu
mv template_kernel.cu myproject_kernel.cu
mv template_gold.cpp myproject_gold.cpp
</pre></p>
<h4>3. Sửa trong file Makefile và mã nguồn</h4>
<p>Find &amp; replace &#8220;template&#8221; thành &#8220;myproject&#8221;.</p>
<h4>4. Build</h4>
<p><pre class="brush: plain; light: true;">
make
</pre></p>
<h4>5. Chạy thử</h4>
<p><pre class="brush: plain; light: true;">
../../bin/darwin/release/myproject
</pre></p>
<p>Như vậy bạn hoàn toàn có thể tạo các file mới, viết thêm mã nguồn (bằng <em>Vim</em>, <em>TextEdit</em>&#8230; hay là <em>Microsoft Word</em>, <em>Pages</em>&#8230;). Tuy nhiên tốt hơn là nên dùng <em>Xcode</em>, hoặc <em>Netbeans </em>hay <em>Eclipse</em>.</p>
<h3>Cấu hình Xcode</h3>
<p>Phần này sẽ trình bày cách cấu hình cho Xcode để tạo project CUDA mẫu.</p>
<p><em>&lt;To be continued&#8230;&gt;</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vietparallel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vietparallel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vietparallel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vietparallel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vietparallel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vietparallel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vietparallel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vietparallel.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=8&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vietparallel.wordpress.com/2009/09/13/cuda_macos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13c9fd2b3fc44f21488ba3a7afce16b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phvu</media:title>
		</media:content>

		<media:content url="http://vietparallel.files.wordpress.com/2009/09/particles.png?w=150" medium="image">
			<media:title type="html">particles</media:title>
		</media:content>

		<media:content url="http://vietparallel.files.wordpress.com/2009/09/sobel.png?w=144" medium="image">
			<media:title type="html">sobel</media:title>
		</media:content>
	</item>
		<item>
		<title>Bài toán Tổng tích lũy (all-prefix-sum) trên CUDA</title>
		<link>http://vietparallel.wordpress.com/2009/08/26/bai-toan-t%e1%bb%95ng-tich-luy-all-prefix-sum-tren-cuda/</link>
		<comments>http://vietparallel.wordpress.com/2009/08/26/bai-toan-t%e1%bb%95ng-tich-luy-all-prefix-sum-tren-cuda/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 16:49:07 +0000</pubDate>
		<dc:creator>phvu</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cuda]]></category>
		<category><![CDATA[prescan]]></category>
		<category><![CDATA[scan]]></category>

		<guid isPermaLink="false">http://vietparallel.wordpress.com/?p=5</guid>
		<description><![CDATA[Giới thiệu All-prefix-sum là một bài toán tương đối đơn giản và phổ biến khi lấy làm ví dụ trong các sách nói về lập trình song song nói chung và CUDA nói riêng. Bài toán này định nghĩa như sau: Định nghĩa Phép toán all-prefix-sum có đầu vào là một toán tử 2 ngôi [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=5&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Giới thiệu</h3>
<p><em>All-prefix-sum</em> là một bài toán tương đối đơn giản và phổ biến khi lấy làm ví dụ trong các sách nói về lập trình song song nói chung và CUDA nói riêng. Bài toán này định nghĩa như sau:</p>
<h4><strong>Định nghĩa</strong></h4>
<blockquote><p>Phép toán all-prefix-sum có đầu vào là một toán tử 2 ngôi Θ, một mảng n phần tử</p>
<p style="text-align:center;">[a<sub>0</sub>, a<sub>1</sub>, ..., a<sub>n-1</sub>]</p>
<p>và kết quả là một mảng n phần tử:</p>
<p style="text-align:center;">[a<sub>0</sub>, (a<sub>0</sub> Θ a<sub>1</sub>), ..., (a<sub>0</sub> Θ a<sub>1</sub> Θ a<sub>n-1</sub>)]</p>
</blockquote>
<h4 style="text-align:left;"><strong>Ví dụ:</strong></h4>
<p style="text-align:left;">Với Θ là phép cộng, phép toán <em>all-prefix-sum</em> trên mảng [3 2 6 5 10 7 9]</p>
<p style="text-align:left;">sẽ có kết quả là [3 5 11 16 26 33 42]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vietparallel.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/vietparallel.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/vietparallel.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/vietparallel.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/vietparallel.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/vietparallel.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/vietparallel.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/vietparallel.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vietparallel.wordpress.com&amp;blog=9183791&amp;post=5&amp;subd=vietparallel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vietparallel.wordpress.com/2009/08/26/bai-toan-t%e1%bb%95ng-tich-luy-all-prefix-sum-tren-cuda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/13c9fd2b3fc44f21488ba3a7afce16b1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">phvu</media:title>
		</media:content>
	</item>
	</channel>
</rss>
