<?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/"
	>

<channel>
	<title>TheSpicyChicken &#187; k-means</title>
	<atom:link href="http://thespicychicken.com/tag/k-means/feed/" rel="self" type="application/rss+xml" />
	<link>http://thespicychicken.com</link>
	<description>n&#039;th generation research</description>
	<lastBuildDate>Fri, 16 Mar 2012 23:26:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Finally&#8230; back to Science.</title>
		<link>http://thespicychicken.com/2008/11/07/finally_back_to_science/</link>
		<comments>http://thespicychicken.com/2008/11/07/finally_back_to_science/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 18:39:01 +0000</pubDate>
		<dc:creator>Spicy</dc:creator>
				<category><![CDATA[Science]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[CUDA]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[k-means]]></category>

		<guid isPermaLink="false">http://thespicychicken.com/?p=52</guid>
		<description><![CDATA[With the election behind and a collective sigh of relief from the science community we can get back to the good stuff&#8211; throwing some fuel into the engine we call SCIENCE!  For my part, I got some much needed time to learn about and implement some simple algorithms utilizing CUDA.  CUDA is a c-extension from [...]]]></description>
			<content:encoded><![CDATA[<p>With the election behind and a collective sigh of relief from the science community we can get back to the good stuff&#8211; throwing some fuel into the engine we call SCIENCE!  For my part, I got some much needed time to learn about and implement some simple algorithms utilizing CUDA.  CUDA is a c-extension from Nvidia for leveraging the massive computational power in your GPU.  In my case my GeForce 8600M graphics card in my MacBook Pro.</p>
<p>I have to give some serious props to the devs of CUDA because it is very straight forward and makes programming for the GPU rather intuitive.  I have been able to implement the Lloyd&#8217;s Algorithm for the <a href="http://en.wikipedia.org/wiki/K-means_algorithm">K-Means problem</a> in just a few days.  The speed increase is graphically represented in the following graph.</p>
<p><a href="http://thespicychicken.com/wp-content/uploads/2008/11/gpuvscpu_kmeans.png"><img class="alignnone size-full wp-image-55" title="gpuvscpu_kmeans" src="http://thespicychicken.com/wp-content/uploads/2008/11/gpuvscpu_kmeans.png" alt="" width="499" height="351" /></a></p>
<p>In green is the time in seconds required to compute the kmeans solution using the CPU and in red is the time required for the GPU.  The variance in the times comes from the nature of Lloyd&#8217;s algorithm which, depding on the input, can take a variable amount of time.  The GPU times are also varied but it is difficult to see in the figure.</p>
<p>These results are just from running the application on my MBP.  If you have a machine with many graphics processors (or many machines each with their own GPU) then you can parallelize this even more and massively boost your computational power.  In my opinion the GPU architecture is the future of scientific computing as so many of our computational challenges can be addressed using parallelization.</p>
<p>For those that are interested I will be writing up some CUDA tutorials covering Installation/Set Up, A &#8220;Hello World&#8221; example, and the full K-Means implementation over at <a href="http://macresearch.org">MacResearch.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thespicychicken.com/2008/11/07/finally_back_to_science/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

