<?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"
	>

<channel>
	<title>bv2.co.uk</title>
	<atom:link href="http://www.bv2.co.uk/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.bv2.co.uk</link>
	<description>the same, maybe better?</description>
	<pubDate>Sat, 24 Jul 2010 23:31:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Server Crash</title>
		<link>http://www.bv2.co.uk/?p=1134</link>
		<comments>http://www.bv2.co.uk/?p=1134#comments</comments>
		<pubDate>Sat, 24 Jul 2010 23:31:34 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Server Crash]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1134</guid>
		<description><![CDATA[Unfortunately about 36hours ago the Hard Drive in my web server decided to end its little spinning life. Although the site has been restored from a couple of backups some of the file download links are not working.
The files are still available but I need to fix the download links - please be patient  
For anyone running [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately about 36hours ago the Hard Drive in my web server decided to end its little spinning life. Although the site has been restored from a couple of backups some of the file download links are not working.</p>
<p>The files are still available but I need to fix the download links - please be patient <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For anyone running download monitor out there, the newer update changed the DB table names. Don&#8217;t do what I did or rather didn&#8217;t&#8230;.  and forget to change the SQL backup scripts to reflect these changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1134</wfw:commentRss>
		</item>
		<item>
		<title>PC Design Lab - new case</title>
		<link>http://www.bv2.co.uk/?p=1130</link>
		<comments>http://www.bv2.co.uk/?p=1130#comments</comments>
		<pubDate>Wed, 07 Jul 2010 09:35:11 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Asus Rampage II Gene]]></category>

		<category><![CDATA[ComputeCube]]></category>

		<category><![CDATA[PC Design Lab]]></category>

		<category><![CDATA[QMicro2]]></category>

		<category><![CDATA[SFF]]></category>

		<category><![CDATA[Tesla C1060]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1130</guid>
		<description><![CDATA[I just got an email update from PC Design Lab regarding their new case. Those of you who follow the blog will know my ComputeCube machine is built into their QMicro2 case, which has been really good with only one or two tiny niggles. Although in fairness they are caused by the the amount of [...]]]></description>
			<content:encoded><![CDATA[<p>I just got an email update from PC Design Lab regarding their new case. Those of you who follow the blog will know my <a href="http://www.bv2.co.uk/?p=945" target="_blank">ComputeCube</a> machine is built into their QMicro2 case, which has been really good with only one or two tiny niggles. Although in fairness they are caused by the the amount of power cables and the heat emitted by the Asus rampage 2 gene northbridge arrangement and the Tesla C1060.</p>
<p>The new case looks good and their have adopted the suggestions from their clients. You may have a look at the new pre-order case <a href="http://hivelogix.com/cases/case-qmicra" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/hivelogix.com');">here</a>.  Even though they have raised the cage I would have liked it to be slightly taller to help with airflow over the GPU&#8217;s and power cable routing.  Strangely they mention it can now support 750w power supplies, but I have been running a 1250w one in the older case for a while now with no problems.</p>
<p>The radiator bracket is a really good idea and would have helped sort out the Rampage 2 Genes overheating northbridge rather nicely.</p>
<p>If you are looking for a SFF case in my opinion there is nothing better out there and this new model raises the bar even further.  Now if I could only get my hands on the new one and a watercooling kit <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1130</wfw:commentRss>
		</item>
		<item>
		<title>Windows 7</title>
		<link>http://www.bv2.co.uk/?p=1120</link>
		<comments>http://www.bv2.co.uk/?p=1120#comments</comments>
		<pubDate>Tue, 06 Jul 2010 14:29:41 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Compute Cube]]></category>

		<category><![CDATA[DirectCompute]]></category>

		<category><![CDATA[GPU]]></category>

		<category><![CDATA[nvidia parallel nsight]]></category>

		<category><![CDATA[office 2010]]></category>

		<category><![CDATA[Sun VirtualBox]]></category>

		<category><![CDATA[Tesla C1060]]></category>

		<category><![CDATA[Windows 7]]></category>

		<category><![CDATA[windows XP x64]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1120</guid>
		<description><![CDATA[While ordering a replacement power supply for one of my machines I decided to add a Windows 7 to the shopping cart.
This was in no small part prompted by the NVidia parallel nsight addin for visual studio which would not work on my XP machines. An additional contributing factor was the lack of SP3 for Windows [...]]]></description>
			<content:encoded><![CDATA[<p>While ordering a replacement power supply for one of my machines I decided to add a Windows 7 to the shopping cart.</p>
<p>This was in no small part prompted by the NVidia parallel nsight addin for visual studio which would not work on my XP machines. An additional contributing factor was the lack of SP3 for Windows XP Pro x64. Of course the new office 2010 will only run on XP SP3, Vista and Windows 7.</p>
<p>Having had a brief and scary encounter with Windows Vista I am pleasantly surprised with the new version of Windows.  Microsoft have done a good job with this one.</p>
<p>The installation process had to be a &#8220;clean&#8221; one as there is no upgrade path from winXP x64. I took a full backup of my &#8220;<a href="http://www.bv2.co.uk/?p=945" target="_blank">ComputeCube</a>&#8221; machine and without bothering to format the C drive just popped the DVD in and rebooted.</p>
<p><span id="more-1120"></span></p>
<p>The installation process was completely painless and apart from one reboot occurring too quickly for me to remove the DVD from the tray it was all installed within 15 to 20 mins. The windows 7 installer actually makes a backup of your old windows and program files directories so there was no need to go and fetch stuff back from my backups.</p>
<p>I did lose my dual boot option for my Linux but lately I&#8217;ve been running them all inside VM&#8217;s so I&#8217;m not concerned by that at all.  If you are looking for good VM software: Sun VirtualBox seems to tick all the boxes and even has an API.</p>
<p>After the first login I was happy to see it had picked up all my hardware including the Tesla C1060. The only thing it had got rather wrong was the IP address of the gateway - it had missed by one&#8230;. weird.</p>
<p>I&#8217;ve been using it since Saturday now with visual studio and office 2010 and apart from one frozen file copy dialog (which rather surprisingly could be end-tasked without crashing explorer&#8230;) it has performed flawlessly.</p>
<p>Windows 7 also allows you to use DirectCompute on your GPU&#8217;s. I&#8217;ve not quite got to grips with it yet but it seems quite functional. I&#8217;ll probably stick to CUDA and OpenCL for now, much like I prefer OpenGL over DirectX - I just don&#8217;t have the time to learn all these technologies and think it makes a bit more sense to stick to the cross platform ones for now.</p>
<p>Tip: When trying to register com components via the command prompt, make sure you have selected &#8220;run as administrator&#8221;  even if you are logged in with admin rights.</p>
<p>In summary Windows 7 installation is easy and thereafter it does what it says on the tin. What more can you ask from an OS?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1120</wfw:commentRss>
		</item>
		<item>
		<title>Site Changes</title>
		<link>http://www.bv2.co.uk/?p=1115</link>
		<comments>http://www.bv2.co.uk/?p=1115#comments</comments>
		<pubDate>Wed, 30 Jun 2010 10:09:37 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[adsense]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1115</guid>
		<description><![CDATA[Yes&#8230;.. I sold out.   There is now a google adwords space on the top right on the sidebar and at the bottom of individual posts.  I went for what I think is the most unobtrusive design they offered.
Google have emailed me adwords related stuff for ages and I have resolutely resisted as this site is [...]]]></description>
			<content:encoded><![CDATA[<p>Yes&#8230;.. I sold out.   There is now a google adwords space on the top right on the sidebar and at the bottom of individual posts.  I went for what I think is the most unobtrusive design they offered.</p>
<p>Google have emailed me adwords related stuff for ages and I have resolutely resisted as this site is in no way a marketing site. However, in the last few months the site and related equipment failures (power supply, hard drive, mail server etc) have cost me quite a bit and hopefully this will help me recoup some of that.</p>
<p>Looking at what they seem to be placing as ads on the pages I have been starting to wonder how good their contextual advertising is&#8230; still it&#8217;s early days.</p>
<p>In related site news the forums are now permanently removed, although there are still some links left over as I write this.  With the amount of spam / hacking etc its just not worth maintaining a forum on a small site like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1115</wfw:commentRss>
		</item>
		<item>
		<title>Catch up</title>
		<link>http://www.bv2.co.uk/?p=1111</link>
		<comments>http://www.bv2.co.uk/?p=1111#comments</comments>
		<pubDate>Tue, 22 Jun 2010 10:02:42 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[CUDA]]></category>

		<category><![CDATA[GPU]]></category>

		<category><![CDATA[Turing]]></category>

		<category><![CDATA[Turing Complete]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1111</guid>
		<description><![CDATA[No apologies for the long delays between posts, or even checking the blog. It just has to fit in with life at the moment and there is so much going on!
Those of you who have left comments on the blog and emails for me should have got an answer last night or this morning. A [...]]]></description>
			<content:encoded><![CDATA[<p>No apologies for the long delays between posts, or even checking the blog. It just has to fit in with life at the moment and there is so much going on!</p>
<p>Those of you who have left comments on the blog and emails for me should have got an answer last night or this morning. A bit of a delay for some of you.  I do apologise for those of you who sent an email and haven&#8217;t got a reply back. My computer that used to handle all my email died and I haven&#8217;t had a chance to fix it yet. I think its just the power supply&#8230;. hopefully! so will get the emails back in a few weeks when I eventually get around to fixing it.</p>
<p>I&#8217;ve subsequently upgraded my email server - so any forthcoming mails will get to me. </p>
<p>In development work I&#8217;ve been working on my SPH simulations, and some GP stuff whenever I get a chance. GP stuff is traditionally recursive - well the equation trees anyway and have needed a substantial amount of reworking to get working efficiently on the GPU.</p>
<p>Speaking of recursive&#8230;. in order to be Turing Complete (assuming infinite memory for now) do you need to support / include recursion? Some posters on certain forums seem to think it is needed, but personally I can&#8217;t see why?  Most recursion with a bit of effort can be iterative - although possibly not very pretty or efficient.</p>
<p>For example. A GPU doesn&#8217;t really support recursion*, but I would consider cuda / GPU combination as Turing complete. Admittedly not very efficient in certain cases - single thread for example. And again ignoring the infinite memory issue.  *You can if you implement your own stack type system in global memory&#8230;</p>
<p>I&#8217;d be interested in knowing others views on this - email the normal place or comment here <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To all the regular readers of the blog - anyone else being amazed by the absolute explosion of GPU / CUDA related code / products / hardware.  Very exciting indeed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1111</wfw:commentRss>
		</item>
		<item>
		<title>SPH Screenshot</title>
		<link>http://www.bv2.co.uk/?p=1108</link>
		<comments>http://www.bv2.co.uk/?p=1108#comments</comments>
		<pubDate>Fri, 19 Mar 2010 11:45:24 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[CFD]]></category>

		<category><![CDATA[CUDA]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[ray tracing]]></category>

		<category><![CDATA[SPH]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1108</guid>
		<description><![CDATA[Finally the promised screenshot  
It&#8217;s not all that impressive to look at as I&#8217;ve restricted all the particles to 2d although it does use 3d calculations. I do this to help look for any issues in the code as I find it hard to spot errors in a 3d particle rendering.
This particular screenshot has [...]]]></description>
			<content:encoded><![CDATA[<p>Finally the promised screenshot <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><div id="attachment_1109" class="wp-caption alignnone" style="width: 309px"><a href="http://www.bv2.co.uk/wp-content/uploads/2010/03/sph_s2.jpg"><img class="size-medium wp-image-1109" title="sph_s2" src="http://www.bv2.co.uk/wp-content/uploads/2010/03/sph_s2.jpg" alt="SPH with symmetry" width="299" height="300" /></a><p class="wp-caption-text">SPH with symmetry</p></div></p>
<p>It&#8217;s not all that impressive to look at as I&#8217;ve restricted all the particles to 2d although it does use 3d calculations. I do this to help look for any issues in the code as I find it hard to spot errors in a 3d particle rendering.</p>
<p>This particular screenshot has 64000 particles that have been dropped into the box in a column formation and are now starting to slosh around at the bottom.</p>
<p>The unusual thing with regards to a CUDA implementation is that it is using symmetry in the interactions thereby decreasing the memory/processing load. I&#8217;ve still got more work to do but its showing a lot of promise in running superfast particle interaction simulations.</p>
<p>I&#8217;ve aso been doing a bit of work on my second version of my raytracer. I&#8217;ve once again stepped away from KD-trees and Octrees and am using a type of BVH, ray marching system. Screenshots once I have a decent scene rendered <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In other news I&#8217;m now compiling all my new C++/CUDA code in 64bit with the CUDA 3.0 beta. Although I think putting in c++ object support into CUDA was a mistake the new version does produce decent code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1108</wfw:commentRss>
		</item>
		<item>
		<title>Poor neglected blog&#8230;</title>
		<link>http://www.bv2.co.uk/?p=1106</link>
		<comments>http://www.bv2.co.uk/?p=1106#comments</comments>
		<pubDate>Fri, 26 Feb 2010 16:39:22 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Centos]]></category>

		<category><![CDATA[CUDA]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[openMP]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1106</guid>
		<description><![CDATA[Nearly 3 months since my last post  
Work has been exceptionally busy: In the last two months on top of my normal product maintenance and improvement duties I have prepared and filed a patent application, architected and largely completed a distributed, resilient document processing framework and found a bit of time to eat and sleep!
I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Nearly 3 months since my last post <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Work has been exceptionally busy: In the last two months on top of my normal product maintenance and improvement duties I have prepared and filed a patent application, architected and largely completed a distributed, resilient document processing framework and found a bit of time to eat and sleep!</p>
<p>I&#8217;ve noticed other blogs in the raytracing / graphics / visualization space have been very quiet lately - maybe everyone else is also working like crazy?</p>
<p>Not a huge amount has happened in my raytracer and SPH projects although got some interesting effects running with a non-uniform mass particle system when I had time over Christmas. Screenshots soon.</p>
<p>I do have the beta release of Nexus (the NVidia Visual Studio plugin)  but sadly it only runs on Windows Vista or Windows 7 which leads nicely on to my next point:</p>
<p>I am a bit irritated with Microsoft for two reasons:  Even though I purchased a 64 bit Windows XP professional about 6 or 8 months ago there is no upgrade path to Windows 7&#8230;  Secondly even though visual studio 2008 standard has a switch for openMP it doesnt contain the openmp headers. Only the more expensive professional version does. Not something that was immediately obvious from the documentation before I purchased&#8230;</p>
<p>Although I also run Linux (centos) I prefer to develop on a Windows GUI - less buggy and more responsive than gnome / kde in my opinion. For running code the Linux os does usually win though! I would really like to run Nexus so am a bit stuck about what to do&#8230;.  Succumb and buy Windows 7 and get Nexus on Visual Studio? or just forget entirely about Windows development / environment and use Linux / gcc / Intel compilers instead?  While the Intel compilers are great (if a bit expensive) for an IDE I really do like Visual Studio.  Most of my code is cross platform and for graphics I mostly use openGL so could switch without too much trouble&#8230;    But direct compute is so tempting&#8230;..</p>
<p>Arrrrgh what to do!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1106</wfw:commentRss>
		</item>
		<item>
		<title>Mandelbulb</title>
		<link>http://www.bv2.co.uk/?p=1104</link>
		<comments>http://www.bv2.co.uk/?p=1104#comments</comments>
		<pubDate>Thu, 03 Dec 2009 09:37:47 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Maths]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[gigavoxels]]></category>

		<category><![CDATA[Mandelbulb]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1104</guid>
		<description><![CDATA[I noticed this linked from both Atom and Real-time Rendering blogs. Cyril Crassin, the guy behind the amazing gigavoxels raytracing, has got a 3d Mandelbrot fractal rendering in real time.
As we know there isn&#8217;t actually a 3rd dimension to the imaginary plane so some manipulation is required. The chap who discovered a good way of transforming it [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed <a href="http://www.icare3d.org/blog_techno/gpu/gigabroccoli_the_mandelbulb_into_gigavoxels.html" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.icare3d.org');">this</a> linked from both <a href="http://farrarfocus.blogspot.com/2009/12/gigavoxels-mandelbulb.html" target="_self" onclick="javascript:pageTracker._trackPageview ('/outbound/farrarfocus.blogspot.com');">Atom</a> and <a href="http://www.realtimerendering.com/blog/real-time-mandelbulb-visualization-with-gigavoxels/" target="_self" onclick="javascript:pageTracker._trackPageview ('/outbound/www.realtimerendering.com');">Real-time Rendering</a> blogs. Cyril Crassin, the guy behind the amazing gigavoxels raytracing, has got a 3d Mandelbrot fractal rendering in real time.</p>
<p>As we know there isn&#8217;t actually a 3rd dimension to the imaginary plane so some manipulation is required. The chap who discovered a good way of transforming it to 3d ( the Mandelbulb ) has a website which you can find <a href="http://www.skytopia.com/project/fractal/mandelbulb.html" target="_self" onclick="javascript:pageTracker._trackPageview ('/outbound/www.skytopia.com');">here</a>. Well worth reading and some pretty amazing images!</p>
<p>As a side note: I&#8217;ve owned the book: &#8220;Real-time Rendering&#8221; for a number of years now and it is an invaluable resource. The Real-time Rendering blog mentioned above is the blog by the authors of the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1104</wfw:commentRss>
		</item>
		<item>
		<title>C / C++ and STL</title>
		<link>http://www.bv2.co.uk/?p=1081</link>
		<comments>http://www.bv2.co.uk/?p=1081#comments</comments>
		<pubDate>Wed, 28 Oct 2009 12:09:20 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[Development]]></category>

		<category><![CDATA[cudart (ray tracing)]]></category>

		<category><![CDATA[C++]]></category>

		<category><![CDATA[C++ and STL]]></category>

		<category><![CDATA[DAG]]></category>

		<category><![CDATA[STL]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1081</guid>
		<description><![CDATA[Before everyone gets really upset with the rest of this post, as is the trend in the OO community&#8230;  I thought I&#8217;d start, rather than end, with a disclaimer:  I use C++ and STL on a daily basis in my job, although I don&#8217;t use all of what stl has to offer it does make [...]]]></description>
			<content:encoded><![CDATA[<p>Before everyone gets really upset with the rest of this post, as is the trend in the OO community&#8230;  I thought I&#8217;d start, rather than end, with a disclaimer:  I use C++ and STL on a daily basis in my job, although I don&#8217;t use all of what stl has to offer it does make coding in c++ much easier. C++ in itself does allow fairly elegant code (if constructed carefully) whilst providing a decent level of code performance. So I do actually like C++ and stl and they make my life at work much better <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But this blog isn&#8217;t about my day job&#8230;.  It&#8217;s about my tinkering with the wonderful world of parallel algorithms and CUDA code.</p>
<p>What a lot of people don&#8217;t realize is that you *can* use stl, c++ classes and templates in a .cu file. As long as its client side code you should be fine. I&#8217;ve had a few compiler crashes when using stl especially the sort. To sort this out I used the overloaded &lt; operator in your class, don&#8217;t try and define a custom &lt; method it will crash the compiler.</p>
<p><span id="more-1081"></span></p>
<p>I was lucky enough to have Monday off so managed to find a bit of time over my extended weekend to do a bit of coding on the GPU Thermal Monitor and my ray-tracer. I&#8217;ve had drawings and code snippets written for my Proof of Concept ray tracer for a while now and just not had the time to implement them. For simplicity of debugging (come on, release <a href="http://developer.nvidia.com/object/nexus.html" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/developer.nvidia.com');">Nexus</a>!! ) I decided to implement my idea on the CPU and for speed of coding decided to use c++ and stl - after all it has served me well in the past.</p>
<p>My idea is highly parallel, after all ray tracing is a trivially parallel problem, and will eventually use persistent kernels like my cross-bridging thing did.</p>
<p>I got stuck into coding and made my first in long string of poor coding decisions. I decided to make my Rays into a class along with a vector and point class. After all there is a fairly limited set of operations on a ray and I could overload an operator to move t units along the ray thereby keeping the code nice and simple.</p>
<p>I read in all the triangles from my Stanford bunny model into a triangle class and assigned them into my modified grid data structure (also a class) using push_back on stl vectors (I prefer to use a .resize and index into them rather than using a 3d vector). From there a stl::sort got them in the order I wanted within the grid cells.</p>
<p>I now generated all the rays (rayclass) in the traditional manner from the eye through the viewport and &#8230; yes&#8230; assigned them to a stl vector.</p>
<p>After a bit of care making sure the threads behaved in accessing the data structures I was done.</p>
<p>Good programming practice so far?  In a purely OO / readability sense then yes. Nicely overloaded operators and hierarchy of classes including a few more support classes I have not mentioned. And it worked first try - apart from having to adjust the bunny position.</p>
<p>Success? Proof of concept working?</p>
<p>Er.. no :(   In deciding to make the rays and other things a class I had inadvertently scuppered my whole idea. What I was wanting to do is group and process rays in packets based on position and direction in the grid. But by using a class for the rays I&#8217;d started down a serial path. Read in a ray, assign ray to optimal grid traversal thread based on pos/dir, intersect ray with grid, intersect ray with grid cells contents (if any), move ray onwards in grid.</p>
<p>What I&#8217;d originally wanted to was:  optimal grid thread(s) fetches chunk of rays from pool based on pos/dir, the whole chunk gets intersected with grid then with objects (if any) and moves on</p>
<p>This seems like a trivial change and in fact its perfectly possible to do it with stl / c++. I could define a method for each ray class that would return a boolean to the calling grid thread indicating if it should be assigned to it. This again is inefficient as each ray object would have to be queried in turn - exposing the ray pos/dir as a public would be slightly more efficient  (although bad, coding practice) and does not solve the problem of looking up a pointer to each ray class. That said, it&#8217;s still possible to work out a quick way to traverse the pool of ray classes in the stl vector to determine which ones the grid thread should process.</p>
<p>The point here is not that c++ / stl worked perfectly BUT the way OO tends to force you into a particular way of thinking / implementation path.</p>
<p>Although OO can and does work well in a multithreading environment it does come from an era in software development where things were largely serial in nature and most of the design patterns etc tend to steer you away from a optimal solution in a &#8220;throughput computing&#8221; environment. OO has the added disadvantage of encouraging you to code for the single case and not for the group.</p>
<p>From now on I&#8217;m going to be very careful to avoid using &#8220;multithreaded&#8221; or &#8220;massively multithreaded&#8221; and &#8220;throughput computing&#8221; interchangeably as they are not the same thing at all. Although not mutually exlusive multithreaded implies lots of things running together in serial doing their own job and sometimes talking to each other via a variety of synchronization / sharing methods. Throughput computing is more about getting the job done efficiently, in general the higher the degree of sustained parallelism the higher the throughput.</p>
<p>So, how would I change my implementation?</p>
<p>Beware design patterns! Yes, great to use to get your work done - but efficient? Think carefully.</p>
<p>Rays would be generated and stored in a pool with only origin, direction, last grid intersection and tri intersection. The grid threads can then easily operate on chunks of this data and store results quickly and efficiently for the next kernel/grid (if traversing) to pick up.</p>
<p>The triangles could still be stored as classes but as we are only interested in the colour (I&#8217;m not using textures), apex, 2 sides and a normal it is much more efficient to store them in a flat structure and have the grid blocks store the index to the triangles that are within its bounds.</p>
<p>Arranging the data in blocks also allows us to re-arrange it to be in a format that is more friendly to the memory access patterns of the device / cpu.</p>
<p>Ultimately I see Objects starting to take more of a back seat in development especially in server side and throughput computing code. They still have an important role to play in many things - UI design is a good example.  I can see some sort of DAG entity being the new &#8220;object&#8221; probably stored in pools of similar ones all needing the same sort of processing or dependencies. We will probably get a whole new bunch of design patterns to go along with them too - exciting stuff!  Now who wants to write the new language / compiler??</p>
<p>So think carefully, make sure your implementation hasn&#8217;t changed your way of thinking. The code is meant to describe your algorithm not dictate its direction!</p>
<p>Now just to find some time to re-do my ray tracing code&#8230;.  <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1081</wfw:commentRss>
		</item>
		<item>
		<title>GPU Temperature Monitor</title>
		<link>http://www.bv2.co.uk/?p=1076</link>
		<comments>http://www.bv2.co.uk/?p=1076#comments</comments>
		<pubDate>Tue, 27 Oct 2009 09:28:28 +0000</pubDate>
		<dc:creator>Barrett</dc:creator>
		
		<category><![CDATA[BV2 Thermal Monitor]]></category>

		<category><![CDATA[GPU Heat Monitor]]></category>

		<category><![CDATA[GPU Temperature]]></category>

		<category><![CDATA[GPU Temperature Monitor]]></category>

		<category><![CDATA[GPU Thermal]]></category>

		<category><![CDATA[GPU Thermal Monitor]]></category>

		<category><![CDATA[nvidia gpu temperature]]></category>

		<category><![CDATA[Temperature Monitor]]></category>

		<category><![CDATA[Thermal Monitor]]></category>

		<guid isPermaLink="false">http://www.bv2.co.uk/?p=1076</guid>
		<description><![CDATA[As of writing the combined download count of the GPU Thermal Monitor has hit 520  
So far I&#8217;m yet to receive any major feedback on bugs etc which leads me to believe it: a) works perfectly or b) no-one is bothering to report issues. As I&#8217;m an optimist I&#8217;m going with option a   
I&#8217;ve had [...]]]></description>
			<content:encoded><![CDATA[<p>As of writing the combined download count of the <a href="http://www.bv2.co.uk/?page_id=863" target="_blank">GPU Thermal Monitor</a> has hit 520 <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So far I&#8217;m yet to receive any major feedback on bugs etc which leads me to believe it: a) works perfectly or b) no-one is bothering to report issues. As I&#8217;m an optimist I&#8217;m going with option a  <img src='http://www.bv2.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve had more requests for remote monitoring of the GPU temperature via a simple http request. This is something I need myself in order to keep track of temperatures in remote machines. This is now built in and in testing and bug fixing, hopefully to be released soon. I&#8217;ve not used completion ports as they seemed like overkill for what should be a light traffic application but as the source is included and under creative commons license please feel free to add them if needed. Secondly having it open source allows for some code review, which is important for security reasons as it now allows remote connections.</p>
<p>If you have found a bug or would like another feature added please drop me a comment or email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bv2.co.uk/?feed=rss2&amp;p=1076</wfw:commentRss>
		</item>
	</channel>
</rss>
