<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-454215893956321549</id><updated>2011-07-29T09:43:04.631+01:00</updated><category term='Week 4'/><category term='Honours'/><category term='Intel TBB'/><category term='Serial Application'/><category term='4'/><category term='to do'/><category term='RQ presentation'/><category term='Pillars of concurrenct'/><category term='Death Omen Star'/><category term='Vector of Separation'/><category term='Time to burn the drawing board'/><category term='proposal'/><category term='SMOKE'/><category term='Worksheet 4'/><category term='Overhead'/><category term='collision'/><category term='Here be Dragons'/><category term='deliverables'/><category term='Provisional'/><category term='Lit Review'/><category term='OpenMP'/><category term='motivation'/><category term='limiters'/><category term='Fixes'/><category term='Implientation'/><category term='getting ahead of myself'/><category term='Hash key'/><category term='feedback'/><category term='results'/><category term='mutex'/><category term='over spill already'/><category term='leakage'/><category term='threaded application'/><category term='CUDA'/><category term='Issue1'/><category term='3'/><category term='woes'/><category term='crirque'/><category term='OpenGL'/><category term='Issue 1'/><category term='Amdhal&apos;s Law'/><category term='2'/><category term='time scale'/><category term='terminology check'/><category term='Working set'/><category term='research'/><category term='week 2'/><category term='Project'/><category term='viability'/><category term='Addition of Death Ticks'/><category term='first draft'/><category term='worksheet'/><category term='1'/><category term='atomic'/><category term='Question'/><category term='benchmarking'/><category term='Thesis Question Topic  Bsc Honours'/><category term='requirements'/><category term='OD'/><category term='additional thoughts'/><category term='Boost'/><category term='Final Submittables'/><category term='reasons'/><category term='BSP'/><category term='pseudo-signature'/><category term='Issues'/><title type='text'>Honours project I/O</title><subtitle type='html'>A Blog Diary Detailing the steps and procedures of my honours project. 

With additional Demon Penguins Dood!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>89</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4031658011365693603</id><published>2009-05-18T09:11:00.003+01:00</published><updated>2009-05-18T09:27:04.887+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='first draft'/><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><category scheme='http://www.blogger.com/atom/ns#' term='additional thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='Final Submittables'/><category scheme='http://www.blogger.com/atom/ns#' term='leakage'/><category scheme='http://www.blogger.com/atom/ns#' term='Fixes'/><title type='text'>Drafting</title><content type='html'>I'll be getting the comments on my first draft today and then doing alterations to get it all fixed up for wed. I'd hope to be able to bind and burn all &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;CDs&lt;/span&gt; required tomorrow and then hand in so its not pushing on the snarling at anyone near a printer.&lt;br /&gt;Layout is mostly done just all the corrections and alterations to some of the references. CD is mostly compiled but I'm going to have to change a couple of comments, minor changes so it won't require the application to be recompiled.&lt;br /&gt;The altered version of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TBB&lt;/span&gt; and the vector class is already on the CD and ready to go along with all source and results. Apart from checking that all the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;pdfs&lt;/span&gt; I can get my hands on are on the CD and adding the poster this will be the biggest CD I've ever had to burn excluding the group project. A whole 50Mb! Not just 7Kb worth of code!&lt;br /&gt;&lt;br /&gt;Anyway I'll also quickly need to check the formatting as if all of the appendices need to be 1.5 line spaced the whole thing is going to be more pages.&lt;br /&gt;Also got to take a trip down to the copy shop today to pick up some CD sleeves and check if they can print an A2 poster on 4 A4 bits if they can then it will save me getting expensive printing somewhere else.&lt;br /&gt;Last thing I'm hoping is that there isn't too many corrections or alterations I need to make.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4031658011365693603?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4031658011365693603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4031658011365693603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4031658011365693603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4031658011365693603'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/05/drafting.html' title='Drafting'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7212272851397943594</id><published>2009-05-11T10:12:00.003+01:00</published><updated>2009-05-11T10:24:02.869+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Final Submittables'/><title type='text'>Maths</title><content type='html'>I've spent &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;thurs&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;fri&lt;/span&gt; last week attempting to do maths revision as the exam is on wed. So for the first pat of this week I'm probably not going to have much time to work on my dissertation (probably work on it when it gets late and my &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;concentration&lt;/span&gt; is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;virtually&lt;/span&gt; 0). From the last list:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;To Do&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Conclusion (Further work section)&lt;/li&gt;&lt;li&gt;More pruning required&lt;/li&gt;&lt;li&gt;Formula/Figure page numbers done on final pass&lt;/li&gt;&lt;li&gt;Bibliography/References done on final pass&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Which means that mostly now its tiding up and then compiling the CD, I've  already got some of that done but whats going to take the most time is obtaining copies of all research papers that I used/consulted. The very last thing to do will be to grab a XML backup of this blog and sling it on the disc. As well as I'll need to reread the style guide again just to make sure all the margins are correct and the figures are used correctly.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7212272851397943594?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7212272851397943594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7212272851397943594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7212272851397943594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7212272851397943594'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/05/maths.html' title='Maths'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1804041493640427384</id><published>2009-05-05T20:12:00.004+01:00</published><updated>2009-05-05T20:42:20.358+01:00</updated><title type='text'>First Draft</title><content type='html'>Just got the conclusion to write.&lt;br /&gt;But first I'm going to put together what I've got at the moment because its not the writing and rework that's going to take ages its getting MS word to format everything the way that is required. That's going to be the main problem.&lt;br /&gt;I've mostly got it set up but I've no real idea on how to stop the front page getting numbered it even is ignoring the page break.&lt;br /&gt;&lt;br /&gt;Already with the problems I had getting the table of contents to work correctly I consider it might be best to manually add and maintain the formula and figure list because of the lack of changes that will be done to them.&lt;br /&gt;&lt;br /&gt;To Do:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Conclusion&lt;/li&gt;&lt;li&gt;Rework the rest&lt;/li&gt;&lt;li&gt;List formula page numbers&lt;/li&gt;&lt;li&gt;List figure page numbers&lt;/li&gt;&lt;li&gt;Full bibliography&lt;/li&gt;&lt;li&gt;Check how to handle multiple use age of the same reference&lt;/li&gt;&lt;li&gt;Check if figures in appendices need figure numbers&lt;/li&gt;&lt;li&gt;Alter the appendix numbers in the methodology section to reflect new appendix numbers&lt;/li&gt;&lt;li&gt;Fix page numbering&lt;/li&gt;&lt;li&gt;Tech Poster&lt;/li&gt;&lt;li&gt;Discover how the hell your supposed to attach a CD to the back cover&lt;/li&gt;&lt;li&gt;Compile more information for the CD&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I'll do some more of the tech poster tomorrow after checking I can actually do my slides in the right amount of time.&lt;/p&gt;&lt;p&gt;I'd like to work directly with the first draft document the problem is making sure that things like the abstract are correctly updated.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1804041493640427384?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1804041493640427384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1804041493640427384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1804041493640427384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1804041493640427384'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/05/first-draft.html' title='First Draft'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1218326733386295951</id><published>2009-05-01T20:38:00.004+01:00</published><updated>2009-05-01T20:42:15.095+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><title type='text'>Those const errors</title><content type='html'>Think I've just realised why I was getting such major &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;const&lt;/span&gt; errors when trying to modify the objects stored within the table:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The entirety of the body passed into the parallel_for, any of the variables that are stored locally inside the helper class are declared constant.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is to make sure anything passed into the Body is uniform between all threads. Could have possibly fixed it in a few seconds by just passing the pointer to the concurrent hash map into a local variable of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;CollisionHelper&lt;/span&gt;::operator ().&lt;/p&gt;&lt;p&gt;Oh well too late now I went and hacked up the = operator to do my dirty bidding and that fixed it.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1218326733386295951?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1218326733386295951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1218326733386295951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1218326733386295951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1218326733386295951'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/05/those-const-errors.html' title='Those const errors'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2307555024264350627</id><published>2009-05-01T20:06:00.001+01:00</published><updated>2009-05-01T20:09:32.968+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='results'/><title type='text'>Graphs!Graphs!Graphs!Graphs!Graphs!Graphs!</title><content type='html'>Really the number of slides I've got for the conclusive presentation is spiraling out of control. I can add more graphs showing the information with what % of the program collision detection and the overheads take. But I have to stop it, with over 20 pages for a 5-7 min presentation I'm already pushing to get all the information in.&lt;br /&gt;Getting into the realm of slides full of recorded values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2307555024264350627?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2307555024264350627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2307555024264350627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2307555024264350627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2307555024264350627'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/05/graphsgraphsgraphsgraphsgraphsgraphs.html' title='Graphs!Graphs!Graphs!Graphs!Graphs!Graphs!'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1001398413577538845</id><published>2009-04-30T17:30:00.002+01:00</published><updated>2009-04-30T17:39:02.949+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='results'/><title type='text'>Estimated speed up</title><content type='html'>Applying Amdahl's Law to the outputs I got for the serial application altered to obtain maximum estimated speed up for the following number of processor cores:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Processors: 1  Speed Up: 1&lt;/li&gt;&lt;li&gt;Processors: 2 Speed Up: 1.081558752&lt;/li&gt;&lt;li&gt;Processors: 4 Speed Up: 1.127539093&lt;/li&gt;&lt;li&gt;Processors: 8 Speed Up: 1.152027177&lt;/li&gt;&lt;li&gt;Processors: 16 Speed Up: 1.164674475&lt;/li&gt;&lt;li&gt;Processors: 32 Speed Up: 1.171102833&lt;/li&gt;&lt;li&gt;Processors: 64 Speed Up: 1.174343696&lt;/li&gt;&lt;li&gt;Processors: 128 Speed Up: 1.175970864&lt;/li&gt;&lt;li&gt;Processors: 256 Speed Up: 1.176786139&lt;/li&gt;&lt;li&gt;Processors: 512 Speed Up: 1.177194201&lt;/li&gt;&lt;li&gt;Processors: 1024 Speed Up: 1.177398339&lt;/li&gt;&lt;li&gt;Processors: 2048 Speed Up: 1.177500434&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Pretty much at most we get a speed up of 1.177 estimated on a huge number of processors meaning that the size of the problem domain will need to be expanded in order to exploit parallelism in order to achieve greater speed up.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1001398413577538845?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1001398413577538845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1001398413577538845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1001398413577538845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1001398413577538845'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/estimated-speed-up.html' title='Estimated speed up'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2537380535157902293</id><published>2009-04-30T14:24:00.003+01:00</published><updated>2009-04-30T14:30:53.148+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><title type='text'>Write up progress</title><content type='html'>Currently I've mostly been collecting results and doing write up. So far with the final dissertation:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Abstract done (first draft)&lt;/li&gt;&lt;li&gt;Acknowledgements (adding as I remember something someone did)&lt;/li&gt;&lt;li&gt;Figure List(will be updated after each major draft)&lt;/li&gt;&lt;li&gt;Formula List (updating as I go final check after each major draft)&lt;/li&gt;&lt;li&gt;Introduction (50%&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;ish&lt;/span&gt; probably needs entirely rewritten)&lt;/li&gt;&lt;li&gt;Lit Review (90%&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ish&lt;/span&gt; needs a conclusion in order to move into methodology)&lt;/li&gt;&lt;li&gt;Methodology (90%&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ish&lt;/span&gt; touch ups needed)&lt;/li&gt;&lt;li&gt;Results (40%&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ish&lt;/span&gt;, discussed all things effecting results, which results to benchmark and how they are used. Still needs metric reasoning, results tables and discussion)&lt;/li&gt;&lt;li&gt;Conclusion(0%)&lt;/li&gt;&lt;li&gt;Bibliography/Reference (10%, will do a final pass after each draft in order to update it)&lt;/li&gt;&lt;li&gt;Appendices (50% need to finish off both results appendices and add the collision helper appendix)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Apart from that the main thing to do is to collate the parallel and serial results and then find the benchmarks required. After that the next important thing is the presentation which I need to find out if it is a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;conclusive&lt;/span&gt; presentation or an overview of the entire project.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2537380535157902293?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2537380535157902293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2537380535157902293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2537380535157902293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2537380535157902293'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/write-up-progress.html' title='Write up progress'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6122163567647375867</id><published>2009-04-29T11:15:00.003+01:00</published><updated>2009-04-29T11:22:18.740+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Again Noticed</title><content type='html'>I just noticed that when I build the collision sets for the maximum range using the wrap around ability of the variable type that after a collision set has finished processing it does not reset this variable to allow the calculation of the maximum hash value.&lt;br /&gt;&lt;br /&gt;It will probably have a trivial impact on the application however I must fix it, this means I'll need to retake the parallel metrics again to make sure, thankfully I hadn't started benchmarking just yet. Was planning to do it today thought.&lt;br /&gt;Anyway its a minor edit that will just be needed for prosperity overall. So better go and record all the new variables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6122163567647375867?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6122163567647375867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6122163567647375867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6122163567647375867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6122163567647375867'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/again-noticed.html' title='Again Noticed'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-5352346719471670533</id><published>2009-04-27T17:49:00.004+01:00</published><updated>2009-04-27T17:50:57.198+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='results'/><title type='text'>Slice of time</title><content type='html'>Time slicing keeps cropping up when talking about scalability, really need to add a bit about that to the lit review at this rate.&lt;br /&gt;&lt;br /&gt;Currently decently &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;through&lt;/span&gt; the presentation still need to get the parallel benchmarks in order to wrap that up.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-5352346719471670533?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/5352346719471670533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=5352346719471670533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5352346719471670533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5352346719471670533'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/slice-of-time.html' title='Slice of time'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7374447469692303499</id><published>2009-04-27T15:31:00.002+01:00</published><updated>2009-04-27T15:36:06.620+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='benchmarking'/><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Man thats not pretty</title><content type='html'>I just collated the results from the parallel metrics and it goes like so:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Average &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Un&lt;/span&gt;-hashed objects:797.76 &lt;/li&gt;&lt;li&gt;Average collision Tests: 15235.2 &lt;/li&gt;&lt;li&gt;Average collisions: 69.765 &lt;/li&gt;&lt;li&gt;Average hash table hits: 15245.3 &lt;/li&gt;&lt;li&gt;Average hash table misses: 14476624.37 &lt;/li&gt;&lt;li&gt;Effective Collision tests: 0.46% &lt;/li&gt;&lt;li&gt;Effective Hash Usage: 0.1% &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Compared to the serial metric results:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Average bodies without &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;BSP&lt;/span&gt; allocation: 1.01 &lt;/li&gt;&lt;li&gt;Average collision Tests: 3400.67 &lt;/li&gt;&lt;li&gt;Average collisions: 33.8 &lt;/li&gt;&lt;li&gt;Effective Collision tests: 0.9% &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Well overall in a collision set directly the parallel application finds more collisions but in the grand scheme of things performs far less useful tests. Additionally the serial application has a step up as it has all of the base object collisions.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7374447469692303499?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7374447469692303499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7374447469692303499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7374447469692303499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7374447469692303499'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/man-thats-not-pretty.html' title='Man thats not pretty'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1996466955343864858</id><published>2009-04-27T11:35:00.003+01:00</published><updated>2009-04-27T11:49:34.953+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>More results</title><content type='html'>I spent some of the weekend benchmarking the serial application.&lt;br /&gt;I've taken three functions from it as part of the benchmarking:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Time spent traversing &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; nodes&lt;/li&gt;&lt;li&gt;Time spent processing object to bound collisions&lt;/li&gt;&lt;li&gt;Time spent processing object to object collisions&lt;/li&gt;&lt;li&gt;Total time the application spent in the actual program module (and not in some back end &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;dll&lt;/span&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Because I had to estimate run times for all tests I'll have to convert all of the values to % of total run time and then average them.&lt;/p&gt;&lt;p&gt;For the parallel app:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Time spent in the parallel_for&lt;/li&gt;&lt;li&gt;Time spent layering to the hash table&lt;/li&gt;&lt;li&gt;Time spent reading back&lt;/li&gt;&lt;li&gt;Total time the application spent in the program module&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Vtune&lt;/span&gt; is &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;verrrrrry&lt;/span&gt; nice and all that but not being able to cut of a call graph test after a certain amount of time is annoying.&lt;/p&gt;&lt;p&gt;Apart from that I have all serial metrics and currently I'm finishing up taking the parallel ones (using 10 objects over a range in the hash table, gives a test time of ~5 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;mins&lt;/span&gt; instead of 5hrs ).&lt;/p&gt;&lt;p&gt;This week I need to finish:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Presentation&lt;/li&gt;&lt;li&gt;Methodology&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I need to make a better start on:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Results&lt;/li&gt;&lt;li&gt;Introduction&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Needs a conclusion:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Lit review&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Final pass after all other documentation is finished:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;References&lt;/li&gt;&lt;li&gt;Anything not referenced becomes a bibliography entry&lt;/li&gt;&lt;li&gt;Figure list&lt;/li&gt;&lt;li&gt;Formula list&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Late on Friday I quickly sketched up most of an abstract which can be touched up later.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1996466955343864858?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1996466955343864858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1996466955343864858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1996466955343864858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1996466955343864858'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/more-results.html' title='More results'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7379563140607696860</id><published>2009-04-24T14:53:00.005+01:00</published><updated>2009-04-24T15:16:48.131+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel Application Super last ditch day</title><content type='html'>Well it appears the rework of the parallel app is deadlocked somewhere.&lt;br /&gt;As usual Visual Studio 2005 is totally useless at thread debugging so I can't really discern where the deadlock is. Highest possibility it is something to do with the object iterator.&lt;br /&gt;A single iterator to the start of the list is passed into the initialisation of the collision helper, this single iterator is then copied to all of the working sets and each one stores it locally using the local iterator to increment through the list.&lt;br /&gt;The amount to increment the iterator by is the current top level loop value. It hash to lock the iterator into a tight loop as I can't just add the total number of increments required onto it.&lt;br /&gt;I could wait and then try and use Intel's thread checker at home (came with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Vtune&lt;/span&gt;&lt;/span&gt; trial) to see if I can find the problem using that. I had really planned to use his weekend for getting the serial benchmarks.&lt;br /&gt;&lt;br /&gt;Ah here we go it seems like the Collision Set loop is tripping the size_t boundary and wrapping it round to 0. That makes more sense so I'll probably need to alter how the loop increments to stop that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7379563140607696860?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7379563140607696860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7379563140607696860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7379563140607696860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7379563140607696860'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/parallel-application-super-last-ditch.html' title='Parallel Application Super last ditch day'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2249998737596560638</id><published>2009-04-23T19:22:00.003+01:00</published><updated>2009-04-23T19:28:25.913+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='benchmarking'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel benchmarking</title><content type='html'>I've thought a bit about the parallel benchmarking. After talking to my technical supervisor I could make a case that the application does not deliver the ability to render real time graphics thus benchmarking it will provide vastly differing results from the serial system.&lt;br /&gt;Or there is another way to consider. Instead of performing the benchmark for all objects in the scene it may be possible to do collision for one object and then project for performing collision detection on all of them.&lt;br /&gt;&lt;br /&gt;Apart from that I should have the AI coursework ready to be handed in soon clearing some time for maths revision.&lt;br /&gt;Currently the methodology has been dragging on far too long I really need to finish that. While the methodology has been dragging I've started the results section along with the appendices and final presentation. Really need to start doing the poster session stuff and the presentation. Oh and I've got to print it and get it bound.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2249998737596560638?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2249998737596560638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2249998737596560638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2249998737596560638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2249998737596560638'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/parallel-benchmarking.html' title='Parallel benchmarking'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3342212149453195904</id><published>2009-04-22T17:35:00.003+01:00</published><updated>2009-04-22T17:44:11.351+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Final Submittables'/><title type='text'>Final CD List</title><content type='html'>Better make a list of things and such that should be on the CD + printed out.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;On the CD&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Application logs (Serial &amp;amp; Parallel)&lt;/li&gt;&lt;li&gt;Results spreadsheets (Serial/Parallel metrics, Average results, benchmarking, hash key comparison)&lt;/li&gt;&lt;li&gt;Proposal Presentation&lt;/li&gt;&lt;li&gt;Modified TBB&lt;/li&gt;&lt;li&gt;Modified Vector class&lt;/li&gt;&lt;li&gt;Serial application&lt;/li&gt;&lt;li&gt;Collision library +tester&lt;/li&gt;&lt;li&gt;Parallel application&lt;/li&gt;&lt;li&gt;Hash key testers&lt;/li&gt;&lt;li&gt;Poster session documents&lt;/li&gt;&lt;li&gt;Serial and Parallel executable (with batch files to run them while logging, ++ TBB libraries for Parallel app)&lt;/li&gt;&lt;li&gt;Any research papers I can get my hands on&lt;/li&gt;&lt;li&gt;Dissertation&lt;/li&gt;&lt;li&gt;Separate Abstract&lt;/li&gt;&lt;li&gt;All Appendices&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Printed&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Dissertation&lt;/li&gt;&lt;li&gt;Front Page&lt;/li&gt;&lt;li&gt;Contents Page&lt;/li&gt;&lt;li&gt;Figure list&lt;/li&gt;&lt;li&gt;Formula list&lt;/li&gt;&lt;li&gt;Abstract&lt;/li&gt;&lt;li&gt;Introduction&lt;/li&gt;&lt;li&gt;Lit Review&lt;/li&gt;&lt;li&gt;Methodology&lt;/li&gt;&lt;li&gt;Results&lt;/li&gt;&lt;li&gt;Conclusion&lt;/li&gt;&lt;li&gt;Bibliography&lt;/li&gt;&lt;li&gt;References&lt;/li&gt;&lt;li&gt;Appendix 1 Original Proposal&lt;/li&gt;&lt;li&gt;Appendix 2 Hash Key Comparison&lt;/li&gt;&lt;li&gt;Appendix 3 TBB Alterations&lt;/li&gt;&lt;li&gt;Appendix 4 Collision Helper code&lt;/li&gt;&lt;li&gt;Appendix 5 Serial Results&lt;/li&gt;&lt;li&gt;Appendix 6 Parallel Results&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Right think that about covers it.&lt;/p&gt;&lt;p&gt;I'll need 3 copies of the whole Dissertation (2 to the office one to hang onto) same for the CDs. The cost in printing is going to be insane if the printers are not out of paper, which is likely to happen bets I'll probably whack someone to get to a printer.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3342212149453195904?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3342212149453195904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3342212149453195904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3342212149453195904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3342212149453195904'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/final-cd-list.html' title='Final CD List'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7613330488080428843</id><published>2009-04-22T17:08:00.002+01:00</published><updated>2009-04-22T17:11:26.805+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><title type='text'>Serial Metrics</title><content type='html'>I've just finished obtaining and collating the serial metrics:&lt;br /&gt;&lt;br /&gt;20 Tests taking the first 100 frames of data:&lt;br /&gt;&lt;br /&gt;Average Collisions Occurred: 33.83&lt;br /&gt;Average Collision Tests: 3400.67&lt;br /&gt;Average number of Objects &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Un&lt;/span&gt;-hashed: 1.01&lt;br /&gt;&lt;br /&gt;Right now I need to get the averages by benchmarking each function over several tests. I'll do that tomorrow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7613330488080428843?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7613330488080428843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7613330488080428843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7613330488080428843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7613330488080428843'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/serial-metrics.html' title='Serial Metrics'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6222218504980659370</id><published>2009-04-22T15:43:00.002+01:00</published><updated>2009-04-22T15:53:59.684+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>What did that do?</title><content type='html'>The alterations to the program seem to make it run for even longer. Oh well it was worth a try.&lt;br /&gt;&lt;br /&gt;One final alteration before I start to record results from the serial application:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Start the serial application with a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; volume active&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Easily done just grab the cameras start &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;pos&lt;/span&gt; and move it slightly. Apart from that it means unless I spend a hell of a lot of time to record values from the parallel application I'll have to leave them as undefined. Means that the only metric I can get back from my parallel application will be &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;un&lt;/span&gt;-hashed objects.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6222218504980659370?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6222218504980659370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6222218504980659370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6222218504980659370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6222218504980659370'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/what-did-that-do.html' title='What did that do?'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3535428585811052735</id><published>2009-04-22T13:43:00.003+01:00</published><updated>2009-04-22T14:29:31.185+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Grim Rework</title><content type='html'>Actually reworking this is starting to look like its not going to happen. Again I'm having trouble with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;const&lt;/span&gt; variables.&lt;br /&gt;This means that I cannot modify the iterators within the body of each chunk effectively killing any chance of alteration without altering some of the iterator &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;STL&lt;/span&gt; types.&lt;br /&gt;I'm going to keep trying until I need to go and eat after that I'll call it at this point it can be added as a further work problem. Because of this I will need to log from the parallel application without the collision function thus we will only get an estimated number of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;un&lt;/span&gt;-hashed objects.&lt;br /&gt;All of the uses of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;const&lt;/span&gt; type make sense it's just I'd like to do dangerous things with them. When the body of the parallel algorithm is initialised for all working sets it makes the body &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;const&lt;/span&gt; meaning that manipulating anything without using new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;const&lt;/span&gt; constructed &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;ver&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Switching the current chunk iterator to local has enabled this to go ahead still might fail horribly but even it it does at least I tried to fix it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3535428585811052735?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3535428585811052735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3535428585811052735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3535428585811052735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3535428585811052735'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/grim-rework.html' title='Grim Rework'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7552807197016991911</id><published>2009-04-21T14:29:00.004+01:00</published><updated>2009-04-21T14:48:51.564+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><title type='text'>Inital VTune stuff</title><content type='html'>Seeing as the serial application is basically finished(enable logging mode and we're set for getting additional benchmarks). I've spent the last while playing with VTune learning how it works.&lt;br /&gt;Firstly a major note is the differing linker command /fixed:no if this isn't set VTune can only grab the call graphs for the other libraries&lt;br /&gt;So after a quick look over a 120 second test:&lt;br /&gt;&lt;br /&gt;TraverseNode comes out on top with 1,217,739 calls taking 123,520 micro seconds&lt;br /&gt;Understandable considering that the application traverses to all root nodes per frame&lt;br /&gt;This point is one of the first serial application overheads. Setting the BSP allocation does use the same function but will give a very small error ratio.&lt;br /&gt;&lt;br /&gt;ext_RadialCollision is the next important function 174,00 calls taking 6,855 micro seconds&lt;br /&gt;&lt;br /&gt;ext_AABBCollision is next 20,054 calls taking 713 micro seconds.&lt;br /&gt;&lt;br /&gt;The lower number of AABB calls is because of how the BSP volume needs to be activated by the user, might change that so one of the BSP volumes is set as active should take barely any time because of how large each BSP volume is.&lt;br /&gt;Ideally once there is an inital BSP voulme I can set the desired test time so I have an exact number on how long the application was benchmarked for.&lt;br /&gt;Also the free trial came with the thread checker so I'll run the parallel application throught that and see what happens&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7552807197016991911?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7552807197016991911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7552807197016991911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7552807197016991911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7552807197016991911'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/inital-vtune-stuff.html' title='Inital VTune stuff'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4985207551425687774</id><published>2009-04-21T12:34:00.002+01:00</published><updated>2009-04-21T12:38:35.383+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><title type='text'>Plumbing Orz</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; white-space: pre;"&gt;Well we've had some plumbing problems with the flat downstairs so I probably won't get the chance to implement &lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; white-space: pre;"&gt;the altered parallel algorithm today. Mostly because of my preference for not working at home. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; white-space: pre;"&gt;Away way while I'm waiting for this to get fixed I suppose I'll crack open the Intel &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Vtune&lt;/span&gt; trial and do some more of the &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; white-space: pre;"&gt;final presentation.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: 13px; white-space: pre;"&gt;On another note Google Chrome is useless at formatting blogger posts correctly&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4985207551425687774?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4985207551425687774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4985207551425687774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4985207551425687774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4985207551425687774'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/plumbing-orz.html' title='Plumbing Orz'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-159400286043175587</id><published>2009-04-20T15:34:00.006+01:00</published><updated>2009-04-20T15:58:06.811+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel changes</title><content type='html'>Alterations for the parallel application will be as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Alteration from a size_t^size_t iteration space to ~3000^((max hash - min hash)/ Working set no)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;One of the major goals is to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;parallelise&lt;/span&gt; the outer most loop (the reference objects) although this is not totally possible without using the simple &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;partitioner&lt;/span&gt; and a grain size of 1 thus there will still be a loop all be it over a much smaller range.&lt;/p&gt;&lt;p&gt;Pseudo code for the following:&lt;/p&gt;&lt;p&gt;1. For top level range chunk (Range objects 0-3000) split by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;TBB&lt;/span&gt;&lt;/p&gt;&lt;p&gt;2. Add current loop variable onto passed in iterator (iterator non thread safe, iterator must point to the beginning of the object list and only be used to index the table)&lt;/p&gt;&lt;p&gt;3. Attempt to retrieve this reference object from the hash table, if it fails chalk up a hash miss&lt;/p&gt;&lt;p&gt;4. With this object &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;accessor&lt;/span&gt; retrieved from the hash table perform object to bound collision&lt;/p&gt;&lt;p&gt;5. Set bound hit if collision occurs and increment successful collisions, increment number of overall collision tests regardless of success&lt;/p&gt;&lt;p&gt;6. Construct a range based on the hash value for the reference object (range min= ref hash value -((max hash - min hash)/ Working set no), range max = ref hash value + ((max hash - min hash)/ Working set no)) check for out of bounds problems at the same time&lt;/p&gt;&lt;p&gt;7. Attempt to get the test object at this hash value if no object try for the next one&lt;/p&gt;&lt;p&gt;8. Perform object to object collision&lt;/p&gt;&lt;p&gt;9. If object to object collision occurred release the test objects &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;accessor&lt;/span&gt; and obtain &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;accessor&lt;/span&gt; to this object.&lt;/p&gt;&lt;p&gt;10. With the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;accessor&lt;/span&gt; perform vector of separation on the test object&lt;/p&gt;&lt;p&gt;11. Get next test object&lt;/p&gt;&lt;p&gt;12. After the range has been iterate through check for object to bound and object to object collision. Perform collision response if needed&lt;/p&gt;&lt;p&gt;13. Next object in this work chunk&lt;/p&gt;&lt;p&gt;The justification for ((max hash - min hash)/ Working set no) is perhaps slightly hazy. Currently it is defined because of the smaller number of working sets the greater the chance of overlap being required. Using the overall hash range means that all objects within it can be encompassed. The other way would be ((max hash - min hash)/object number) dividing the range equally between all objects.&lt;/p&gt;&lt;p&gt;Sure it is still quite a number of iterations but it is significantly less (I hope) than size_t^size_t. Means I could still have a turn around of 5-10 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;mins&lt;/span&gt; per frame but its an improvement.&lt;/p&gt;&lt;p&gt;Any reduction in the time taken per frame is a plus.&lt;/p&gt;&lt;p&gt;Again the only problem with this is that any &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;un&lt;/span&gt;-hashed objects will not undergo object to bound collision testing meaning it causes even more problems. Performing the collision on spec with a non thread safe resource (the iterators each working set will use to obtain reference objects) is far too dangerous at this point in the project thus will be left another acceptable loss described before the results section.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-159400286043175587?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/159400286043175587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=159400286043175587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/159400286043175587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/159400286043175587'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/parallel-changes.html' title='Parallel changes'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1063512850917168452</id><published>2009-04-20T13:48:00.005+01:00</published><updated>2009-04-20T14:00:59.601+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Loggers in</title><content type='html'>I've just got both sets of loggers working on the serial and parallel application.&lt;br /&gt;Serial application logs per frame values for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Total Collisions occurred &lt;/li&gt;&lt;li&gt;Total Collision tests&lt;/li&gt;&lt;li&gt;Number of objects not allocated a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; Volume (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;BSP&lt;/span&gt; allocation equals 0)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Parallel Application logs per "Frame":&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Total Collisions occurred&lt;/li&gt;&lt;li&gt;Total Collision tests&lt;/li&gt;&lt;li&gt;Number of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;un&lt;/span&gt;-hashed objects&lt;/li&gt;&lt;li&gt;Number of times a hash look up was successful&lt;/li&gt;&lt;li&gt;Number of times a hash look up failed&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Additionally all alterations to the serial application have been made meaning that effectively all that is needed is for the serial app to be &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;benchmarked&lt;/span&gt; and the results logged from it.&lt;/p&gt;&lt;p&gt;So we have the following VS metrics:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Serial Collision time VS parallel collision time&lt;/li&gt;&lt;li&gt;Serial overhead time VS parallel overhead time&lt;/li&gt;&lt;li&gt;Objects w/o &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;BSP&lt;/span&gt; allocation VS &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;un&lt;/span&gt;-hashed objects&lt;/li&gt;&lt;li&gt;Parallel overhead critique based on hash look ups vs hash misses&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Basically increased performance will be considered as:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Smaller collision time per frame with overheads having a bearing&lt;/li&gt;&lt;li&gt;Less objects missed by the storage containers the better&lt;/li&gt;&lt;li&gt;Greater hash hits than misses indicates successful implementation&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Right I'm a gonna go have some lunch and then plan the parallel application rework. On another note I've had to alter what is considered an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;un&lt;/span&gt;-hashed object instead of checking the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;accessor&lt;/span&gt; is empty the return from the insert command is used. The application seemed to be producing larger hash misses than was possible because I was logging the wrong variable. This change makes certain that a object was not hashed.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1063512850917168452?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1063512850917168452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1063512850917168452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1063512850917168452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1063512850917168452'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/loggers-in.html' title='Loggers in'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8956588692660124246</id><published>2009-04-20T11:54:00.003+01:00</published><updated>2009-04-20T12:10:50.458+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Last ditch</title><content type='html'>This week is mostly a last ditch attempt at trying to get the parallel application running somewhat close to real time graphics. Apart from that there are other tasks to be performed with the serial application:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;To do:&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add Counter for number of collision tests performed&lt;/li&gt;&lt;li&gt;Add Counter for number of objects not allocated a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; volume&lt;/li&gt;&lt;li&gt;Alter serial app render so it mirrors the parallel application&lt;/li&gt;&lt;li&gt;Add logger system to both the serial and parallel application&lt;/li&gt;&lt;li&gt;Finish up the methodology&lt;/li&gt;&lt;li&gt;AI Report at some point&lt;/li&gt;&lt;li&gt;More additions to the Appendices&lt;/li&gt;&lt;li&gt;Presentation + degree show poster&lt;/li&gt;&lt;li&gt;Benchmark and get results&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Today I'm going to implement a number of the serial application alterations and plan the parallel rework. Firstly because last nights headache hasn't gone away and secondly because these are the major parts to allow lines to be drawn between each section of both applications.&lt;/p&gt;&lt;p&gt;For benchmarking I'll maybe run each application 20 times and collect at least 100 frames worth of data from each application (its going to be fun writing up it all into an excel spreadsheet). If the Parallel application still takes 20 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;mins&lt;/span&gt; to process all collisions after the alterations I'll take a single benchmark from it and argue that proper benchmarking and testing software would be required. By the end of this week the key thing is getting the results so I can package up the coding portion of this and focus on writing and doing maths revision.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8956588692660124246?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8956588692660124246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8956588692660124246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8956588692660124246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8956588692660124246'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/last-ditch.html' title='Last ditch'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6162468689398038899</id><published>2009-04-16T15:22:00.003+01:00</published><updated>2009-04-16T15:26:17.698+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Benchmarking</title><content type='html'>Just had a quick conversation with my technical supervisor about benchmarking all the other metrics from the program. Problem is that they are time &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;sensitive&lt;/span&gt; because of how the bodies in the scene are moved.&lt;br /&gt;Best bet I've been told is to log all information to file. From that I'll run the application for a certain amount of time and then take the first 50 (or 10 which ever) and average those over that number of frames. Mention &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;somewhere&lt;/span&gt; in the report as well that a proper tool would be used to benchmark these results correctly.&lt;br /&gt;If I'm still looking at a 25 min parallel application per frame I'll take one result and call it as unworkable thus a threading failure.&lt;br /&gt;&lt;br /&gt;So &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;that's&lt;/span&gt; another task to add next week.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6162468689398038899?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6162468689398038899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6162468689398038899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6162468689398038899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6162468689398038899'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/benchmarking.html' title='Benchmarking'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4513793200691045778</id><published>2009-04-15T12:52:00.004+01:00</published><updated>2009-04-15T12:53:55.149+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>I remembered that break point this time</title><content type='html'>Parallel Application start time: ~12:26&lt;br /&gt;End time: ~12:51&lt;br /&gt;&lt;br /&gt;So about 25 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;mins&lt;/span&gt; per frame.&lt;br /&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Definitely&lt;/span&gt; not real time graphics, but it does mean I will be able to benchmark times less than 5hrs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4513793200691045778?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4513793200691045778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4513793200691045778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4513793200691045778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4513793200691045778'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/i-remembered-that-break-point-this-time.html' title='I remembered that break point this time'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8712896478507481668</id><published>2009-04-14T18:18:00.003+01:00</published><updated>2009-04-14T18:21:55.772+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Some Time later, wait,wait did I forget something?</title><content type='html'>Just to see how long it would take to iterate over unsigned int ^ unsigned int I decided to requisition another computer today and let the parallel application run putting a break point after the collision had finished. Well I forgot the break point so its been running for close to 6 hours now. Still it looked like not even a single frame had been rendered.&lt;br /&gt;I'll try again &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;tomorrow&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8712896478507481668?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8712896478507481668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8712896478507481668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8712896478507481668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8712896478507481668'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/some-time-later-waitwait-did-i-forget.html' title='Some Time later, wait,wait did I forget something?'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-315473357072533247</id><published>2009-04-13T14:06:00.004+01:00</published><updated>2009-04-13T14:15:05.323+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='getting ahead of myself'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Its gotta stop somewhere</title><content type='html'>Just thinking I could record the number of objects in the serial application that have a null &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt;&lt;/span&gt; node name. Would provide an exact comparison between that and the parallel model. But I have to stop adding metrics to compare the applications on. Really this is getting out of hand, provides a damn good comparison but still. I'm taking the advice given to me about being quantifiable pretty far.&lt;br /&gt;So either way if I decide to alter my threading system or not I need to alter the rendering system of the serial application to model that of the parallel (alteration of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;GLU&lt;/span&gt;&lt;/span&gt; objects) and add the number of collision tests. Along with the number of null &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;BSP&lt;/span&gt;&lt;/span&gt; node objects. These fixes are minor and low risk.&lt;br /&gt;With this I have a direct comparison with almost every aspect of both applications.&lt;br /&gt;&lt;br /&gt;On another node I have to stop writing objects in my dissertation as that describes this application as an N body simulation, they are bodies not objects. Doesn't help that all my classes name them as objects. Either way at the end of writing I need to do a search through the entire document and stamp out calling any of the bodies objects. It means the same thing to me but for reader the semantic change will get confusing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-315473357072533247?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/315473357072533247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=315473357072533247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/315473357072533247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/315473357072533247'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/its-gotta-stop-somewhere.html' title='Its gotta stop somewhere'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3929251755442640192</id><published>2009-04-13T11:54:00.003+01:00</published><updated>2009-04-13T12:00:53.728+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>This week</title><content type='html'>As I already stated in a previous post I am going to spent this week on the impending AI coursework. Most of the mornings (time dependant on when I actually wake up) will be devoted to writing more of the dissertation while the afternoons will be taken over by AI.&lt;br /&gt;&lt;br /&gt;Depending on how the AI coursework goes this week will effect if I am to try and change the iteration space of my parallel application. Basically how demoralised and fraught am I going to be after getting the AI coursework working. If I can get it all done this week then I'll spend the first two days of next week altering the parallel application. If that fails I'm just going to crack open the V-tune trial and benchmark over several frames recording all of the data required.&lt;br /&gt;That will wrap up the practical part of the project and then I can start producing the poster session/final presentation.&lt;br /&gt;&lt;br /&gt;If I cannot change the parallel application then the other approach goes under further work. I should have enough metrics to make a worthwhile comparison. Conclusion might be lacking slightly but that's a trade off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3929251755442640192?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3929251755442640192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3929251755442640192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3929251755442640192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3929251755442640192'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/this-week.html' title='This week'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-906255935669946424</id><published>2009-04-10T19:43:00.004+01:00</published><updated>2009-04-10T20:07:12.068+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel Application Week 4</title><content type='html'>&lt;strong&gt;&lt;u&gt;To do&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Finish off the collision helper &lt;/li&gt;&lt;li&gt;Synchronisation implementation&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Removed&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Synchronisation implementation&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Because of the way Intel &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TBB&lt;/span&gt; blocks while doing the parallel_for synchronisation is not needed.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Finish off the collision helper&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The collision helper is finished and currently runs using the parallel_for. The iteration space as already reported creates a size_t^size_t problem meaning the application is virtually unworkable.&lt;/p&gt;&lt;p&gt;Due to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;extern&lt;/span&gt; locations I've had to place the atomic variables in the main file to allow the collision helper instances increment them without much trouble. It means the headers are a bit all over the place but it works. With the current placement of all the atomic variables I can gain all of the metrics mentioned previously and would need to update the serial application in order to get the same.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Rework of the parallel routine&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I briefly described another way to use the parallel routine which would use the non thread safe object list in order to use working sets this would mean that the top level loop for reference objects would be from 0-~3000 and then the lower level loop for test objects would be based on the hash ranges (basically a secondary grain size).&lt;/p&gt;&lt;p&gt;If time permits this would probably be a better application reducing the hash look ups and the number of iterations. It would also mean that the collision helper requires a iterator passed to it preloaded with the beginning of the list.&lt;/p&gt;&lt;p&gt;1.1 For range begin to range end (Object range 0-~3000)&lt;/p&gt;&lt;p&gt;1.2 Check this object exists in the hash table (ref object)&lt;/p&gt;&lt;p&gt;1.3 Do Object to Bound collision&lt;/p&gt;&lt;p&gt;1.4 Get the hash value of this object&lt;/p&gt;&lt;p&gt;1.5 Construct a max and min hash value range&lt;/p&gt;&lt;p&gt;1.6 For range begin to end (hash value range)&lt;/p&gt;&lt;p&gt;1.7 Find if this hash value exists in the table (test object)&lt;/p&gt;&lt;p&gt;1.8 perform object to object collision&lt;/p&gt;&lt;p&gt;So instead of a size_t^size_t space we're looking at a ~3000^(hash range/grain size)&lt;/p&gt;&lt;p&gt;Depending on how next week goes will really decide if this alteration will be made.&lt;/p&gt;&lt;p&gt;If not then the times for both overheads and collision will have to be listed as unknown as the current implementation currently takes over 20 minuets (I had to leave it after taking so long). From there I can break point to obtain some suitable metrics.&lt;/p&gt;&lt;p&gt;Either way I will probably need to make the rendering adjustments to how the serial application renders objects and record the number of collision tests.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-906255935669946424?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/906255935669946424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=906255935669946424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/906255935669946424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/906255935669946424'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/parallel-application-week-4.html' title='Parallel Application Week 4'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4986191767502471222</id><published>2009-04-10T15:25:00.004+01:00</published><updated>2009-04-10T17:19:55.748+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='time scale'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Where to now?</title><content type='html'>Currently the deadlocking problem seems to be fixed.&lt;br /&gt;Now the only problem is the iteration range an insane 0 to a possible 4294967295. Combine the fact that for each working set I'm comparing each object with every other object meaning the application dies horribly. With ~3000 objects (some do not get hashed correctly) there are also a large number of hash misses in this iteration space. Thankfully the searches in the hash may use the hash key and some &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;bitwise&lt;/span&gt; logic in order to cut down the search space to a smaller chunk.&lt;br /&gt;With this there are still a massive number of hash misses. What is really needed is an ordered hash table effectively cutting out all of the hash misses and providing a direct ~3000 iteration space.&lt;br /&gt;For this approach to maybe be worth it we a hell of a lot more cores in order to process all the working sets faster. Really shows that trying to avoid memory management of working sets is pointless.&lt;br /&gt;&lt;br /&gt;So the ultimate question is do I stop programming here and collect benchmarks that I need or do I keep fighting with this current implementation which is probably flawed from the ground up?&lt;br /&gt;&lt;br /&gt;Salvaging this implementation may be possible through the use of the object list.&lt;br /&gt;It does mean manipulating a non thread safe resource that would not be modified in anyway.&lt;br /&gt;Instead of using the hash key range we use the object range (0-~3000).&lt;br /&gt;Each working set uses an object in this range and obtains the hash value for the object.&lt;br /&gt;Depending on the working set size (or hash table range) we then search using this object as the center of the working set. This may reduce the exponential hash map misses.&lt;br /&gt;&lt;br /&gt;Anyway I think I need to put up some dates and do some decisions.&lt;br /&gt;Writing the dissertation: idealistically finish a week before the hand in or earlier&lt;br /&gt;Poster session: Can be started around the same time as results/final presentation&lt;br /&gt;Presentation: needs to start week of the 20&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;th&lt;/span&gt; April&lt;br /&gt;Results benchmarking: again needs to start the week 20&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;th&lt;/span&gt; April&lt;br /&gt;&lt;br /&gt;Most important and pending is the final presentation.&lt;br /&gt;&lt;br /&gt;I'm taking next week off coding honour stuff in order to do the AI coursework. Hopefully I can get most of that done during this coming week. Apart from that the week beginning the 20&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;th&lt;/span&gt; will see if I will bother to try and implement this alternate method. Its more than likely though I will just need to leave it and list the processing and over head times as undefined.&lt;br /&gt;Still to do today is get all of the atomic counters in the right place and I doubt I'm going to have time to do synchronisation (But from the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;TBB&lt;/span&gt; implementation the parallel for blocks until done so synchronisation is in fact useless). The excuse that I didn't know exactly how some of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;TBBs&lt;/span&gt; templates and systems worked is really pathetic as an excuse. Still I need to back up my choice no matter how shallow it was.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4986191767502471222?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4986191767502471222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4986191767502471222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4986191767502471222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4986191767502471222'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/where-to-now.html' title='Where to now?'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7454764406568920036</id><published>2009-04-10T14:11:00.004+01:00</published><updated>2009-04-10T14:23:45.360+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Deadlocking</title><content type='html'>One of the main reasons the application is using 99% of processing power is because the thread is deadlocking itself (seems the task manager has only allocated one thread) every time it attempts to obtain a read/write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;accessor&lt;/span&gt; to a object within the hash map.&lt;br /&gt;I've quick fixed this by storing the hash values that are used when obtaining a read/write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;accessor&lt;/span&gt; and then &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;releasing&lt;/span&gt; the read &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;accessor&lt;/span&gt; for the object.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;Makes&lt;/span&gt; sense why to disallow a read/write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;accessor&lt;/span&gt; until a read &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;accessor&lt;/span&gt; is finished.&lt;br /&gt;Anyway with that fixed the highest &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;possibility&lt;/span&gt; is that the problem is now the memory thrash and the size of the range that I'm iterating over.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7454764406568920036?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7454764406568920036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7454764406568920036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7454764406568920036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7454764406568920036'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/deadlocking.html' title='Deadlocking'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2702946426342576863</id><published>2009-04-10T12:27:00.005+01:00</published><updated>2009-04-10T13:09:44.927+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='Time to burn the drawing board'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Let the Hilarity begin!</title><content type='html'>Just started to try and use my parallel template (w/o synchronisation), well, according to the task manager 3 threads (one main, one render and one task manager I assume) churning the CPU at 99%. Oh yeah.&lt;br /&gt;&lt;br /&gt;On the plus side it seems like memory is staying constant. Which means there may not be any memory leaks.&lt;br /&gt;&lt;br /&gt;Additionally I've had a quick look at the task manager system, looks like I can set the number of threads, would be a good scalability test but that can be done later. Ideally the task manager should choose the number of available threads as to maximise the usage of all &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;CPUs&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Anyway I'm going to have to add all of the counters and synchronisation. And then I'll play around with the grain size a bit and see what happens.&lt;br /&gt;On another note it is not even hitting the break point I put in the main thread. Well this was expected so its not like I'm that devastated.&lt;br /&gt;&lt;br /&gt;Also apparently part of the code is stuck in an infinite loop this would also explain the 99% CPU usage. Possibilities are I've deadlocked a thread somewhere. But because of the lack of standardised threading debug tools trying to use the standard VS2k5 debugger switches between threads from what I can see at the moment.&lt;br /&gt;&lt;br /&gt;Needless to say: I Win!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2702946426342576863?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2702946426342576863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2702946426342576863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2702946426342576863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2702946426342576863'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/let-hilarity-begin.html' title='Let the Hilarity begin!'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-5779270415753824818</id><published>2009-04-08T15:36:00.005+01:00</published><updated>2009-04-08T15:59:23.549+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><category scheme='http://www.blogger.com/atom/ns#' term='leakage'/><title type='text'>Stuff compiles, no idea if it will work</title><content type='html'>I just overrode the standard class definition for the = operator in my object class. Apparently I'm now able to perform the STD::Pair swap function with a &amp;amp;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;lt&lt;/span&gt;; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;const&lt;/span&gt; Key, T &amp;gt; type.&lt;br /&gt;This means that I can &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;de&lt;/span&gt;-reference the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;const&lt;/span&gt; Key type to a new object, manipulate that object and then create a new pair. Finally swapping in the new pair. It compiles but because I'm still about half way through coding up the collision response I cannot test it just yet.&lt;br /&gt;The main thing I'm not happy about is the additional memory allocation and destruction per frame but its the only way I can see to get around this without hacking up more of the template. With the additional memory alterations the application could also start memory leaking like an incontinent puppy.&lt;br /&gt;&lt;br /&gt;I've had to override the = like so:&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;const&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Cobject&lt;/span&gt;&amp;amp; operator=(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;const&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Cobject&lt;/span&gt; &amp;amp;obj) &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;const&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and within the function body strip the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;const&lt;/span&gt; correctness from the object that the keyword "this" points to, using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;const&lt;/span&gt;_cast &amp;lt;Cobject* &amp;gt;&lt;cobject*&gt;() to perform this operation. Before altering all the values based on the address of a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Cobject&lt;/span&gt; passed in.&lt;br /&gt;&lt;br /&gt;From the amount of memory thrashing that the application will do per frame this is going to be crawling along &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;compared&lt;/span&gt; to the serial version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-5779270415753824818?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/5779270415753824818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=5779270415753824818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5779270415753824818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5779270415753824818'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/stuff-compiles-no-idea-if-it-will-work.html' title='Stuff compiles, no idea if it will work'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6581366220166985103</id><published>2009-04-07T18:28:00.006+01:00</published><updated>2009-04-07T19:54:32.833+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='atomic'/><category scheme='http://www.blogger.com/atom/ns#' term='mutex'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>I Atomic</title><content type='html'>Because I woke up late today and had other pressing matters to attend to I've only had time today to look at the thread synchronisation as well as some information about collecting metrics from threads.&lt;br /&gt;&lt;br /&gt;So firstly I thought using mutexes in some way to control the synchronisation of the parallel application so that after rendering the main thread waits for the threaded system to finish processing before continuing.&lt;br /&gt;Ideally some sort of mutex that allows multiple locks to be acquired and then the main thread continues if no locks are present on that mutex. The problem is that it needs to wait for N number of lock releases before continuing. The lock also has to yield to other processes if the lock cannot be obtained. The current plan is to make a call to the object manager when parallel collisions starts and that in turn will make the call to the collision helper using the parallel_for implementation within TBB.&lt;br /&gt;With this I can do a pre collision test metrics reset and it also avoids having to make the collision manager model the parallel_for body concepts which would be a lot harder and more memory intensive (Basically would be using the Copy constructor to build several copies which would then destroy concurrency when one as destructed as it would try and destroy the master object list). Its currently uncertain which of the mutexes would be best to use.&lt;br /&gt;With this problem another way might be to use an atomic variable that performs what seems like instantaneous actions on a possible shared variable. So when a thread starts processing a working set it increments an atomic variable and then decrements it when all processing is finished. The problem with that is the actual test in the main program, if two threads finish at the same time decrementing the atomic variable using -- notation (this basically blocks all access to the variable) meaning that if the main thread gets time sliced onto a processor and the atomic is tested then before the next thread receives the next working set then the program will continue and start the next frame.&lt;br /&gt;&lt;br /&gt;Apart from this atomic variables declared as externs (have to check the program to make sure of no naming clashes) will be ideal to store all the metrics I need to get from all of the threads. Because the bodies of the parallel_for types do not need to model a join concept that would allow for a summation of local variables storing the required metrics. Still wondering if I should return direct atomic vars or dereference them to their actual values and return them. Dereferencing them would lower the proliferation in the program of the tbb atomic header files (to an already complex inclusion model here and there). On that note I'll probably need to go draw another inclusion and communication map and see how much crossover there is. Hopefully by the time I get out of here tonight I'll have an idea of what synchronisation method to use and can implement that.&lt;br /&gt;&lt;br /&gt;There is still one underlying problem with my modifications to the hash table that could bring the entire project down in how the hash code is used in order to search for the underlying segment of the hash map:&lt;br /&gt;&lt;br /&gt;my_segment[hashcode&amp;amp;(n_segment-1)];&lt;br /&gt;&lt;br /&gt;My concern is what happens if I try doing a bitwise AND with a hashcode that doesn't exist on the hash map. But after looking at the definition it seems that segments are designed to hold a maximum amount of data thus anything from between the max and min will not cause any problems. Thus the segment return will be checked based if the node exists and as the altered functions cannot insert new nodes this will return a false value. However because the size of the segments is based upon a size_t value any other of template type T may cause problems.&lt;br /&gt;&lt;br /&gt;Additionally since I'm not used to template coding I've just noticed in a few places I have made functions specific to my hash table implementation which will need fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6581366220166985103?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6581366220166985103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6581366220166985103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6581366220166985103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6581366220166985103'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/i-atomic.html' title='I Atomic'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-416424616853400597</id><published>2009-04-06T17:03:00.008+01:00</published><updated>2009-04-06T18:01:13.186+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Thinking the second</title><content type='html'>I've had another look at the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TBB&lt;/span&gt;&lt;/span&gt; implementation. Currently from what I've just noticed in the header file the std::pairs returned from a hash key search do not contain the hash value of the object instead including the t value that is passed in which for inserting for anything but a STD:: is set to null. Meaning that I need to write another template so that the last value that will be passed into the STD::pair while storing will be the hash value.&lt;br /&gt;New templates will look like so modeling from the standard &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TBB&lt;/span&gt;&lt;/span&gt; ones:&lt;br /&gt;&lt;br /&gt;write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;accessor&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;bool&lt;/span&gt;&lt;/span&gt; insert( &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;accessor&lt;/span&gt;&lt;/span&gt;&amp;amp; result, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;const&lt;/span&gt;&lt;/span&gt; Key&amp;amp; key, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;const&lt;/span&gt;&lt;/span&gt; T&amp;amp; t) {&lt;br /&gt;return &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;lookup&lt;/span&gt;&lt;/span&gt;&amp;amp;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;lt&lt;/span&gt;&lt;/span&gt;;/*INSERT*/ true&amp;gt;(&amp;amp;result, key, /*write=*/true, &amp;amp;t);&lt;br /&gt;&lt;br /&gt;read &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;accessor&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;bool&lt;/span&gt;&lt;/span&gt; insert( &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;const&lt;/span&gt;&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;accessor&lt;/span&gt;&lt;/span&gt;&amp;amp; result, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;const&lt;/span&gt;&lt;/span&gt; Key&amp;amp; key, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;const&lt;/span&gt;&lt;/span&gt; T&amp;amp; t) {&lt;br /&gt;return &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;lookup&lt;/span&gt;&lt;/span&gt;&amp;amp;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;lt&lt;/span&gt;&lt;/span&gt;;/*INSERT*/ true&amp;gt;(&amp;amp;result, key, /*write=*/false, &amp;amp;t);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This will make each hash object return it's hash value as well and thus my edit of the find function (therefore the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;lookup&lt;/span&gt;&lt;/span&gt; and search_list function) will work as intended. I'm slightly miffed why the template doesn't do this inherently as the definition is that of type &amp;amp;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;lt&lt;/span&gt;&lt;/span&gt;; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;const&lt;/span&gt;&lt;/span&gt; Key, T&amp;gt;. Currently in the code when a new node is allocated to the map it just sets the T type value to 0 no matter what and only the STD::pair input templates take in a second value. Just noticed as well that my previously changed functions do not conform to standard template style, so I'll change need to change them.&lt;br /&gt;&lt;br /&gt;Because when an object to object collision occurs I need to be able to manipulate the direction and position I can not just simply sacrifice the second pair variable to store either of these. Additionally the hash value contained within the second variable needs to be set as the hash value otherwise I can not search the table via the hash key.&lt;br /&gt;&lt;br /&gt;I still have the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;const&lt;/span&gt;&lt;/span&gt; problem when editing the actual objects that get returned and I have no idea how to get round this. Frankly if this doesn't get fixed that's it for the project.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Ultimatum &lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;If by mid week I still can not figure out how to manipulate the values in those &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;const&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;accessors&lt;/span&gt; I'll put together a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;struct&lt;/span&gt; and have to totally mess up the edited search function by editing it so it is a fixed function (I'll need to include the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;struct&lt;/span&gt; def within the concurrent_hash_map template). By doing this I have a write able &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;struct&lt;/span&gt; that I can perform complex manipulation on. The more I hack at the concurrent hash map definition the more likely a deadlock, race condition or other threading problem is likely to occur. Use of the template to reduce problems such as this was the main reason for using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;intel&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;TBB&lt;/span&gt; over Boost. Might have been better using Boost but then concurrency would have become a large issue a with the internal locks not being present within the standard hash table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-416424616853400597?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/416424616853400597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=416424616853400597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/416424616853400597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/416424616853400597'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/thinking-second.html' title='Thinking the second'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1015563065129373606</id><published>2009-04-03T16:25:00.004+01:00</published><updated>2009-04-03T17:09:23.021+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reasons'/><category scheme='http://www.blogger.com/atom/ns#' term='Week 4'/><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Vector of Separation'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel Application Week 3</title><content type='html'>&lt;strong&gt;&lt;u&gt;To Do&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hash table read back&lt;/li&gt;&lt;li&gt;Object to Bound collisions&lt;/li&gt;&lt;li&gt;Object to object collisions in parallel&lt;/li&gt;&lt;li&gt;Synchronisation concept&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Removed Tasks&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Concurrency Implemented&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Removed because the concurrent hash map will be used to control concurrency.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Hash table read back&lt;/li&gt;&lt;li&gt;Collision helper implemented with object to bound collisions&lt;/li&gt;&lt;li&gt;Collisions helper with object to object collisions almost complete&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Most of the collision helper that will be used to parallel process tasks has been created after having to hack up the concurrent_hash_map definitions so that there is a new find function that uses a hash key to obtain a writer or reader lock on an element in the map. Here's where the current problem comes in.&lt;/p&gt;&lt;p&gt;After upgrading from read only access to write access (using the accessors) so that I can start the vector of separation for one of the objects the write accessor only allows me to modify the second value of the STD::pair (the hash value) because the typedef within the accessor that contains defines the pair is:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;typedef std::pair &amp;#60; const Cobject,size_t &amp;#62; value_type; (Taking into account the class type I'm hashing)&lt;/p&gt;&lt;p&gt;So there has to be some sort of conversion so that I can alter this standard pair otherwise I have no idea why it is worth acquiring a write lock to only be able to modify the hash value. Chances are I'm missing somthing what thought I'm unsure.&lt;/p&gt;&lt;p&gt;From attempts to modify the key using the STD:Pair swap function seems to have yielded the best results but I do not have an operator to handle a left value of const Cobject thus compilation fails. Soon as this is fixed theres the massive problem of actually debugging any thread errors. A perceived problem is upgrading an acessor to have write access while still retaining the read accessor from earlier.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Next Week&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Finish off the collision helper along with a check for altering the directions&lt;/li&gt;&lt;li&gt;Synchronisation implementation&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I'm really going to have to get synchronisation theorised next week and implemented, currently there's a chance that this application will be a week over the estimated deadline. This means the week starting the 13Th will probably be used to finish off the parallel application if it works.&lt;/p&gt;&lt;p&gt;From there the next two weeks will be spent on the AI coursework (due 1st May), application testing and writing the final presentation. Somewhere within all this I have to have my methodology and introduction written. By the start of May I should only have to write the analysis and conclusion. Oh and some maths revision has to happen.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1015563065129373606?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1015563065129373606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1015563065129373606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1015563065129373606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1015563065129373606'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/parallel-application-week-3.html' title='Parallel Application Week 3'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7298470261354634162</id><published>2009-04-02T17:22:00.004+01:00</published><updated>2009-04-02T18:00:48.972+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>TBB Hackup stage one aftermath</title><content type='html'>Currently the new concurrent_hash_map template compiles cleanly (well mostly the same conversion warnings are there and they have been there since I started using it). Here's the current pseudo code for the section to be run over splittable ranges:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Iterate through the Min to Max hash keys for this range&lt;/li&gt;&lt;li&gt;Find an object to use for the reference object&lt;/li&gt;&lt;li&gt;Check that the object is exists in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;accessor&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Get all information required from the reference object&lt;/li&gt;&lt;li&gt;Perform collision test with the bounding area set a Boolean if a hit occurs&lt;/li&gt;&lt;li&gt;Iterate through the Min to Max hash keys again to find a test object&lt;/li&gt;&lt;li&gt;Check the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;accessor&lt;/span&gt; contains a test object&lt;/li&gt;&lt;li&gt;Check the ID of the reference and test object are not the same, if so release the test object and get the next one in the list&lt;/li&gt;&lt;li&gt;Get all information required for from the test object&lt;/li&gt;&lt;li&gt;Perform Object to Object collision setting a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;bool&lt;/span&gt; id a hit occurs&lt;/li&gt;&lt;li&gt;Perform vector of separation if a hit occurred obtaining a write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;accessor&lt;/span&gt; on the test object to set the new position&lt;/li&gt;&lt;li&gt;If a hit occurred increment the object to object hit counter&lt;/li&gt;&lt;li&gt;Check if either a collision between the object and bounds or object to object occurred (object to object if the object to object hit counter is greater than 0)&lt;/li&gt;&lt;li&gt;Depending on the collision that occurred obtain write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;accessors&lt;/span&gt; and invert the movement direction&lt;/li&gt;&lt;li&gt;Clear both Boolean hit variables&lt;/li&gt;&lt;li&gt;Iterate to test the reference object over the Max to Min range&lt;/li&gt;&lt;li&gt;Set object to object collision counter to 0 for next reference object&lt;/li&gt;&lt;li&gt;Get next reference object&lt;/li&gt;&lt;li&gt;Free up all &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;accessors&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Somewhat colossal at the moment.&lt;/p&gt;&lt;p&gt;Few Notes about this:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Directions must be inverted at the end of each iteration due because if they are not then there is the possibility of the direction being constantly flipped creating multiple collisions&lt;/li&gt;&lt;li&gt;Obtaining write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;accessors&lt;/span&gt; is minimised as much as possible and the time they are active is as small as possible to avoid the chance of threads spinning waiting to acquire an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;accessor&lt;/span&gt; to the same data location as the write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;accessor&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;Currently no way to obtain the number of collisions that occur without some sort of atomic variable or other counter&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Currently I'm in the middle of performing the vector of separation section, altering the value in the table using the write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;accessor&lt;/span&gt; seems to be causing some problems. Apart from that once this is somewhat working I need to look at the rehashing of objects based on a hash key, which will involve hacking up the template even more to bend it to my will.&lt;/p&gt;&lt;p&gt;Current foreseeable problems:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Collision accuracy with the working sets in this condition (crisp sets with no overlap)&lt;/li&gt;&lt;li&gt;Hashing objects based on a hash key&lt;/li&gt;&lt;li&gt;concurrent_hash_map may have a massive number of misses to find objects&lt;/li&gt;&lt;li&gt;Major problem with thrashing memory&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If hashing objects based on a hash key is unworkable then it will be left, considered a viable concession and a number of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;un&lt;/span&gt;-hashed object will be recorded.&lt;/p&gt;&lt;p&gt;Ideally for a decent conclusion and analysis I need the following metrics:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Serial Collision time (+time for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;BSP&lt;/span&gt; tree traversal)&lt;/li&gt;&lt;li&gt;Parallel Collision time (+time for hashing and read back)&lt;/li&gt;&lt;li&gt;Serial number of actual collisions VS number of tests&lt;/li&gt;&lt;li&gt;Parallel number of actual collisions VS number of tests&lt;/li&gt;&lt;li&gt;Parallel hash table hits/misses&lt;/li&gt;&lt;li&gt;Parallel number of objects not hashed (if applicable)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Both sets of time benchmarks will allow the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;Ahmdahl's&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;Gustafson's&lt;/span&gt; law comparisons and comments on why they either do meet the theorised times or do not meed the theorised times.&lt;/p&gt;&lt;p&gt;The number of actual collisions VS number of tests provides a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;throughput&lt;/span&gt; metric allowing clarification if times are very similar to be explained and considered.&lt;/p&gt;&lt;p&gt;The last two metrics allow &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_17"&gt;further&lt;/span&gt; discussion and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;critique&lt;/span&gt; on the parallel &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;implementation&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://twitter.com/Sojha/status/1438556267"&gt;And with this I've got some control back over the project.&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7298470261354634162?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7298470261354634162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7298470261354634162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7298470261354634162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7298470261354634162'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/tbb-hackup-stage-one-aftermath.html' title='TBB Hackup stage one aftermath'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1305072927672737528</id><published>2009-04-02T15:04:00.005+01:00</published><updated>2009-04-02T15:55:44.284+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>TBB Hackup</title><content type='html'>I've started to hack up the concurrent_hash_map headers in order to shoehorn it into using the method I require. This is really where it gets complex so I'll list the changes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create two template functions that take in an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;acessor&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;const&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; or normal) and a T type that call a specialist look up function&lt;/li&gt;&lt;li&gt;Rework Search_list so instead of checking for equal hash keys for two objects it uses the passed in T type and compares a the T type with a hashed value based on an object retrieved from a node list.&lt;/li&gt;&lt;li&gt;Alter the Look Up function so that it takes the hash value directly from the t input. All calls to this altered function will not attempt to add any nodes to the table.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This should take care of using a hash value to find an object within the hash map. The problem then is to create a function that will hash an object to a location based on a hash key. This will be needed to deal with objects possibly hashing to the same values.&lt;/p&gt;&lt;p&gt;Mostly what I'm really doing is reducing the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;re usability&lt;/span&gt; of most functions. The current templates use a number of state variables in order to utilise a single Loop Up function to do a large number of operations from finding objects to inserting them into the table.&lt;/p&gt;&lt;p&gt;I'm just about to insert the altered Loop Up function and compile, this should be somewhat fun.&lt;/p&gt;&lt;p&gt;Life would also be easier if performing any access to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;intelisense&lt;/span&gt; database did not hang visual studio for about 5-10 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;mins&lt;/span&gt; each time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1305072927672737528?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1305072927672737528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1305072927672737528' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1305072927672737528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1305072927672737528'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/tbb-hackup.html' title='TBB Hackup'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1610846495326241199</id><published>2009-04-01T18:30:00.004+01:00</published><updated>2009-04-01T18:35:05.000+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Hash Map Range</title><content type='html'>I've had a look at the single example that provides the same sort of method that I was planning to use &lt;a href="http://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/56547/"&gt;here&lt;/a&gt;. Using this may fix the problem but because the hash map is unsorted this still may not be feasible to use.&lt;br /&gt;If this will not work I'm going to have to ask on the forum for advice there is no other way I can see about getting access to the table via the max and min hash values.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1610846495326241199?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1610846495326241199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1610846495326241199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1610846495326241199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1610846495326241199'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/hash-map-range.html' title='Hash Map Range'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3024639271756672514</id><published>2009-04-01T16:33:00.003+01:00</published><updated>2009-04-01T17:25:51.806+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Hacking things up</title><content type='html'>I've had a quick attempt at implementing the apply a range over a body concept.&lt;br /&gt;This has thrown up a few problems, most importantly I can not access the hash table directly with a hash value. Unless one of the public types contained in the concurrent_hash_map can perform the task I require, somehow a function needs written that will cut out the step based on hashing a Object into a size_t value and just do the look up based on the size_t value. The lookup function within the template would be best to override somehow as it takes one of the accessor (or const_accessors) and finds he object based on the hash key. But the find lookup function is internal and calculates a hash value before finding the object.&lt;br /&gt;&lt;br /&gt;And I've still got to have a clear look at the task manager system that will allocate working sets to threads.&lt;br /&gt;&lt;br /&gt;Without this access I've hit a brick wall, best thing I can think of is going and grabbing the associated book from the library if it has it and until 7:30 the catalogue system is down.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3024639271756672514?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3024639271756672514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3024639271756672514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3024639271756672514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3024639271756672514'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/hacking-things-up.html' title='Hacking things up'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6993273195183318402</id><published>2009-04-01T14:18:00.005+01:00</published><updated>2009-04-01T15:30:22.201+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='to do'/><category scheme='http://www.blogger.com/atom/ns#' term='additional thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Noticed</title><content type='html'>I've noticed that most of the time I'm not writing up anything in my notebook and simply charging into attempting to use &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TBB&lt;/span&gt;&lt;/span&gt;, which frankly is killing me. So based on what I have to do this week I'll quickly throw up a new to do list:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Collision helper class to model the pseudo-signatures for the Body concept&lt;/li&gt;&lt;li&gt;Object class modeling all of the copy constructable concepts&lt;/li&gt;&lt;li&gt;Working set thoughts with respect to extending the working sets to overlap&lt;/li&gt;&lt;li&gt;Object to bound collision&lt;/li&gt;&lt;li&gt;Synchronisation concept&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Object class modeling&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Currently the object class models three of the copy constructable concepts:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Copy constructor&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Destructor&lt;/span&gt;&lt;/span&gt; (naturally)&lt;/li&gt;&lt;li&gt;Copy via taking address of an object&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Currently it does not model one concept:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Const&lt;/span&gt;&lt;/span&gt; copy via taking the address off a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;const&lt;/span&gt;&lt;/span&gt; object&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Collision class modeling&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The collision class needs to model three concepts:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Copy constructor&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Destructor&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Apply body to range&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Of these three the hardest to implement will be to apply the body to range. The copy constructor is basically the same idea as used for the object class.&lt;/p&gt;&lt;p&gt;It's possible that I can &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;pre&lt;/span&gt;&lt;/span&gt;-load this class with the hash map and bounding volume metrics. Because of how this is all implemented with the copy constructors the collision helper can not delete either of these two objects, thus using a pointer approach would be best and only null the pointers at deconstruction of collision helper classes.&lt;/p&gt;&lt;p&gt;The other problem with this class is reading the number of collisions processed. Because all of these classes will be copied several times in order to create discreet working sets the problem about amalgamating all of the collision counts together as a parallel_for does not need the join concept modeled.&lt;/p&gt;&lt;p&gt;A possible way round it may be to use an atomic variable that can only incremented by one thread at a time but this is currently uncertain.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Working sets&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The current problem with the working sets is the fact that it will be a range of hash values creating a large number of table look ups that do not return objects to test for collisions. This will go two fold as first a reference object needs to be found and then a test object needs to be found checking that it is not the same object.&lt;/p&gt;&lt;p&gt;As for extending the range this will cause more misses from the hash table increasing serial overhead time. &lt;/p&gt;&lt;p&gt;Frankly what is happening is that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;UMA&lt;/span&gt;&lt;/span&gt; model I've proposed is falling prey to the fact that the PRAM system it is based off assumes no communication overhead whatsoever. So the communication overhead (memory access) will slowly grind the application to a halt. The problem then is what to do in this case, the threading methodology will work but at debatable performance due to memory consideration. It is possible that memory access overhead could be reduced by using the affinity &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;partitoner&lt;/span&gt;&lt;/span&gt; within &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;TBB&lt;/span&gt;&lt;/span&gt; in order to preserve cache concurrency speeding up any accesses to main memory.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Synchronisation&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Ideally some sort of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;mutex&lt;/span&gt;&lt;/span&gt; that would wait until a certain number of attempts to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;aquire&lt;/span&gt;&lt;/span&gt; it have been made the problem is the location of the synchronisation concept in relation to the rendering functions. An approach might be to make the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;mutex&lt;/span&gt;&lt;/span&gt; within the object manager that would block until the conditions have been met.&lt;/p&gt;&lt;p&gt;Currently the estimated synchronisation point is after the the frame limited draw section. It may in fact be better to alter it so that the program blocks before the next game loop starts so that windows can process messages while the collision is finishing up. The change would look like so:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Wait for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;mutex&lt;/span&gt;&lt;/span&gt; to be acquired&lt;/li&gt;&lt;li&gt;Read back from hash table&lt;/li&gt;&lt;li&gt;Perform time based movement&lt;/li&gt;&lt;li&gt;Hash all objects to the table&lt;/li&gt;&lt;li&gt;Start collision testing&lt;/li&gt;&lt;li&gt;Render&lt;/li&gt;&lt;li&gt;Swap Frame buffers&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The only problem with this is for the first frame the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;mutex&lt;/span&gt;&lt;/span&gt; would have to be &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;pre&lt;/span&gt;&lt;/span&gt;-acquired otherwise the program would block and not continue.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_15"&gt;Addendum&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I've also just had my first set of hash collisions (two objects hashing to the same value) which will NEED to be handled by either adding them to a hash value above or below the hash collision point.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6993273195183318402?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6993273195183318402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6993273195183318402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6993273195183318402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6993273195183318402'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/04/noticed.html' title='Noticed'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8337032715910611352</id><published>2009-03-31T16:28:00.005+01:00</published><updated>2009-03-31T16:51:49.898+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='pseudo-signature'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Copy Constructable</title><content type='html'>I think I've almost got the copy constructable concept down, of course if the code I've got is working correctly is an entirely different matter.&lt;br /&gt;The only pseudo-signature I'm having trouble with now is:&lt;br /&gt;&lt;br /&gt;const T* operator&amp;amp;() const                   Take address of const T&lt;br /&gt;&lt;br /&gt;using the this keyword seems problematic meaning I can't do any assignments like:&lt;br /&gt;const Cobject *tempobj = new Cobject(obj); //where obj the address using the copy constructor&lt;br /&gt;&lt;br /&gt;this=tempobj;&lt;br /&gt;&lt;br /&gt;which would be like the non const version of this signature. The next thing is to build a class which will perform all of the collisions and model the Body concept provided by TBB.&lt;br /&gt;&lt;br /&gt;Additionally there is another problem with the grain size using the number of objects is pointless as the table is not sorted. This means that the range of all objects iterated over will have to be:&lt;br /&gt;&lt;br /&gt;Max hash key - Min hash key&lt;br /&gt;&lt;br /&gt;Meaning that the grain size will also change. Additionally to address the lack of working set overlap adding a certain % of the total range to the maximum and minimum (to a absolute minimum of 0) in order to increase the range is also possible. This should reduce collision misses hopefully.&lt;br /&gt;&lt;br /&gt;The problem with this approach is its possible that there will be a stupidly high number of hash map accesses most of them which may return no results as we iterate from the lower end of the range to the top end.&lt;br /&gt;To a degree the threading approach is falling apart majorly due to a mix of uncertainty about how the library works and oversight. Already with the reading to and from the parallel hash map slows the application significantly. As well with the amount of memory allocation and destruction that is being done per frame as soon as the collision helper is implemented the application will simply grind to a halt. Each object needs to be rehashed per frame in order to preserve the spatial locality for each object.&lt;br /&gt;If this application is completed there is a high chance there will be no time for optimisation of any kind due to the amount of time it is taking me to model concepts that are required.&lt;br /&gt;&lt;br /&gt;Additionally its still uncertain about how the threading system will be synchronised with the main application thread.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8337032715910611352?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8337032715910611352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8337032715910611352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8337032715910611352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8337032715910611352'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/copy-constructable.html' title='Copy Constructable'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-329470224311854597</id><published>2009-03-30T17:35:00.005+01:00</published><updated>2009-03-30T17:52:58.226+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><category scheme='http://www.blogger.com/atom/ns#' term='leakage'/><title type='text'>Leakage</title><content type='html'>After somehow managing to model the basic Copy Constructor method the hash map quickly jumped on this and started using it causing a memory leak where &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;GLU&lt;/span&gt;&lt;/span&gt; quadratic objects are used but not destroyed (was mainly because the appropriate &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;OpenGL&lt;/span&gt; function was not used but became more &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;noticeable&lt;/span&gt; then).&lt;br /&gt;Deleting the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;GLU&lt;/span&gt;&lt;/span&gt; object in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;destructor&lt;/span&gt;&lt;/span&gt; using the appropriate &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;OpenGL&lt;/span&gt;&lt;/span&gt; function causes stack corruption because its possible that the object was copied from another causing more problems. Thus copy constructable objects cannot have the model pointer handled to them. Another fix might be to indicate internally that the object is a copy and thus skip erasing the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;GLU&lt;/span&gt;&lt;/span&gt; object.&lt;br /&gt;&lt;br /&gt;Currently if the object is created with the copy constructable method then the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;GLU&lt;/span&gt;&lt;/span&gt; pointer is &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;nulled&lt;/span&gt;&lt;/span&gt;. Of course this may cascade into the list &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;implementation&lt;/span&gt; and I'll &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;definitely&lt;/span&gt; need to indicate if objects are copies or not.&lt;br /&gt;&lt;br /&gt;At the moment the current problem is an illegal indirection on the list iterator which will need to be looked at. After this the objects will read back the position and direction of their object in the hash map as replacing the entire class with the hash map one erases the pointer to the object.&lt;br /&gt;&lt;br /&gt;Either way this is really the first time I &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;actually&lt;/span&gt; fixed a memory leak instead of just &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;panicking&lt;/span&gt; and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_11"&gt;hitting&lt;/span&gt; rebuild all hoping the problem will go away.&lt;br /&gt;&lt;br /&gt;Edit:&lt;br /&gt;Because of the current problems with the copy constructable and the stack frame I will need to abstract the representitive object to the Object Manager in order to preserve the stack frame for each copied object. Effectively Object classes will become empty shells but this will also lower memory usage slightly.&lt;br /&gt;The modularity of my code is also coming into question.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-329470224311854597?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/329470224311854597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=329470224311854597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/329470224311854597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/329470224311854597'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/leakage.html' title='Leakage'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4262041025934278862</id><published>2009-03-30T14:56:00.003+01:00</published><updated>2009-03-30T14:59:23.433+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='results'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Shooting off Target</title><content type='html'>If what I've theorised about how &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TBB&lt;/span&gt; splits working sets using the range concepts it is highly possible that spatially close objects will be separated from each other. Thus they will not be collision tested.&lt;br /&gt;This causes a problem in that collisions could be missed because working sets for threads do not overlap. A fix to this might be when splitting a working set to add a certain amount of the grain size to the maximum and subtract the same value from the minimum.&lt;br /&gt;This would be quite a hack increasing the chance that threads would try and access the same elements of the hash table but would provide a more accurate result.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4262041025934278862?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4262041025934278862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4262041025934278862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4262041025934278862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4262041025934278862'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/shooting-off-target.html' title='Shooting off Target'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8015418772035549830</id><published>2009-03-27T17:05:00.005Z</published><updated>2009-03-27T17:27:37.398Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='week 2'/><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='Working set'/><category scheme='http://www.blogger.com/atom/ns#' term='over spill already'/><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel Application week 2</title><content type='html'>&lt;strong&gt;&lt;u&gt;To Do List&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Parallel hash table implemented with objects being placed in the table &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;pre&lt;/span&gt;&lt;/span&gt;-graphics frame and then read back after being collision tested at the end of the frame possibly before rendering or after depending on the synchronisation method chosen&lt;/li&gt;&lt;li&gt;Working set system implemented if applicable &lt;/li&gt;&lt;li&gt;Object to bound collision implemented in parallel.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Overflow tasks&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Hash table key theorised&lt;/li&gt;&lt;li&gt;Initial synchronisation concept&lt;/li&gt;&lt;li&gt;Working set initial thoughts&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Removed tasks&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Decide what level to add the copyable and splittable constructors to the Object manager (possible copyable at the object level and Splittable at the object manager level)&lt;/li&gt;&lt;li&gt;Change the level of collision detection response so instead of the object manager calling a single function and iterating through testing all the objects, the collision test function then funnels sets of objects down into a function that will call the collision routine&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It is now known that the helper and object classes will need to model the concepts defined by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TBB&lt;/span&gt;&lt;/span&gt;. And with the level of collision detection response the functions do not need changed simply altering the current functions to indicate they are serial is more than enough.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Hash table key theorised (First choice Key: ((X ^ ID)+(Y ^ ~ID) + (Z ^ ID))=Hash key int) Signed/unsigned problems may become apparent&lt;/li&gt;&lt;li&gt;Objects layered into a hash table but not read back yet.&lt;/li&gt;&lt;li&gt;Working set initial thoughts&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Currently there are some major problems with the concurrent hash table definition that are throwing warnings from the template library. Because of these reasons I can only speculate that objects are being hashes correctly based on the fact that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;accessor&lt;/span&gt;&lt;/span&gt; is never empty after hashing an object. The only reason I can think of is that currently the object class does not model the copy constructable concept and because of the use of pseudo-signatures I'm really no closer to understanding how to implement the concept correctly. The example using the concurrent hash map hashes strings to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ints&lt;/span&gt;&lt;/span&gt; so I have to assume that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;STL&lt;/span&gt;&lt;/span&gt; string class models the copy constructable concept.&lt;/p&gt;&lt;p&gt;With the working sets from what I can make out of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;TBB&lt;/span&gt;&lt;/span&gt; is that after giving it a fixed range (max hash key no to min hash key no) it will split the range until it is less than or the same size as the grain size. Then a thread pool approach will be used to assign tasks to a number of worker threads. This means that the grain size is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;important&lt;/span&gt; thus with a problem domain of 3000 objects:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Grain size 3000 gives 1 working set&lt;/li&gt;&lt;li&gt;Grain size 1500 gives 2 &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;working&lt;/span&gt; sets&lt;/li&gt;&lt;li&gt;Grain size 750 gives 4 working sets&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;That is if I correctly understand the concepts explained by the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;TBB&lt;/span&gt;&lt;/span&gt; documentation and additionally it &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;recommends&lt;/span&gt; that there are more working sets than threads. Because of this with the assumed one thread per physical CPU for the lab computers a grain size of 750 would be ideal.&lt;/p&gt;&lt;p&gt;The current big &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;glaring&lt;/span&gt; problem is that objects in one working set cannot overlap with any from another at the moment if splitting the problem domain to the working set as I understand.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Overflow into next week&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Reading back from the hash table once fixed&lt;/li&gt;&lt;li&gt;Object to bound collision&lt;/li&gt;&lt;li&gt;Synchronisation concept&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Adding object to bound collisions seems like it should be quite easy in that before each reference object undergoes testing it will be tested once for collision with the boundaries.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Next Weeks Tasks&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Concurrency implemented &lt;/li&gt;&lt;li&gt;Object to Object Collisions in parallel &lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Concurrency is forced via the shared concurrent hash map currently.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Write up status&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Currently I've got the first draft of my literature review off to my technical supervisor for checking and within the next week I should have started the methodology section.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8015418772035549830?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8015418772035549830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8015418772035549830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8015418772035549830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8015418772035549830'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/parallel-application-week-2.html' title='Parallel Application week 2'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6442779746694990166</id><published>2009-03-26T17:49:00.005Z</published><updated>2009-03-26T18:07:23.872Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Refined hash key</title><content type='html'>I just integrated the object manager into the hash key tester and reran the key for all the objects within a single object manager. And then counted the duplicates the same way. Before the hash key is calculated objects are moved using a delta T value of 3.0f.&lt;br /&gt;&lt;br /&gt;IDs from 1-3000&lt;br /&gt;X,Y,Z position as ((-BOUNDSSIZE/2)+(rand()%(int)BOUNDSSIZE))&lt;br /&gt;&lt;br /&gt;Thus I need to recheck the hash key metrics from the last post using actual values that could turn up in the program.&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ^ ~ID) + (Z &amp;amp; ID))=Hash key int&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 7290&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ^ ~ID) + (Z ^ ID))=Hash key int&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 1020&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) + (Z &amp;amp; ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 6194&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 5636&lt;br /&gt;&lt;br /&gt;((X ^ ~ID)+(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 5674&lt;br /&gt;&lt;br /&gt;((X ^ ID)-(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 7844&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) -(Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 7822&lt;br /&gt;&lt;br /&gt;(((X ^ ID) ^ (Y ~ID) )-(Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 12548&lt;br /&gt;&lt;br /&gt;(((X ^ ID) ^ (Y ~ID) ) ^ (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 19150&lt;br /&gt;&lt;br /&gt;(((X ^ ID) + ~(Y ~ID) ) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Real World Duplicates: 7844&lt;br /&gt;&lt;br /&gt;From the new estimates using real values that the program could possibly have now:&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ^ ~ID) + (Z ^ ID))=Hash key int&lt;br /&gt;&lt;br /&gt;Seems like the key that will produce the lowest number of duplicate hashes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6442779746694990166?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6442779746694990166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6442779746694990166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6442779746694990166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6442779746694990166'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/refined-hash-key.html' title='Refined hash key'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7134766845101662321</id><published>2009-03-26T13:28:00.012Z</published><updated>2009-03-26T18:23:48.218Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Hash key a result</title><content type='html'>Simply created, counted using a nested loop discarding any comparisons with the object itself (means duplicates will occasionally be already counted, IE object ID 1 having the same hash as object ID 300 will count one as well as the reverse comparison).&lt;br /&gt;3000 Hashed objects each time. Does not take into account fixing duplicate keys. Because of this there will be some quite high numbers but because all are counted a lower duplicates number indicates a more unique hash. If theres somthing wrong somwhere please say.&lt;br /&gt;&lt;br /&gt;defining X, Y, Z as (-1/2 bound size + rand()%bound size)&gt;&gt;1)&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ^ ~ID) + (Z &amp;amp; ID))=Hash key int&lt;br /&gt;&lt;br /&gt;Duplicates: 2844&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ^ ~ID) + (Z ^ ID))=Hash key int&lt;br /&gt;&lt;br /&gt;Duplicates: 3018&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) + (Z &amp;amp; ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 239176&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 1414&lt;br /&gt;&lt;br /&gt;((X ^ ~ID)+(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 20124&lt;br /&gt;&lt;br /&gt;((X ^ ID)-(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 1724&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) -(Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 235230&lt;br /&gt;&lt;br /&gt;(((X ^ ID) ^ (Y ~ID) )-(Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 1630&lt;br /&gt;&lt;br /&gt;(((X ^ ID) ^ (Y ~ID) ) ^ (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 301560&lt;br /&gt;&lt;br /&gt;(((X ^ ID) + ~(Y ~ID) ) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 1724&lt;br /&gt;&lt;br /&gt;Current Best bet:&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ~ID) + (Z &amp;amp; ~ID))=Hash key int (Y value is bitwise ORed with the Inverted ID)&lt;br /&gt;&lt;br /&gt;Duplicates: 1414&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Additional&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;I'm also currently considering changing the recorded collision numbers from number of collisions &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;occurred&lt;/span&gt; to number of collisions tested.&lt;br /&gt;It would be ideal have both to give a hit/miss ratio for both applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7134766845101662321?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7134766845101662321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7134766845101662321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7134766845101662321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7134766845101662321'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/hash-key-result.html' title='Hash key a result'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2959834618795221064</id><published>2009-03-26T13:01:00.003Z</published><updated>2009-03-26T13:11:21.966Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Hash keyed?</title><content type='html'>New Idea for the hash key:&lt;br /&gt;&lt;br /&gt;((X ^ ID)+(Y ^ ~ID) + (Z &amp;amp; ID))=Hash key int (or unsigned int)&lt;br /&gt;&lt;br /&gt;For samples where X,Y &amp;amp; Z equal 5&lt;br /&gt;With sample IDs of: 30, 128 &amp;amp; 200&lt;br /&gt;&lt;br /&gt;Object ID 30 Hashes to 257&lt;br /&gt;Object ID 128 Hashes to 255&lt;br /&gt;Object ID 200 Hashes to 255 (will be handled and incremented to 256)&lt;br /&gt;&lt;br /&gt;I'll build a quick test application that hashes objects ID from 1 to 3000 at random positions and check the output.&lt;br /&gt;&lt;br /&gt;Apart from that I'm currently having trouble with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;TBB&lt;/span&gt; libraries its currently throwing a warning about a conversion from size_t to unsigned int which is problematic but the only explanation I can find is either something in one of the other names spaces is overwriting the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TBB&lt;/span&gt; definition of size_t or really I have no idea of how the templates work.&lt;br /&gt;At this rate it is going to be hard enough making the Objects and the collision helper class model the Pseudo signatures without the template library throwing warnings.&lt;br /&gt;&lt;br /&gt;Currently it seems to work but its possible that due to the conversion warning that memory is either being allocated (all the warnings are library internal with the table memory allocation) incorrectly which might cause a memory leak or some more interesting undefined behaviour.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2959834618795221064?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2959834618795221064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2959834618795221064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2959834618795221064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2959834618795221064'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/hash-keyed.html' title='Hash keyed?'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1398581837279860588</id><published>2009-03-24T15:32:00.012Z</published><updated>2009-03-24T16:19:23.324Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='week 2'/><category scheme='http://www.blogger.com/atom/ns#' term='Issues'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Pesduo-Signatures Crash course</title><content type='html'>Apart from learning what Pseudo-Signatures are when it comes to using template libraries I've had another think about the hash key to be used for the parallel application.&lt;br /&gt;&lt;br /&gt;Fourth Iteration:&lt;br /&gt;&lt;br /&gt;((X+Y+Z)&amp;#60;&amp;#60;ID) &amp;#124; Object Memory Location = Hash key int&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Well this was totally out there in terms of thought and planning and it could really give some crazy numbers.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Fifth Iteration:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;(X+Y+Z) ^ ID = Hash key int&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Using bitwise logic may provide a better number of keys with each ID being unchanging and object unique.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;But still perhaps using an XOR may not be best as the following values were found for considering the hash key as a 16 bit int:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Object positions (X+Y+Z)=12&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Object IDs: 3000, 1758 (Maximum value and random value)&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Object 3000 hashes to 2996&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Object 1758 hashes to 978&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;This means that the working set range for the parallel hash table might be huge but the bitwise operation seems to provide better values perhaps an AND may give better results. Inverting either of the values would possibly give a large number. &lt;/div&gt;&lt;br /&gt;&lt;div&gt;Perhaps part of the problem is that I constantly consider X+Y+Z as a single entity and might need to perform a bitwise operator on them before adding or subtracting them from each other.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Apart from the problems with this I've started implementing the parallel hash table into the object manager first of all creating the structure that describes how to hash objects to int keys and key comparisons.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Current Template for the hash map:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;typedef tbb::concurrent_hash_map &amp;#60; cobject,int,colhashkey&amp;#62 CollisionHashMap;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;In order to obtain the total range that the hash map spans as objects are layered into the table it is possibly to record the maximum and minimum has values which can then be passed onto TBB as the maximums and minimums of the overall blocked range.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;From what I can understand now the blocked range will be split until it mirrors the grain size set for the application meaning that starting at the lower end of a split range and iterating towards the end of the range would provide a working set without defining the middle of the working set. the problem then is defining the grain size. Chances are that TBB works on the one thread per physical CPU theory meaning that with this example a 1500 grain size will split the problem domain directly in two. As the TBB documentation says thought to play around with the grain size in order to find whats correct for your application.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The next major problem after defining the hash key is to model a collision function that will embody all the concepts for a parallel for template.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;For now I'm going to try and finish more of the literature review as usual its dragging on and on.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1398581837279860588?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1398581837279860588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1398581837279860588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1398581837279860588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1398581837279860588'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/pesduo-signatures-crash-course.html' title='Pesduo-Signatures Crash course'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2560937398118124279</id><published>2009-03-20T17:25:00.004Z</published><updated>2009-03-20T17:41:17.896Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Amdhal&apos;s Law'/><category scheme='http://www.blogger.com/atom/ns#' term='over spill already'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='additional thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><category scheme='http://www.blogger.com/atom/ns#' term='Implientation'/><title type='text'>Week 1 Update</title><content type='html'>Done so Far:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hash key basic theorising&lt;/li&gt;&lt;li&gt;Concurrency theorising&lt;/li&gt;&lt;li&gt;Serial Application strip down&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Still needing done:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Working set initial thoughts&lt;/li&gt;&lt;li&gt;Synchronisation initial concept&lt;/li&gt;&lt;li&gt;Adding copy and split constructors to the serial application classes&lt;/li&gt;&lt;li&gt;Changing the level of collision detection response (Possibly not needed)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Hash key&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Looking at the hash key yesterday threw up some major problems where several objects could hash to the same value, this really needs some more thought into it before starting to implement seriously.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Concurrency&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Because of the differing types of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;accessors&lt;/span&gt; that are used to access the parallel hash table it is possible to start off using a read only &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;accessor&lt;/span&gt; and then escalate it to that of a read and write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;accessor&lt;/span&gt;. With the read and write &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;accessor&lt;/span&gt; it means that any other thread trying to access that element of the table will be blocked.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Serial application strip down&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Removed the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;BSP&lt;/span&gt; system and altered the Object Manager collision calls to indicate that they are serial.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Working set initial thoughts&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;If all of the objects can be hashed uniquely into the parallel hash table then a centre of a working set can be chosen and given a range over which to test objects with spatial locality to the centre. The problem is then the number of working sets and how to chose the centre of the working set. With 3000 objects layered into the hash table there is the additional problem for making sure each of them is collision tested.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Synchronisation initial concept&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Realistically for benchmarking the application will need to run in Lock Step so that at the end of a graphical frame the system waits for the collision system to finish parallel processing all of the working sets. This could be achieved using a lock or semaphore of some sort and the main thread would wait until it has been signaled in order to read back information from the parallel hash table ready for the next frame.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Copy and Splittable constructors&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Currently it could be likely that these are not needed to be implemented within any of the existing classes instead they would be applied to a helper class that would process a working set of course this is thinking in a purely serial manner thus may not be effective.&lt;/p&gt;&lt;p&gt;No matter what a few of these initial &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;theories&lt;/span&gt; will continue over into week 2.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2560937398118124279?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2560937398118124279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2560937398118124279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2560937398118124279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2560937398118124279'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/week-1-update.html' title='Week 1 Update'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1737156680294831814</id><published>2009-03-19T18:13:00.007Z</published><updated>2009-03-19T18:26:50.401Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='viability'/><category scheme='http://www.blogger.com/atom/ns#' term='woes'/><category scheme='http://www.blogger.com/atom/ns#' term='Hash key'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Hash Keys</title><content type='html'>I just attempted to build the hash key for the parallel hash table, based on objects position in 3D space.&lt;br /&gt;Initial Thought:&lt;br /&gt;&lt;br /&gt;                       (X+Y+Z)=Hash key int&lt;br /&gt;&lt;br /&gt;Problems:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Negative values may also give the same hash values as positive ones&lt;/li&gt;&lt;li&gt;Possibility that different combinations give the same hash value&lt;/li&gt;&lt;li&gt;Possible round up errors&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Second Iteration:&lt;/p&gt;&lt;p&gt;                            (X+Y+Z)/ID=Hash key int&lt;/p&gt;&lt;p&gt;Problems:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Gives a float value that is extremely small&lt;/li&gt;&lt;li&gt;Would need to bit shift significantly to find a working integer&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Third Iteration:&lt;/p&gt;&lt;p&gt;                         (X+Y+Z)*ID=Hash key int&lt;/p&gt;&lt;p&gt;Problems:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Same as the first iteration just the numbers come out bigger&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So from there this seems like it may take a lot more time to find a unique hash key and because of how uniform all of the objects are the Position and ID are about the only two things that are unique to an object and each object has.&lt;/p&gt;&lt;p&gt;Additional ideas could be to use the address of the pointer to the GLU object that represents the object or the time that the hashing action occurred.&lt;/p&gt;&lt;p&gt;Either way this has the possibility of dragging on far longer and causing all sorts of problems if I don't seek some advice on the subject. As well as this having the possibility to delay things greatly and combined with the estimated problems obtaining concurrency its possible that the application will have to make an accuracy concession.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1737156680294831814?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1737156680294831814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1737156680294831814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1737156680294831814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1737156680294831814'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/hash-keys.html' title='Hash Keys'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-425658322579157450</id><published>2009-03-17T16:38:00.003Z</published><updated>2009-03-17T17:02:48.350Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='Working set'/><category scheme='http://www.blogger.com/atom/ns#' term='to do'/><category scheme='http://www.blogger.com/atom/ns#' term='Pillars of concurrenct'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Parallel Application start</title><content type='html'>Currently I've just stripped out all of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; system and renamed the collision methods to indicate that they are serial.&lt;br /&gt;&lt;br /&gt;Its still slightly uncertain if the object and object manager classes will need to be converted to accommodate some of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TBB&lt;/span&gt; concepts. But if not then its possible that a few helper classes could be created in order to be used by the task scheduler included in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;TBB&lt;/span&gt;.&lt;br /&gt;From the initial concept it collision would be performed like so:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Pre&lt;/span&gt; collision test&lt;/li&gt;&lt;li&gt;Layer Objects into parallel hash table using hashing function&lt;/li&gt;&lt;li&gt;Split number to obtain a number of blocked ranges (basically the number of working sets)&lt;/li&gt;&lt;li&gt;Select the centre of each working set (in a linear hash table objects spatially close to each other will be layered on either side of a central object)&lt;/li&gt;&lt;li&gt;Load blocked ranges and working set centres into parallel processing instances&lt;/li&gt;&lt;li&gt;Process in  parallel&lt;/li&gt;&lt;li&gt;Read back from the parallel hash table into each object (due to memory accesses and how objects are stored this may not be required as object may still be linked back into the linked list, if the read back takes far too much time it may be feasible to force using the addresses in memory)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If each object had no effect on any other then it would be feasible to choose working sets and split them arbitrarily but because of this we need to control how they are split and where the data starts for each this brings in the following problems:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Culling collision numbers via spatial locality in a different way as this may deviate from the proposal to process all collisions but may still be feasible because of the greater thread throughput.&lt;/li&gt;&lt;li&gt;Concurrency on the parallel hash table&lt;/li&gt;&lt;li&gt;Splitting the object manager or the object manager containing a number of splittable collision processing classes?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So far the only one that can be answered at this time is hash table concurrency.&lt;/p&gt;&lt;p&gt;Access to a parallel hash table requires an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;accessor&lt;/span&gt; of which there are two types:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;accessor&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;accessor&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;accessor&lt;/span&gt; type defines an access into the hash table that locks that element so that no other table look up can access that element blocking until the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;accessor&lt;/span&gt; has finished, basically giving write access to the table. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;accessor&lt;/span&gt; however only represents read access from the table so if you consider the serial object to object function you can set read only access until you require to write to data.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Get &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;const&lt;/span&gt;_&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;accessors&lt;/span&gt; to both the test and reference object&lt;/li&gt;&lt;li&gt;Perform collision test&lt;/li&gt;&lt;li&gt;Collision &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_14"&gt;occurs&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Obtain &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;accessors&lt;/span&gt; to test and reference object&lt;/li&gt;&lt;li&gt;Perform collision response&lt;/li&gt;&lt;li&gt;release both &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;accessors&lt;/span&gt;&lt;/li&gt;&lt;li&gt;release test object &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;accessor&lt;/span&gt;&lt;/li&gt;&lt;li&gt;repeat over blocked range&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So its possible that the hash table itself will force concurrency over the reading and writing meaning the code is not lock free but it &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_18"&gt;definitely&lt;/span&gt; will be minimised.&lt;/p&gt;&lt;p&gt;So from there the only explicit locking may be that to synchronise the collision &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_19"&gt;threads&lt;/span&gt; with the main application.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-425658322579157450?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/425658322579157450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=425658322579157450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/425658322579157450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/425658322579157450'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/parallel-application-start.html' title='Parallel Application start'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3092928112306299737</id><published>2009-03-13T18:28:00.002Z</published><updated>2009-03-13T19:49:12.007Z</updated><title type='text'>Parallel Application</title><content type='html'>Firstly with the parallel application it seems to be a functional parallelism approach as only the collision testing will be paralleled. Only separating the collision detection from the main application thread will mean that the collision detection is still processes serially giving little increase in performance. If collisions were still being culled based on the BSP volume that they are in then its possible that this would provide far better performance but for the parallel application all collisions will be processed in order to provide a more accurate simulation. With this functional parallelism model processing a possible n^(n-1) collisions in a serial manner is the problem so it would be ideal to break down the collision function thread into a smaller granularity data driven model.&lt;br /&gt;&lt;br /&gt;From this the problem is then splitting each object that collides between the worker threads. With the serial application the BSP system culls collisions that the camera cannot theoretically see (for all intents an purpose the serial application is only estimating a possible splitting of level geometry) yet if we consider the fact that a set of objects cannot collide with others on the opposite side of the room then their spatial locality could be used to construct working sets of objects. With this there is the possibility for overlap between working sets, the other problem is with the number of working sets if we have 200 objects then can we feasibly have 200 working sets, more likely than not that will not be possible and overlap between the working sets may be quite high. Using the idea of spatial locality in order to define working sets means the less working sets the greater the size of each set in order to make sure all objects are collision tested.&lt;br /&gt;&lt;br /&gt;With these working sets each worker thread can test each object for collision with the bounding area before testing the object with all of the other objects.&lt;br /&gt;The problem then is concurrency between overlapping objects in working sets and synchronisation with the main game thread.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Initial Plan&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;With this in mind its possible to estimate that using a parallel read serial write hash table keyed with the spatial locality could be used to store all the objects pre-collision tests. From there a parallel for loop that operates over a blocked range of the hash table can be used to process all collisions based on a central object of the working set. Because of the hash table objects that are spatially close to each other will be estimated near each other in a linear hash table (current thought may need to be changed depending on the key calculation).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Parallel Application main sections&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Stripping down the serial application, removing the BSP system&lt;/li&gt;&lt;li&gt;Converting the classes within the program to be compatible with the TBB splittable and copyable concepts&lt;/li&gt;&lt;li&gt;Threading system&lt;/li&gt;&lt;li&gt;Working set creation&lt;/li&gt;&lt;li&gt;Synchronisation with the main application thread (mostly likely will run in lock step)&lt;/li&gt;&lt;li&gt;Concurrency&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Again this application development is expected to last at least four weeks leaving two weeks at the end of April to write the dissertation and in the last week of April finish up the AGT AI coursework.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 1&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Serial application strip down&lt;/li&gt;&lt;li&gt;Decide what level to add the copyable and splittable constructors to the Object manager (possible copyable at the object level and Splittable at the object manager level)&lt;/li&gt;&lt;li&gt;Initial Concurrency concept&lt;/li&gt;&lt;li&gt;Initial synchronisation concept&lt;/li&gt;&lt;li&gt;Working set initial thoughts&lt;/li&gt;&lt;li&gt;Hash table key theorised&lt;/li&gt;&lt;li&gt;Change the level of collision detection response so instead of the object manager calling a single function and iterating through testing all the objects, the collision test function then funnels sets of objects down into a function that will call the collision routine&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 2&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Parallel hash table implemented with objects being placed in the table pre-graphics frame and then read back after being collision tested at the end of the frame possibly before rendering or after depending on the synchronisation method chosen&lt;/li&gt;&lt;li&gt;Working set system implemented if applicable&lt;/li&gt;&lt;li&gt;Object to bound collision implemented in parallel.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 3&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Concurrency implemented&lt;/li&gt;&lt;li&gt;Object to Object Collisions in parallel&lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 4&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Synchronisation with the main thread&lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Literature review&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Currently the literature review is still running on as I'm lacking a few bits of information on current implementations. After finishing up discussing the current generation of consoles hardware, it will move onto multi threaded pc software considering game engines as the main source of threaded software. After that the analyses of past parallel collision projects and proof of the comparison will be done.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3092928112306299737?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3092928112306299737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3092928112306299737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3092928112306299737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3092928112306299737'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/parallel-application.html' title='Parallel Application'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4340916505683886982</id><published>2009-03-13T15:42:00.002Z</published><updated>2009-03-13T15:49:06.294Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='viability'/><category scheme='http://www.blogger.com/atom/ns#' term='deliverables'/><category scheme='http://www.blogger.com/atom/ns#' term='crirque'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Vector of Separation'/><title type='text'>Serial Application Final Concession</title><content type='html'>I've more or less just fixed the frame limiter of the serial application so it is serviceable but not fully accurate (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;timeGetTime&lt;/span&gt;() vs &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;queryPerformanceCounter&lt;/span&gt;()).&lt;br /&gt;The last concession is that the collision with objects and the bounding volume will not use the vector of separation method meaning that when the application starts a number of objects will be in constant collision with the bounding volume. A major part of the application is culling complex collisions in order to speed up the application the simple collisions will have little effect on the final performance and were going to be used as a benchmark. Additionally moving the objects using the time between frames is more important for the parallel application as the main game thread will be separate from the collision threads.&lt;br /&gt;With this concession the parallel application can begin next week. I should have a plan for that by the end of today but current projections are to have the parallel application finished by mid April.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4340916505683886982?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4340916505683886982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4340916505683886982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4340916505683886982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4340916505683886982'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/serial-application-final-concession.html' title='Serial Application Final Concession'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7225784899775813414</id><published>2009-03-11T17:21:00.005Z</published><updated>2009-03-11T17:29:04.938Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='to do'/><title type='text'>Whats left of this weeks to do list</title><content type='html'>&lt;strong&gt;&lt;u&gt;To Do&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Get the vector of separation in for the Object to bounding volume &lt;/li&gt;&lt;li&gt;Get the graphics frame limiter working&lt;/li&gt;&lt;li&gt;Finish literature review first draft&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I'm more or less going to call the AABB collision working ok now that the reference object is centred around the origin and the test object translated to compliment.&lt;/p&gt;&lt;p&gt;Current problems with the frame limiter is mostly with the logic and where to put the last frame time.&lt;/p&gt;&lt;p&gt;Lowering the speed as recommended by my technical supervisor has removed some of the problems of Objects overshooting the collision with the bounding volume and then being stuck in collision limbo. But still if for some reason the applications slows to a crawl because of another system process then its possible everything will end up outside of the bounding volume.&lt;/p&gt;&lt;p&gt;Apart from that one problem it may be worth while even if only the graphics frame limiter to works to use this application and take note that its possible collision numbers reported onto the screen will be offset slightly.&lt;/p&gt;&lt;p&gt;On another note I've been reading &lt;a href="http://www.pcper.com/article.php?aid=532&amp;amp;type=expert&amp;amp;pid=4"&gt;this article&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7225784899775813414?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7225784899775813414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7225784899775813414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7225784899775813414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7225784899775813414'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/whats-left-of-this-weeks-to-do-list.html' title='Whats left of this weeks to do list'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4493932934526471048</id><published>2009-03-11T12:40:00.005Z</published><updated>2009-03-11T13:49:22.608Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='limiters'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Vector of Separation'/><title type='text'>Limiters</title><content type='html'>Today I've been messing around with limiters to limit the number of graphical frames.&lt;br /&gt;&lt;br /&gt;Currently limiting the number of graphical frames is like so:&lt;br /&gt;&lt;br /&gt;1.1 Time difference = Current Time - Time the last frame started&lt;br /&gt;1.2 if Time difference &lt; (MAX FPS X 1000)&lt;br /&gt;1.3 render&lt;br /&gt;1.4 else update last frame time&lt;br /&gt;&lt;br /&gt;Currently it seems the else is never hit so there's a chance that its not actually limiting the frame properly and current editing of the if statement is causing the application to try and force a frame to be rendered in a small amount of time. So this will need looked at.&lt;br /&gt;&lt;br /&gt;This brings three different concepts of frames:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Graphics Frame: how long it takes to render the applications 3D graphics and associated functions, begins before rendering and ends after the frame buffers have been swapped.&lt;/li&gt;&lt;li&gt;Processing Frame: each processing frame is defined as when the application has no windows messages to process thus performs all of the main application code.&lt;/li&gt;&lt;li&gt;Physics Update: how long it takes for an entire windows message loop starting after the previous update and having delta T calculated before the next call.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Currently Limited by the Graphics Frame limiter&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Resetting the number of collisions&lt;/li&gt;&lt;li&gt;Collision testing&lt;/li&gt;&lt;li&gt;Updating on screen metrics every 10 graphics frames&lt;/li&gt;&lt;li&gt;Graphics&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Currently Limited by the time it takes for a single processing frame&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Movement updates based on a delta T value&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Unlimited&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Camera Control&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; allocation, because the movement is based on time and will always update each processing frame the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;BSP&lt;/span&gt; allocations need to be updated constantly&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;After the frame limiters the main problem is the collision response and the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;AABB&lt;/span&gt; algorithm uncertainty.&lt;/p&gt;&lt;p&gt;Currently collision response for object to object collision is that of the previous post although I'm wondering if the separation vector from the reference object to the test object should be normalised and then scaled by both the half widths of both objects (basically the width of one object). Currently with the metrics update it seems that when the a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;BSP&lt;/span&gt; area is activated the number of object to object collisions constantly rise.&lt;/p&gt;&lt;p&gt;The problem is then getting the vector of retraction (if that's the right word) for the bounding volume and objects. I've worked out a couple of different ways to do this but none of them have provided working results when applied to a 3D vector.&lt;/p&gt;&lt;p&gt;Initial Object to Object separation better explained:&lt;/p&gt;&lt;p&gt;Find the vector between the centres of the object and bounding area:&lt;/p&gt;&lt;p&gt;Separation &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;vect&lt;/span&gt; = O(Reference) - O(Test) (Vector subtraction)&lt;/p&gt;&lt;p&gt;For a collision:&lt;/p&gt;&lt;p&gt;Length of Separation &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;vect&lt;/span&gt; &lt; (O(Reference) radius + O(Test) radius)&lt;/p&gt;&lt;p&gt;Here's the uncertain point should the Separation &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;vect&lt;/span&gt; be normalised before being multiplied by the (O(Reference) radius + O(Test) radius) so it scales properly?&lt;/p&gt;&lt;p&gt;Then as already stated:&lt;/p&gt;&lt;p&gt;Move to Separate = Separation &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;vect&lt;/span&gt; X (O(Reference) radius + O(Test) radius)&lt;/p&gt;&lt;p&gt;Then as the first object is the Reference we move the Test object by:&lt;/p&gt;&lt;p&gt;Test object centre + Move to Separate&lt;/p&gt;&lt;p&gt;This will move the test object to a maximum boundary so it is possible that when the Test object becomes the Reference object another collision will occur.&lt;/p&gt;&lt;p&gt;Perhaps the problem is that instead of moving the centre by the Move to Separate vector it should be the inverted direction vector that is moved along (remember basic collision response was to invert the direction vector). The separation vector may not necessarily be the same as the direction vector yet it will guarantee that the objects no not overlap on any axis.&lt;/p&gt;&lt;p&gt;But anyway the next problem is the separation of objects with the limits of the bounding volume.&lt;/p&gt;&lt;p&gt;If you apply most of the Object to Object collisions with the exception of instead of multiplying by (O(Reference) radius + O(Test) radius) you multiply by&lt;/p&gt;&lt;p&gt;1/ (Bound Radius - Object Radius)&lt;/p&gt;&lt;p&gt;Basically we're trying to get:&lt;/p&gt;&lt;p&gt;Length of Separation &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;vect&lt;/span&gt; &lt; (Bound Radius - Object Radius)&lt;/p&gt;&lt;p&gt;So this provides the idea that:&lt;/p&gt;&lt;p&gt;Bound Radius in the X axis- Object Radius in the X axis&lt;/p&gt;&lt;p&gt;Bound Radius in the Y axis- Object Radius in the Y axis&lt;/p&gt;&lt;p&gt;Bound Radius in the Z axis- Object Radius in the Z axis&lt;/p&gt;&lt;p&gt;Gives a vector multiplication along which to scale a normalised vector of separation.&lt;/p&gt;&lt;p&gt;Normalising the vector of separation gives the direction in which to move the object to bring it back inside the bounding area.&lt;/p&gt;&lt;p&gt;The problem with this method is that is scales positions that are within the bounds meaning that the object will not be in a position that could have been along the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;movement&lt;/span&gt; direction. This differing approach is due to the fact that a point on the extremity of the bounding box is unknown and some complex logic might be required in order to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;discern&lt;/span&gt; along which axis the object has exceeded the bound maximum.&lt;/p&gt;&lt;p&gt;Needless to say I'm currently quite confused.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4493932934526471048?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4493932934526471048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4493932934526471048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4493932934526471048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4493932934526471048'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/limiters.html' title='Limiters'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-117552734616762270</id><published>2009-03-10T12:37:00.011Z</published><updated>2009-03-10T16:16:47.380Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><title type='text'>Delta T</title><content type='html'>I've pretty much been putting off calling the serial application done mostly due to the uncertainty about the validity of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;AABB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; algorithm but really I cannot afford much more time messing around with this. The only justification for this procrastination is that the serial application is the base of the parallel application but after looking at the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;TBB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; documentation its clear that I could simply shift into using the inherent timing functions.&lt;br /&gt;&lt;br /&gt;The current thing that I want to know from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;TBB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; is if I can when using the task manager and templates get the actual number of working threads, would be nice to be able to see the number of collision threads to proof the scaling of the system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One of the main problems if the limiting of the movement updates which has been discussed a small amount with my tech supervisor, one approach would be to multiply the movement speed by a delta T value that is calculated from the current time - start of the previous frame.&lt;br /&gt;&lt;br /&gt;Pseudo code looks something like this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.1 Calculate delta T current time -previous frame start time&lt;br /&gt;&lt;br /&gt;1.2 Move based on delta T&lt;br /&gt;&lt;br /&gt;1.3 Update the previous frame start time&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This means that a single frame for the physics system would start after the movement has been performed while a graphics frame would start after the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;pre&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;-frame movement and collision has been done, its uncertain if this would cause any problems apart from the slight increase in complexity. When the frame rate is limited when the maximum number of frames per second is reached the frame time for a physics update will be small and thus move the objects appropriately.&lt;br /&gt;&lt;br /&gt;Because of the movement change the collision response will also need altered to encompass the vector of separation in order to move the two colliding object apart (note to self need a reference for this).&lt;br /&gt;&lt;br /&gt;Basically during the collision detection response the vector of separation would be found using the centre of both objects and then move the object by this vector scaled by the minimum length that allows the objects to not collide and then add it to the position of object 2 as object 1 is translated the reference object.&lt;br /&gt;&lt;br /&gt;Thus:&lt;br /&gt;&lt;br /&gt;Vector of Separation * Minimum Length in order for objects to not collide = Move vector&lt;br /&gt;&lt;br /&gt;and then&lt;br /&gt;&lt;br /&gt;Object 2 Position + Move Vector&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Performing the vector of separation on the object to bounding area collision may be slightly different as care must be taken not to move the object outside the bounding area. Of course this may automatically correct itself within a few frames but it is something that needs looked into.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Current Example of moving by delta T movement where 500 objects are moving at 96 world units per second:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5311565730385270674" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 248px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_Z3KsWqUusj4/SbZ449DAl5I/AAAAAAAAABg/Pim348ydN2Y/s320/serial+app+delta+T+based+movment+inadequate+collision+response.JPG" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;Each of the objects outside the bounding area are simply vibrating back and forward because of the inadequate collision response. If this doesn't work I can &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;roll &lt;/span&gt;back to the previous version backed up today. The start of next week would be the best time to have a final verdict.&lt;br /&gt;&lt;br /&gt;Notes if I roll back to the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;previous&lt;/span&gt; version:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Stack overflow problem with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;BSP&lt;/span&gt;&lt;/span&gt; system if the area to be split is less than the minimum area. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;BSP&lt;/span&gt;&lt;/span&gt; termination was based upon == when it should be &lt;=&lt;/li&gt;&lt;li&gt;Additional comments for the block of temp variables used for updating the screen metrics and timers&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Extra&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;If the collision system is not fixed to use the vector of separation then the averaged amount over 10 frames will always be quite high as collisions are sampled each time the windows message loop has nothing to process.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-117552734616762270?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/117552734616762270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=117552734616762270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/117552734616762270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/117552734616762270'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/delta-t.html' title='Delta T'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_Z3KsWqUusj4/SbZ449DAl5I/AAAAAAAAABg/Pim348ydN2Y/s72-c/serial+app+delta+T+based+movment+inadequate+collision+response.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3831650473467812125</id><published>2009-03-05T14:25:00.006Z</published><updated>2009-03-22T00:54:04.818Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Amdhal&apos;s Law'/><category scheme='http://www.blogger.com/atom/ns#' term='Lit Review'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><title type='text'>Serial Application Finale?</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Serial Application Main Sections &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Object system&lt;/li&gt;&lt;li&gt;BSP System&lt;/li&gt;&lt;li&gt;Collision&lt;/li&gt;&lt;li&gt;Graphics System&lt;/li&gt;&lt;li&gt;Camera Control&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Object system achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Basic object Storage Including position, Direction, Colour, ID and BSP allocation volume&lt;/li&gt;&lt;li&gt;Each object has its own pointer to a GLU Quadratic&lt;/li&gt;&lt;li&gt;Object controller system encapsulating all objects in the scenes within a linked list&lt;/li&gt;&lt;li&gt;Object controller controls all Object movement&lt;/li&gt;&lt;li&gt;Object controller performs collision detection with the bounding volume&lt;/li&gt;&lt;li&gt;Object controller system performs the rendering of all objects&lt;/li&gt;&lt;li&gt;AABB collision between Objects &lt;/li&gt;&lt;li&gt;Collision response is simply to reverse the direction of the objects concerned&lt;/li&gt;&lt;li&gt;Collision metrics can be reported from the class&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;BSP system achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Recursive BSP creation and naming&lt;/li&gt;&lt;li&gt;Recursiven BSP destruction&lt;/li&gt;&lt;li&gt;Splits a known area (the bounding area)&lt;/li&gt;&lt;li&gt;Splits until a terminal node contains an area of 12x12x12&lt;/li&gt;&lt;li&gt;Splits in a single axis for each tier of the tree (Rotates X-&gt;Y-&gt;Z)&lt;/li&gt;&lt;li&gt;The splitting plane normal points along the splitting axis in the positive direction&lt;/li&gt;&lt;li&gt;Point on the plane is considered (0,0,0), thus the plane constant d is 0&lt;/li&gt;&lt;li&gt;Because of this point on the plane it is only possible to split the bounding area into eight discreet areas&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Collision achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Bound collision over a fixed area taking input metrics for an object Position, Height, Width and Depth as well as the Bounding area Position, Height, Width and Depth&lt;/li&gt;&lt;li&gt;AABB Collision taking Position, Height, Width and Depth for two objects&lt;/li&gt;&lt;li&gt;With AABB collision the first object is considered the reference object to be tested against&lt;/li&gt;&lt;li&gt;First passed in object is translated to the origin and the second object translated to compliment&lt;/li&gt;&lt;li&gt;AABB Collision needs checked in order to verify it is working correctly&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Graphics archived&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;OpenGL initialisation packed into its own class&lt;/li&gt;&lt;li&gt;Split into pre,post and Frame sections&lt;/li&gt;&lt;li&gt;Bitmap Fonts can be printed out onto screen to display collision metrics&lt;/li&gt;&lt;li&gt;Bounding area complied into a display list for easy usage&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Camera control achieved&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Camera implemented&lt;/li&gt;&lt;li&gt;Camera controls its own look at function&lt;/li&gt;&lt;li&gt;The position of the camera is sampled upon a left mouse click in order to define the current BSP volume&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Class linkages&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP tree obtains the position of each Object by retrieving an iterator to the list contained within the Object Controller. It then sets the BSP area of the object and the next call to the Object Controller updates the colour of each of the objects.&lt;/li&gt;&lt;li&gt;Collision is currently performed per frame &lt;/li&gt;&lt;li&gt;Each class is constructed at run time and destroyed upon application exit&lt;/li&gt;&lt;li&gt;Update of collision metrics averaged over the last 10 frames for object to bound, object to object and total collisions&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Lingering Problems&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Uncertain if the AABB algorithm is correctly working&lt;/li&gt;&lt;li&gt;Main render section not frame limited&lt;/li&gt;&lt;li&gt;Physics update and collision not limited meaning on a machine with a faster CPU the simulation will run faster&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Acceptable losses&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Loss in resolution of BSP tree, collisions are still culled but not as aggressively&lt;/li&gt;&lt;li&gt;The circumstance where the point that the BSP tree is being traversed for is on the plane is undefined and returns an undefined value for the BSP volume&lt;/li&gt;&lt;li&gt;There is nothing to stop unneeded collision testing with objects I.E. object 1 as reference will be tested against object 2 and when object 2 is the reference object it will be checked again with object 1&lt;/li&gt;&lt;li&gt;Because of uncertainty with the state of the benchmarking software the application has not allowed to obtain the theorised speed up for the parallel application and the complexity of the overheads&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Finalised metrics&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Frame Rate capped at 60 frames per second&lt;/li&gt;&lt;li&gt;Collision metrics sampled and averaged every 10 frames&lt;/li&gt;&lt;li&gt;Physics updating only once per second&lt;/li&gt;&lt;li&gt;3000 Objects in the scene at any one time&lt;/li&gt;&lt;li&gt;Objects have a diameter of 5&lt;/li&gt;&lt;li&gt;Objects currently move 0.1 world units per frame&lt;/li&gt;&lt;li&gt;Bounding area being centred around the origin with Height, Width and Depth of 96&lt;/li&gt;&lt;li&gt;Minimum BSP volume being of Height, Width and Depth 12&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Because the parallel application will use the base of this application without the BSP system and with an altered collision system the lingering problems will need to be tackled in order to correctly finish the parallel application.&lt;/p&gt;&lt;p&gt;The few problems with the BSP system have to be left as they are now as currently this section of the project has run out of time.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Initial Parallel application thoughts&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;One of the main things that has been estimated so far is using the idea of one thread per physical processor in order to process all collisions. This would mean the application for a PC with a dual core processor has a total of 3 threads. Additionally in order to reduce any usage of locks it may be possible use a hash table that can be accessed by all of the collision processing threads at the same time.&lt;/p&gt;&lt;p&gt;With this system there will need to be some sort of working sets created thus using a principle of locality as the key to the hash table would allow the threads to access areas of the hash table in parallel when the hash keys are significantly different although its possible this may not be suitable.&lt;/p&gt;&lt;p&gt;For the past few days I have been attempting to write the literature review section of the dissertation, currently it seems like a parallel processing primer describing base ideas and concepts of parallel processing. Still to be discussed is the applications of dedicated hardware parallel processing along with a classification of the current generation if applicable to a few of these models. Additionally before the literature review can move onto the research the current state of threading PC games needs discussed currently the only game engine there there is solid documentation on the threaded rendering system is the Unreal engine.&lt;/p&gt;&lt;p&gt;From there the planned discussion will move onto the current research in these fields and the justification for benchmarking the applications and estimating parallel performance using Amdahl's law and Gustafson's laws.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3831650473467812125?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3831650473467812125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3831650473467812125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3831650473467812125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3831650473467812125'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/03/serial-application-finale.html' title='Serial Application Finale?'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1816944041499683041</id><published>2009-02-26T18:12:00.006Z</published><updated>2009-02-26T18:36:51.351Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='over spill already'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Implientation'/><category scheme='http://www.blogger.com/atom/ns#' term='Fixes'/><title type='text'>Week 4 Current State</title><content type='html'>Currently the application looks like so:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5307170954746045282" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 249px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_Z3KsWqUusj4/Sabb3V_oo2I/AAAAAAAAABI/BBVDJLsWCfw/s320/serial+app+bounding+area+500+objects+all+collisions.JPG" border="0" /&gt;Where red coloured objects are having full collision testing performed on them.&lt;br /&gt;&lt;br /&gt;To get the application to this state there are a few things to note:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BSP&lt;/span&gt; Tree traversal assumes that the point on all planes is (0,0,0) which is of course not true and also limits the possible &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;BSP&lt;/span&gt; areas to four meaning effectively that traversing the tree to a terminal node would give the same result as traversing three tiers of the tree.&lt;/li&gt;&lt;li&gt;For the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;BSP&lt;/span&gt; Tree the point on the plane problem is still undefined and if this occurs the object is assigned a null name for its &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;BSP&lt;/span&gt; volume.&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;BSP&lt;/span&gt; naming fixed by performing a naming pass after building the tree naming the node if it is a terminal node or has children of its own.&lt;/li&gt;&lt;li&gt;Object size needed to be increased to 5.0f in order for some collision to occur.&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;AABB&lt;/span&gt; collision still seems to be inaccurate missing a few collisions.&lt;/li&gt;&lt;li&gt;No frame rate limiter is in place yet&lt;/li&gt;&lt;li&gt;Also there is no minimisation of variable retrieval from classes during render.&lt;/li&gt;&lt;li&gt;There is nothing to stop unneeded collision testing with objects I.E. object 1 as reference will be tested against object 2 and when object 2 is the reference object it will be checked again with object 1&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Because this portion of the project is fast running out of time the reduction in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;BSP&lt;/span&gt; Tree sections is an acceptable loss overall as it was proving extremely hard to define a point on the plane.&lt;/p&gt;&lt;p&gt;Accurate &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;AABB&lt;/span&gt; collisions however is a major point and needs to be fixed, this will probably cause a lot of overrun but because of the lack of learning the threading library that I've had the chance to do the first one to two weeks may be wasted catching up and fixing the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;AABB&lt;/span&gt; algorithm.&lt;/p&gt;&lt;p&gt;The increase of object size is of little concern although it makes it quite hard to spot any missed collisions.&lt;/p&gt;&lt;p&gt;The next step for tomorrow in order to prepare the program to be stripped down for the parallel version would be:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Frame limit rendering&lt;/li&gt;&lt;li&gt;Only sample collision numbers every 10 frames and give an average over those frames&lt;/li&gt;&lt;li&gt;Clean and simplify the windows message loop into Frame,&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Pre&lt;/span&gt;-Frame and Post Frame functions.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Emerging thoughts&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Time Based Movement if the rendering is being limited, as currently a better processor will allow this application to run the simulation faster.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1816944041499683041?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1816944041499683041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1816944041499683041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1816944041499683041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1816944041499683041'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/week-4-current-state.html' title='Week 4 Current State'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Z3KsWqUusj4/Sabb3V_oo2I/AAAAAAAAABI/BBVDJLsWCfw/s72-c/serial+app+bounding+area+500+objects+all+collisions.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8366748204447134504</id><published>2009-02-25T16:44:00.005Z</published><updated>2009-02-25T16:54:38.143Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='4'/><category scheme='http://www.blogger.com/atom/ns#' term='Project'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Fixes'/><title type='text'>Week 4 Major Points</title><content type='html'>Current Major Concerns are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;BSP Tree Traversal&lt;/li&gt;&lt;li&gt;BSP Terminal Node names&lt;/li&gt;&lt;li&gt;Undefined Point on the Plane BSP Tree Traversal problem&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Minor Concerns&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Frame limiter so that only the rendering is limited at ~60fps or so&lt;/li&gt;&lt;li&gt;Number of collisions/objects are sampled every 10 frames&lt;/li&gt;&lt;li&gt;Minimal variable retrieval during render &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Currently the render loop is starting to look like so:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Reset collision counters&lt;/li&gt;&lt;li&gt;Take mouse input for camera position and look at&lt;/li&gt;&lt;li&gt;Update position of all objects&lt;/li&gt;&lt;li&gt;Traverse BSP tree to assign BSP volumes to objects&lt;/li&gt;&lt;li&gt;Objects to bound collision test&lt;/li&gt;&lt;li&gt;Object to object collision test&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Reset OpenGL scene&lt;/li&gt;&lt;li&gt;Render Text to screen displaying collision numbers&lt;/li&gt;&lt;li&gt;Update Camera&lt;/li&gt;&lt;li&gt;Render Bounding area&lt;/li&gt;&lt;li&gt;Render all collide-able objects&lt;/li&gt;&lt;li&gt;Swap frame buffers&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Post frame operations go here&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8366748204447134504?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8366748204447134504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8366748204447134504' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8366748204447134504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8366748204447134504'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/week-4-major-points.html' title='Week 4 Major Points'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-5014171396087745174</id><published>2009-02-20T13:13:00.006Z</published><updated>2009-02-20T15:15:05.131Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BSP'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='collision'/><category scheme='http://www.blogger.com/atom/ns#' term='3'/><title type='text'>Week 3 Serial Application</title><content type='html'>&lt;strong&gt;&lt;u&gt;Week 3 Tasks&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;BSP implementation (if applicable) &lt;/li&gt;&lt;li&gt;Collide-able Objects linked in some way to the BSP system &lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Tasks done&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP implimentation started (recursive tree building and destructrion)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Because of several things this week I've been unable to do much in the way of debugging the AABB algrothim. Currently this is the main area where problems are occouring because of as stated before each object can be in any octet around the origin. A quick fix to this may be to translate one of the objects to the origin (probably the object used as reference) and translating the other object by the same amount from there the test would be more or less the same as that between the bounding volume and each object. &lt;/p&gt;&lt;p&gt;Currently there is a minor problem with the terminal nodes of the BSP tree (child nodes at the bottom of the tree that do not have any other children) being named incorrectly, this is due to how the nodes are named by the recursive algorthim.&lt;/p&gt;&lt;p&gt;Additionally there is a problem with how to traverse the BSP tree.&lt;/p&gt;&lt;p&gt;Currently the algorthim to be used is: N . P + d = 0&lt;/p&gt;&lt;p&gt;Where N is the normal to the plane, P the point to be tested and d is a constant calculated using a point on the plane.&lt;/p&gt;&lt;p&gt;When the answer is 0 then the point is on the plane, &gt;0 point is in the positive half-space, &lt;0 point is in negative half-space. &lt;/p&gt;Which means d can be calculated using -N . P0 = d&lt;/p&gt;&lt;p&gt;Where P0 is a known point on the plane&lt;/p&gt;&lt;p&gt;This is where the problem lies it would be beneficial to calculate d at the tree compile time,where to obtain the point P0.&lt;/p&gt;&lt;p&gt;P0 could be represented as a point defined by the current height,width and depth of the BSP volume but this would only work if the bounding box had its lower left hand corner at the origin. Because the bounding volume is centered round the origin this becomes more complex but it is possible that as with the AABB algorithm simple translating the lower left if the bounding volume to the origin may fix this problem. If it doesn't then there is a problem defining a point on the plane for calculating d.&lt;/p&gt;&lt;p&gt;Along with this its questionable that the BSP tree is being used correctly as per frame each object will need to be used to traverse the tree in order to obtain the BSP volume it is in.&lt;/p&gt;&lt;p&gt;In a previous post there was some pseudo-code for the object to object collision on second thought it may be best if a list of colliding objects can be built and somehow can be linked back to the master object list but this may not be possible without some complex pointer usage.&lt;/p&gt;&lt;p&gt;The current way to set the BSP area would be to use the position of the camera and when a mouse button is pressed check that the camera is within the bounding area and then traverse the BSP tree to find which volume to consider the active area.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 4 tasks&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP tree Traversal&lt;/li&gt;&lt;li&gt;AABB algorithm debugged and working&lt;/li&gt;&lt;li&gt;Frame limiter&lt;/li&gt;&lt;li&gt;Possible on screen display of frame rate and collision numbers print out (object system will need modified to return these metrics)&lt;/li&gt;&lt;li&gt;Collision for objects in the current BSP volume working&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Benchmarking has been removed at the moment due to the uncertainty with the benchmarking application that was added as part of the project proposal. There is trial versions of the software but I'd rather not waste the 30 days trial if I do not have both the applications ready to be used.&lt;/p&gt;&lt;p&gt;After this serial application is finished a large amount of the base application can be removed and used for the parallel application as only the collision section of the system will be parallel. Chances are that mainly the BSP tree system and some minor changes to the object controller will be made.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-5014171396087745174?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/5014171396087745174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=5014171396087745174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5014171396087745174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5014171396087745174'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/week-3-serial-application.html' title='Week 3 Serial Application'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2240110177748193770</id><published>2009-02-17T16:07:00.005Z</published><updated>2009-02-17T16:59:14.172Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='BSP'/><category scheme='http://www.blogger.com/atom/ns#' term='deliverables'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><title type='text'>Week 3 BSP</title><content type='html'>I've currently been reading this article on BSP trees from 1995: &lt;a href="http://www.faqs.org/faqs/graphics/bsptree-faq/"&gt;http://www.faqs.org/faqs/graphics/bsptree-faq/&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Inital impimentation ideas&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Splitting a known area of width X height X depth&lt;/li&gt;&lt;li&gt;Planes that split the area will be split each axis in this order X-&gt;Y-&gt;Z so that the first node will split the along the X axis using the plane normal to determine if the object is in the positive or negative half space&lt;/li&gt;&lt;li&gt;Minimum BSP area size of 12 X 12 X 12 meaning that there is a possibility of 9 recursive iterations to split the area appropriately (possible tree of 81 nodes)&lt;/li&gt;&lt;li&gt;Traversing the tree will take in a position which will then be used to traverse the tree to a terminal child node, the name of this child node will be the allocated BSP volume&lt;/li&gt;&lt;li&gt;Objects that are on the plane will be classified using the width ,height and depth of the object dependant on which axis the plane is splitting.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Currently I am considering each Node of the BSP Tree to have the following:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Current split of the bounding area (X,Y,Z)&lt;/li&gt;&lt;li&gt;Normal vector to the plane&lt;/li&gt;&lt;li&gt;Name of this node&lt;/li&gt;&lt;li&gt;State of the plane (Which axis it will be splitting)&lt;/li&gt;&lt;li&gt;Pointer to the two child nodes (if both are null then its a terminal Node)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Current problems&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;How to name each node: numbers, letters?&lt;/li&gt;&lt;li&gt;How to destroy the BSP tree when the application shuts down safely?&lt;/li&gt;&lt;li&gt;Slightly confused on where to start splitting at the maximum of the boundary or 1/2 way in&lt;/li&gt;&lt;li&gt;Is my plane splitting approach appropriate? Because there is a possibility that there will be no actual plane equation and it will be built from the current split positions for each axis and the normal&lt;/li&gt;&lt;li&gt;Traverses will always be the full tree (minimal problem but its something to think about)&lt;/li&gt;&lt;li&gt;How do I concurrently split nodes as in how can I build nodes on the positive side of the tree and the negative tree at the same time?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Currently this week I have lost one day waiting for an engineer to  fix the boiler out at my flat and I will not be able to work on Thursday due to family commitments (but I'll still drag my notebook and such with me). Additionally I'm not feeling 100% so it may be that a minimal amount of debugging will be done on the AABB algorithm this week meaning that it is highly possible I may lose a maximum of two weeks of next month which should be implementation of the threading system. On the bright side it may be possible to use &lt;a href="http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=13"&gt;this tutorial&lt;/a&gt; to display information about frame rate and collisions on screen.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2240110177748193770?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2240110177748193770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2240110177748193770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2240110177748193770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2240110177748193770'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/week-3-bsp.html' title='Week 3 BSP'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7234589779147818650</id><published>2009-02-13T15:42:00.008Z</published><updated>2009-02-13T16:17:55.561Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='week 2'/><category scheme='http://www.blogger.com/atom/ns#' term='deliverables'/><category scheme='http://www.blogger.com/atom/ns#' term='Implientation'/><title type='text'>Serial Program Week 2</title><content type='html'>&lt;strong&gt;&lt;u&gt;Tasks for week 2&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;BSP research (implementation if applicable)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Class interactions (collision algorithms meshed with the object system) &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Camera&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Fixing the AABB collision algorithm &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Bounding area rendered &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Minor tweaks to the basic object storage so that a colour of each object can be changed depending if they are being tested for AABB collisions &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Emergent tasks and concerns&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Each colliding object now needs a position and movement direction, currently it is based on the half width of the bounding area divided by the number of the current object, the best possibility for this may be using a Monte Carlo method for both &lt;/li&gt;&lt;br /&gt;&lt;li&gt;It is possible that each object will need an ID so that the objects loaded into the AABB algorithm will not collision test themselves &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Starting to need a frame limiter on the application &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Would be nice to be able to count all of the collisions occurring and have the number print out to the screen &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Collision response at the moment is dirt simple: just reverse the direction vector. If the objects could be of differing sizes or speeds then this would cause a major problem and could or should be adapted to find the Vector of separation as described by &lt;a href="http://www.harveycartel.org/metanet/tutorials/tutorialA.html"&gt;N Tutorials Collision Detection and response&lt;/a&gt; and then move them apart based on that &lt;/li&gt;&lt;br /&gt;&lt;li&gt;BSP research is currently small to non existent, currently the best bet is a worked example that I'm still to read through and decide if its applicable &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Objects are perhaps too small to view properly&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The radial collision between colliding objects and the bounding geometry is starting to become very close to that of the standard AABB algorithm &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Uncertain about how to store each of the representations of the colliding objects into the object controller, linked list sounds like the best approach but there are questions with how the memory is allocated and destroyed &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Creating a BSP tree using a simple algorithm might mean that a BSP tree for each axis is required to provide an accurate representation (so each object has a BSP X, Y and Z partition)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Attained&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Object control class can access all collision functions as needed&lt;/li&gt;&lt;br /&gt;&lt;li&gt;AABB algorithm works but will need debugged next week because of inadequate implementation&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Bounding area up and being used to test initial collisions with all scene objects&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Colour system implemented (will be active and used once the BSP system is included)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Emerging Tasks and concerns addressed&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Monte Carlo method used to generate both the initial position and direction like so: Position (X,Y,Z) set as ((-Bounding area size/2)+ rand()%Bounding area size), Direction (X,Y,Z) unit vector ((-100)+rand()%200), for the direction the numbers do not matter as it will be normalised. Additional code is currently in place to make sure that an object is not given an initial position outside the bounding area&lt;/li&gt;&lt;br /&gt;&lt;li&gt;ID system implemented to avoid testing the object with itself when performing AABB collision between objects&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Need help implementing a frame limiter correctly&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Getting the metrics to display is easy enough its printing them out to screen that's the problem&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Collision response may be changed depending on the problems encountered within the next week&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Both types of collisions are similar but the AABB between objects is more complex due to the nature that objects can be in any octet around around the 3D origin (this is also one of the major problems with the implimentation)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Object size is a minor problem&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Memory and collision testing only the objects within the current BSP volume will be checked next week&lt;/li&gt;&lt;br /&gt;&lt;li&gt;BSP research goes on&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Metrics&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Currently the sizes and speed for everything in the scene are as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Colliding spheres: Radius 0f 0.2f. Bounding box width, height and depth of 0.4f&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Bounding area: centred around the origin. Bounds the are of height,width and depth of 96.0f&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Colliding object speed of 1.01f&lt;/li&gt;&lt;br /&gt;&lt;li&gt;200 Colliding spheres&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Current Screenshot&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5302313072645163250" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 155px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_Z3KsWqUusj4/SZWZpY7syPI/AAAAAAAAAA4/0CYYQzzJ3eU/s200/serial+app+bounding+area+collision+random+pos+and+direct.JPG" border="0" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 3 Tasks&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP implementation (if applicable) &lt;/li&gt;&lt;li&gt;Collide-able Objects linked in some way to the BSP system &lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Debugging this week will mostly consist of fixing the AABB algorithm and the extension of the collision response. Implementing the AABB algorithm into the program may be as follows:&lt;/p&gt;&lt;p&gt;1.1 Get an Iterator to the first object in the list&lt;/p&gt;&lt;p&gt;1.2 For all objects in the list&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;1.2.1 Get another Iterator to the first object in the list&lt;/p&gt;&lt;p&gt;1.2.3 For all objects in the list (using the second Iterator)&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;1.2.3.1 Check that the ID of the objects do not match&lt;/p&gt;&lt;p&gt;1.2.3.2(Check the BSP volume of the object matches the currently set one)&lt;/p&gt;&lt;p&gt;1.2.3.3 Perform collision detection with the first iterator as object 1 and&lt;br /&gt;the&lt;br /&gt;second as object 2&lt;/p&gt;&lt;blockquote&gt;1.2.3.4.1 Perform collision response&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;1.2.4 Increment the second Iterator&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;1.3 Increment first Iterator&lt;/p&gt;&lt;p&gt;On another note I had thought about using Doxygen to generate documentation from the project directly so I'll maybe have a better look at that this weekend.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7234589779147818650?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7234589779147818650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7234589779147818650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7234589779147818650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7234589779147818650'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/serial-program-week-2.html' title='Serial Program Week 2'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Z3KsWqUusj4/SZWZpY7syPI/AAAAAAAAAA4/0CYYQzzJ3eU/s72-c/serial+app+bounding+area+collision+random+pos+and+direct.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2127784735888568720</id><published>2009-02-12T18:00:00.007Z</published><updated>2009-02-12T18:27:29.369Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Implientation'/><title type='text'>Something a bit more visual</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_Z3KsWqUusj4/SZRj4yY0spI/AAAAAAAAAAw/NX7G-1c3uiY/s1600-h/serial+app+bounding+area+collision+2000+objects.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5301972488571630226" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 155px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_Z3KsWqUusj4/SZRj4yY0spI/AAAAAAAAAAw/NX7G-1c3uiY/s200/serial+app+bounding+area+collision+2000+objects.JPG" border="0" /&gt;&lt;/a&gt;Screen shot of the current state of the project but still a few things are to be done before the end of this week.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Week 2 Tasks +Over spill tasks&lt;/u&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;BSP research (implementation if applicable)&lt;/li&gt;&lt;li&gt;Class interactions (collision algorithms meshed with the object system)&lt;/li&gt;&lt;li&gt;Camera&lt;/li&gt;&lt;li&gt;Fixing the AABB collision algorithm &lt;/li&gt;&lt;li&gt;Bounding area rendered&lt;/li&gt;&lt;li&gt;Minor tweaks to the basic object storage so that a colour of each object can be changed depending if they are being tested for AABB collisions &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Current Achievement&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Class interaction with Bounding volume collision algorithm&lt;/li&gt;&lt;li&gt;Camera implemented&lt;/li&gt;&lt;li&gt;Bounding area rendered can also be set to any size that is defined at compile time&lt;/li&gt;&lt;li&gt;Red coloured objects under go AABB testing between themselves and the bounding volume while white objects only undergo testing with the bounding volume&lt;/li&gt;&lt;li&gt;AABB Algorithm 'works'&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Emerging problems&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Each colliding object now needs a position and movement direction, currently it is based on the half width of the bounding area divided by the number of the current object, the best possibility for this may be using a Monte Carlo method for both&lt;/li&gt;&lt;li&gt;It is possible that each object will need an ID so that the objects loaded into the AABB algorithm will not collision test themselves&lt;/li&gt;&lt;li&gt;Starting to need a frame limiter on the application&lt;/li&gt;&lt;li&gt;Would be nice to be able to count all of the collisions occurring and have the number print out to the screen&lt;/li&gt;&lt;li&gt;Collision response at the moment is dirt simple: just reverse the direction vector. If the objects could be of differing sizes or speeds then this would cause a major problem and could or should be adapted to find the Vector of separation as described by &lt;a href="http://www.harveycartel.org/metanet/tutorials/tutorialA.html"&gt;N Tutorials Collision Detection and response&lt;/a&gt; and then move them apart based on that&lt;/li&gt;&lt;li&gt;BSP research is currently small to non existent, currently the best bet is a worked example that I'm still to read through and decide if its applicable&lt;/li&gt;&lt;li&gt;Objects are perhaps too small to view properly&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2127784735888568720?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2127784735888568720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2127784735888568720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2127784735888568720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2127784735888568720'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/something-bit-more-visual.html' title='Something a bit more visual'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Z3KsWqUusj4/SZRj4yY0spI/AAAAAAAAAAw/NX7G-1c3uiY/s72-c/serial+app+bounding+area+collision+2000+objects.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2449180148645109072</id><published>2009-02-06T17:25:00.005Z</published><updated>2009-02-06T17:49:49.660Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='deliverables'/><category scheme='http://www.blogger.com/atom/ns#' term='over spill already'/><category scheme='http://www.blogger.com/atom/ns#' term='collision'/><category scheme='http://www.blogger.com/atom/ns#' term='Issues'/><title type='text'>Serial Program Week 1</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Tasks for week 1: &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Initial Thoughts on BSP system + research on the implementation &lt;/li&gt;&lt;li&gt;Collide-able object system and storage to be created &lt;/li&gt;&lt;li&gt;Initial version of the application independent collision algorithms (Static Library) &lt;/li&gt;&lt;li&gt;Basic framework that will initialise the graphical system and be portable in its base state to the parallel application. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Attained &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Basic application frame work with graphics initialisation &lt;/li&gt;&lt;li&gt;Collision with a bounding geometry and an object algorithm working &lt;/li&gt;&lt;li&gt;Basic Object storage and Object controller class created &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Overlap Tasks &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;Fixing the AABB collision algorithm &lt;/li&gt;&lt;li&gt;Bounding area rendered&lt;/li&gt;&lt;li&gt;Minor tweaks to the basic object storage so that a colour of each object can be changed depending if they are being tested for AABB collisions &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Meta Tasks &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Collision needs to be finished before being implemented in the Object controller &lt;/li&gt;&lt;li&gt;Current implementation of collision algorithms considers that all heights, widths and depths are divided by 2 in order to find the extremity of the edge of the object &lt;/li&gt;&lt;li&gt;Collision algorithms have an unwieldy number of input variables &lt;/li&gt;&lt;li&gt;More complex object initialisation to spread objects equally &lt;/li&gt;&lt;li&gt;Need to define how large the bounding geometry will be&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;Fixes from previous concerns &lt;/p&gt;&lt;/u&gt;&lt;/strong&gt;&lt;ul&gt;&lt;li&gt;Vector4 class from the PS2 Framework is being used for now until an alternative becomes available&lt;/li&gt;&lt;li&gt;Colliding objects are currently stored in a linked list within the object controller &lt;/li&gt;&lt;li&gt;Radial collision is still very close to the inverse of the AABB collision algorithm &lt;/li&gt;&lt;li&gt;Better abstraction to Objects have them as classes also means that the pointer to the GLU object representing the collision objects is wrapped within the class &lt;/li&gt;&lt;li&gt;Objects will have their Orientation vector normalised before any calculations, if not normalised by the user it will be performed when moving the object &lt;/li&gt;&lt;li&gt;Implement the colour of the objects next week &lt;/li&gt;&lt;li&gt;After getting the final version the collision library project file will be linked into the serial application which will then become dependant on its build &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;Thankfully next week does not have much in the way of complex tasks so the tasks left over from week 1 should be quick to complete before week 2 tasks are to be done. At most the overlap will cause about 2 days of delay&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2449180148645109072?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2449180148645109072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2449180148645109072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2449180148645109072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2449180148645109072'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/serial-program-week-1.html' title='Serial Program Week 1'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6903061489957368187</id><published>2009-02-05T16:32:00.008Z</published><updated>2009-02-05T17:50:55.542Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serial Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Intel TBB'/><title type='text'>Serial Application Plan</title><content type='html'>The current plan for this month is to be spent putting together the serial application.&lt;br /&gt;The main areas of this application are as follows:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Collide-able Objects&lt;/li&gt;&lt;li&gt;BSP System&lt;/li&gt;&lt;li&gt;Collision algorithms and response&lt;/li&gt;&lt;li&gt;Graphics system including camera control&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;A short overview of each component:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Collide-able Objects&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Stores everything that describes a collide-able object (position, height, width, orientation, movement, direction etc).&lt;/li&gt;&lt;li&gt;Performs the actual moving of each object.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;BSP System&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Splits the bounding geometry into discreet sections.&lt;/li&gt;&lt;li&gt;The BSP tree will be traversed at the start of each collision test in order to cull collisions that are not in the currently set BSP area&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Collision algorithms and response&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Radial and AABB collision. &lt;/li&gt;&lt;li&gt;Radial collision between the bounding geometry and each colliding object. &lt;/li&gt;&lt;li&gt;AABB collision between each individual objects.&lt;/li&gt;&lt;li&gt;Will return a true or false depending if the objects collide with each other or the bounding geometry. Collision response will then be handled by the main application.&lt;/li&gt;&lt;li&gt;Should be portable as possible for integration into the Parallel application.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Graphics system including camera control&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Renders the bounding geometry. Currently bounding geometry will be represented as a large cube rendered as wireframe centred on the origin.&lt;/li&gt;&lt;li&gt;Possible extension to allow the BSP sections to be rendered&lt;/li&gt;&lt;li&gt;Renders all colliding objects.&lt;/li&gt;&lt;li&gt;Camera system controls how the scene is viewed.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Risk Assessment&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;High Risk&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP system&lt;/li&gt;&lt;li&gt;Collision algorithms&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;u&gt;Medium Risk&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Graphics system including camera control&lt;/li&gt;&lt;li&gt;Camera&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;u&gt;Low Risk&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Collide-able Objects&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Projected Time frame&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;4 Weeks, Start 1st February 2009, End 28th February 2009&lt;/p&gt;&lt;p&gt;Estimated 3-4 days a week spent on the honours project (in-between lectures/tutorials)&lt;/p&gt;&lt;p&gt;Additional 1-2 days a week are set aside for Advanced Games Technology work or learning the first choice library to implement the Parallel application.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Weekly breakdown&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;u&gt;Week 1&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Initial Thoughts on BSP system + research on the implementation&lt;/li&gt;&lt;li&gt;Collide-able object system and storage to be created&lt;/li&gt;&lt;li&gt;Initial version of the application independent collision algorithms (Static Library)&lt;/li&gt;&lt;li&gt;Basic framework that will initialise the graphical system and be portable in its base state to the parallel application.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;u&gt;Week 2&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP research (implementation if applicable)&lt;/li&gt;&lt;li&gt;Class interactions (collision algorithms meshed with the object system)&lt;/li&gt;&lt;li&gt;Camera&lt;/li&gt;&lt;li&gt;Any spill over from week 1&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;u&gt;Week 3&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;BSP implementation (if applicable)&lt;/li&gt;&lt;li&gt;Collide-able Objects linked in some way to the BSP system&lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;u&gt;Week 4&lt;/u&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Week 3 spill over&lt;/li&gt;&lt;li&gt;Debugging&lt;/li&gt;&lt;li&gt;Benchmarking&lt;/li&gt;&lt;li&gt;With the benchmarked numbers get the theorised speed up for the parallel application&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Serial application proposed main loop flow&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;1.1 Start&lt;/p&gt;&lt;p&gt;1.2 Initialise Graphics&lt;/p&gt;&lt;p&gt;1.3 Initialise Collide-able Object system&lt;/p&gt;&lt;p&gt;1.4 Build BSP Tree(s)&lt;/p&gt;&lt;p&gt;1.5 Main Loop Starts&lt;/p&gt;&lt;p&gt;1.5.1 Take camera input&lt;/p&gt;&lt;p&gt;1.5.2 Collide-able Object system Moves all of the objects&lt;/p&gt;&lt;p&gt;1.5.3 Traverse BSP Tree(s) assigning objects a BSP partition&lt;/p&gt;&lt;p&gt;1.5.4 Collision test all objects with the bounding geometry and collision tests between objects contained within the currently "active" BSP partition&lt;/p&gt;&lt;p&gt;1.5.5 Render Scene&lt;/p&gt;&lt;p&gt;1.6 Application exit&lt;/p&gt;&lt;p&gt;1.7 Clean up all allocated memory&lt;/p&gt;&lt;p&gt;1.8 Close application&lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;strong&gt;&lt;u&gt;&lt;blockquote&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/blockquote&gt;&lt;/u&gt;&lt;/strong&gt;&lt;strong&gt;&lt;u&gt;&lt;blockquote&gt;&lt;strong&gt;&lt;u&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/blockquote&gt;&lt;p&gt;Current Progress&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Application framework with the graphics system, no camera yet.&lt;/li&gt;&lt;li&gt;Working on collision library.&lt;/li&gt;&lt;li&gt;Storage for the collide-able objects, leaning towards a controller system that will handle all collisions, movement and such.&lt;/li&gt;&lt;li&gt;Bit of a vague idea on BSP, Each node may contain a Plane that is used to find out if the object is in the positive or negative half space.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Current Problems&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;No implemented Vector class yet meaning that positions are currently a set of three floats, making the code somewhat unwieldy to read&lt;/li&gt;&lt;li&gt;The radial collision between colliding objects and the bounding geometry is starting to become very close to that of the standard AABB algorithm&lt;/li&gt;&lt;li&gt;Uncertain about how to store each of the representations of the colliding objects into the object controller, linked list sounds like the best approach but there are questions with how the memory is allocated and destroyed&lt;/li&gt;&lt;li&gt;Creating a BSP tree using a simple algorithm might mean that a BSP tree for each axis is required to provide an accurate representation (so each object has a BSP X, Y and Z partition)&lt;/li&gt;&lt;li&gt;Simplicity of the current collide-able object class means that it may be better represented as a structure and then the overreaching object controller class would perform what little methods are within the collide-able object class&lt;/li&gt;&lt;li&gt;Movement for the colliding objects needs to be confirmed (new position= Old position + (Orientation * scalar speed)?)&lt;/li&gt;&lt;li&gt;Perhaps a good idea to colour all objects in the "active" BSP area?&lt;/li&gt;&lt;li&gt;As usual the application has a large run up time in terms of code before any proper testing can be done&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6903061489957368187?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6903061489957368187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6903061489957368187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6903061489957368187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6903061489957368187'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/02/serial-application-plan.html' title='Serial Application Plan'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8821983122578426134</id><published>2009-01-28T15:46:00.013Z</published><updated>2009-01-28T18:07:28.797Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Here be Dragons'/><category scheme='http://www.blogger.com/atom/ns#' term='CUDA'/><category scheme='http://www.blogger.com/atom/ns#' term='Boost'/><category scheme='http://www.blogger.com/atom/ns#' term='Addition of Death Ticks'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenGL'/><category scheme='http://www.blogger.com/atom/ns#' term='Intel TBB'/><category scheme='http://www.blogger.com/atom/ns#' term='Implientation'/><title type='text'>The good the bad and the ugly</title><content type='html'>Currently I am looking at three different ways in order to implement the threaded aspect of the parallel application. Firstly thought I have been occasionally changing terminology when talking about the application to be created.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Multi-threading&lt;/li&gt;&lt;li&gt;Multi-Processing&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Both of these terms can have a lot of the same concurrency problems and paradigms applied to them but are fundamentally different.&lt;/p&gt;&lt;p&gt;Multi-threaded refers to the operating system (OS) construct of a thread that is shared between one or more processors, the OS controls which processor the thread executes on and when it executes.&lt;/p&gt;&lt;p&gt;Multi-Processing refers to using multiple of perhaps small inexpensive processors in order to batch process data. The best example of a system like this is the PS3 where the Power Processor Element (PPE) is the centre of the system sending tasks to the Synergistic Processor Elements (SPEs) (&lt;a href="http://www.blachford.info/computer/Cell/Cell1_v2.html"&gt;http://www.blachford.info/computer/Cell/Cell1_v2.html&lt;/a&gt;); the parallel task is being executed on physical hardware rather than being multiplexed across one or more CPUs dependant the operating system control. The additional consideration that Multi-Processing has is that of processor cache concurrency.&lt;/p&gt;&lt;p&gt;The three ways that the parallel application could be implemented are broken up like so:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Multi-Threading:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Intel Threading Building Blocks (TBB) (&lt;a href="http://www.threadingbuildingblocks.org/"&gt;http://www.threadingbuildingblocks.org/&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Boost C++ Libraries, Specifically the Thread Library (&lt;a href="http://www.boost.org/"&gt;http://www.boost.org/&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Multi-Processing:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;nVidia CUDA General Purpose GPU language (GPGPU) (&lt;a href="http://www.nvidia.com/object/cuda_home.html"&gt;http://www.nvidia.com/object/cuda_home.html&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Depending on the chosen implementation will change the semantics of the language used and how the application is benchmarked.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;First impressions&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;After looking at the introductory documentation for each of these approaches here are the first impressions for each of them. At the end of the week after a discussion with my technical supervisor I should have a definite hold on what approach to use.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Intel Threading Building Blocks&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;This library set is currently the base of the &lt;a href="http://honoursprojectio.blogspot.com/2008/11/smoke-n-way-threading-for-games.html"&gt;SMOKE &lt;/a&gt;framework uses for concurrency and parallel implementation. The library focuses on scalability of the parallelised code across N number of processors future proofing any increase in the number of possible processes with  additional options to set the size of granularity for a specific operation. Threads are abstracted away so that the user defines tasks that will be processed by a task manager (although the task manager is designed for algorithms that will not block), the section to parallel process defined by a blocked range template from the library. Additionally it has a number of differing types of mutual exclusion primitives that can be used in conjunction with these methods in order to control data concurrency. Because of the STL style of each of the operations all can be extended and customised to suit the current task.&lt;/p&gt;&lt;p&gt;With this approach the focus of the project may shift slightly more towards the study of creating the working sets.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Lowers risk with creating deadlocks in threads due to the wide array of templates&lt;/li&gt;&lt;li&gt;Variable granularity size for tasks including optimisations for the cache&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Granularity of the task may need to be either found from checking code performance or another way&lt;/li&gt;&lt;li&gt;May end up too reliant on the low level feature set meaning that no templates will be used&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Boost C++ Thread Library&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The Boost library contains a large number of extensions to C++ but the only one that will be used would be that of the Thread library. Working on the OS level of thread constructs this allows the creation of thread objects that when destroyed will not necessarily end the thread it is associated with but provided the user knows the ID of the thread they can join a new Thread object to that running thread to either terminate its operation or change the working set that the thread is processing. Calling a number of standard thread functions will interrupt the thread if that thread is interruptible. The Thread object being a template class can be customised to the task. Also a wide array of lock and mutex objects are used to control concurrency.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;High amount of customisability&lt;/li&gt;&lt;li&gt;No need for a concurrent list of all Thread objects running at any time a single Thread object can be joined to any thread as long as the ID is known&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;No Inherent system t0 define the maximum number of threads that a system might use, meaning a possibility of flooding the OS with threads&lt;/li&gt;&lt;li&gt;A personal gripe with this is the size of the Boost library overall although it is currently uncertain if the Thread library is without attachment to any other Boost Library.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;nVidia CUDA GPGPU&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The CUDA implementation uses the GPU to accelerate calculation of large scale tasks. nVidia's 8000 and above series are compatible with this system using the parallel nature of a graphics card to process C style functions called &lt;em&gt;Kernels.&lt;/em&gt; Each kernel will be run N times on a number of N CUDA threads. Memory is can be organised as thread local, N by N shared block or as global memory across all processes. Designed as an extension to the C language this system is reliant on the number of multi-processors on the graphics card, the current nVidia graphics card in the university computers are 8600 GTs and my own computer at home is the mobile version of these graphics cards, this gives a compute compatibility of 1.1 according to the specifications published by nVidia effecting the number of thread blocks that can be processed.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Gives a real parallel processing environment&lt;/li&gt;&lt;li&gt;Eliminates a lot of overhead associated with OS threads&lt;/li&gt;&lt;li&gt;Removes the possibility of flooding the system with OS threads&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;C style, somewhere in the program the relevant information about the colliding objects would need to be extracted from their encapsulation and then processed into a structure that a kernel could use&lt;/li&gt;&lt;li&gt;CUDA assigned memory does not have equal priority with that of graphics memory meaning that the standard graphics card drivers may overwrite CUDA memory if needed&lt;/li&gt;&lt;li&gt;Specialist CUDA drivers and tool kit need to be installed on the machine additionally to use the graphics card drivers need to be greater than a certain version&lt;/li&gt;&lt;li&gt;Benchmarking this application will be vastly different from benchmarking the serial application&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Apart from these three implementation approaches the graphics API to display the world where all objects are colliding will be OpenGL due to the low priority nature of the graphics display and the greater familiarity with OpenGL at the moment. Additionally setting up OpenGL will be faster and removes the centralised Device that DirectX uses as well as my only experience with DirectX being that of the programmable (shader) pipeline.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8821983122578426134?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8821983122578426134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8821983122578426134' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8821983122578426134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8821983122578426134'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/01/good-bad-and-ugly.html' title='The good the bad and the ugly'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-3663899577584952619</id><published>2009-01-19T16:08:00.004Z</published><updated>2009-03-22T00:48:15.015Z</updated><title type='text'>Intel TBB</title><content type='html'>Bit before Christmas I had a quick conversation with &lt;a href="http://aik6980.digitalartsuk.com/"&gt;AIK&lt;/a&gt; about using &lt;a href="http://software.intel.com/en-us/articles/smoke-game-technology-demo/"&gt;SMOKE &lt;/a&gt;for the threading implementation for this project. He muted the point that its possible that benchmarking the application with this framework may make it harder to obtain accurate results. He also suggested to try using the Intel Threading Building Blocks Libraries. Currently I'm looking at the open source version of them and will probably try and create a few examples within the next week.&lt;br /&gt;Even if I do decide not to use the SMOKE framework the Ideals behind its operation are more than noteworthy for different approaches and extensions of the project material.&lt;br /&gt;&lt;br /&gt;By the end of this month I should have at least an idea of what system I will use to implement the threaded portion of the research project, along with the graphics API that will be used to display the world where the collisions are taking place.&lt;br /&gt;On the code side of things possibly an application base that can be used for the single threaded application and the multi threaded application, that will create a basic window ready to start the main section of the project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-3663899577584952619?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/3663899577584952619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=3663899577584952619' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3663899577584952619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/3663899577584952619'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2009/01/intel-tbb.html' title='Intel TBB'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1440306358706623191</id><published>2008-12-15T11:44:00.002Z</published><updated>2008-12-15T11:51:35.256Z</updated><title type='text'>Gold Master</title><content type='html'>Final Project proposal:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Up until recently the computing industry has been governed by Moore’s law stating that:&lt;br /&gt;Every two years the number of transistors on an integrated circuit (IC) will double (Moore 1965)&lt;br /&gt;&lt;br /&gt;This is attributed to the falling cost of each transistor over these two year periods and has held reasonably true over the past forty years. Although not thought of at when it was theorised in 1965 there is a major limiting factor in this exponential rule:&lt;br /&gt;&lt;br /&gt;·        The size of a transistor on a silicone wafer (Dubash 2005)&lt;br /&gt;&lt;br /&gt;As the size of a transistor approaches the size of an atom electrical current will cease to flow through the transistor. Other considerations such as the amount of heat generated from an IC will increase in line with the number of transistors etched onto the single silicone wafer at the core of the IC also plays a major role in creating the limit of this law (Sutter 2005).&lt;br /&gt;In order to extent the life of the current fabrication process until other fabrication processes or ICs that operate on an entirely different principal become cost effective as the current process the industry is changing.&lt;br /&gt;&lt;br /&gt;These physical limits are causing the industry to shift towards multiple processor architectures (Sutter 2005). Because of this shift the industry becomes controlled by another rule: Amdahl’s Law&lt;br /&gt;&lt;br /&gt;Amdahl’s Law gives the expected speed up of a system when one or more parts of it are parallelised base upon the amount of time that it takes for a sequential operation. It also assumes that there is no change in the actual size of the problem when converted to run on a parallelised system (Hill &amp;amp; Marty 2008).&lt;br /&gt;&lt;br /&gt;The most recent generation of games consoles all exploit parallelism to some degree in an attempt to push higher technical specifications that its competitors. However personal computers have been utilising parallel processing since 2004 but as Granatir (2008) states:&lt;br /&gt;&lt;br /&gt;“Game development is one area that has lagged behind in the progression of multi-threaded software”&lt;br /&gt;&lt;br /&gt;With most games collision detection plays an important part in either game mechanics or making the world the player is immersed in seem more realistic yet in creating a more realistic simulation more collisions may have to occur.A current approach such as space partitioning is used to cut down the number of actual collisions that will be calculated (Bobic 2000). But with parallelisation becoming more apparent within the industry can these collision culling approaches become less imperative meaning that a more realistic simulation of collision in the player’s world can take place?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Research Topic&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The core of this project is researching how all collision detection in a world can be processed by a parallel system and if the resulting parallel system can then compare performance wise to a non parallel system processing collision detection using a collision culling technique. Specifically the technique used to cull collisions for the non parallel system will be Binary Space Partitioning (BSP).&lt;br /&gt;&lt;br /&gt;This comparative study of both applications will have conclusions drawn from the results gained from profiling the operation of each program under a number of different circumstances. These circumstances will range from varying the number of objects that can possibly collide in the scene to altering the number of volumes that they collide in. The greater the number of volumes that they can collide in the more spread out all of the objects will be.These two changing variables would provide adequate simulation of the number of collisions that could possibly take place in different game environments creating different variations on which to gauge the results.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Research Question&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;With respect to Overhead and parallelised performance can a multithreaded application outperform a single threaded application where both are processing the same 3D scene where a large number of collisions are occurring?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Project Execution&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Two applications will be created:&lt;br /&gt;·        One multithreaded application that will use a threading methodology gained from research.&lt;br /&gt;·        A single threaded application that will use BSP to cull the number of collision tests happening per time sampled.&lt;br /&gt;&lt;br /&gt;Both of these applications will render a 3D scene. This 3D scene will have several bounding volumes with a number of objects colliding within them. The bounding volumes will represent possible level geometry and be shown as simple wireframe cubes and the objects will be spheres (very low complexity as a large number of them may be rendered on screen at any one time).&lt;br /&gt;&lt;br /&gt;Two types of collision will take place in this scene:&lt;br /&gt;·        Radial collision between each sphere and the boundaries of the volume containing it&lt;br /&gt;·        Axis Aligned Bounding Box collision (AABB) between spheres&lt;br /&gt;&lt;br /&gt;At all times the radial collision between the spheres and the bounding of the containing volume will occur. This means that regardless of what is culled in the single threaded example there will always be a benchmark between both applications at a base level. This base level of collisions will also preserve visual continuity for the BSP example, as only the BSP area that the camera is within will have the AABB collision calculated for it. Defining each BSP area will be either done by a 3rd party library or hard coded for ease depending on the complexity of the scene.&lt;br /&gt;&lt;br /&gt;Each object after colliding with either the bounding of the area or another object will pick a semi realistic direction to rebound from the collision. Each collision will be elastic for each of the objects colliding meaning that objects in the scene should never stop moving. Collision detection will be performed after a certain number of frames.&lt;br /&gt;&lt;br /&gt;To profile the applications the internal profiling tool included within Visual Studio 2005 will be used. To accurately obtain the time taken per frame to process collision detection within the single threaded application collision detection will be performed each frame, lowering the frame rate but providing a stable result which to use as the basis of the conclusion.&lt;br /&gt;The multithreaded application will require two sets of time profiled:&lt;br /&gt;&lt;br /&gt;·        One frame where collision detection is taking place in parallel&lt;br /&gt;·        The total time over which all collision detection is processed.&lt;br /&gt;&lt;br /&gt;The first result will give the overall speed up per frame while the 2nd result may not actually give a speed up but an increased time for processing all collisions; this is one of the overheads that will be discussed in the conclusion Additionally the amount time required to processes overhead required producing the working sets that the threaded system will processes will be profiled and it will have a bearing on the final conclusion. Also the overhead from the single threaded application namely the classification of objects that will be culled by BSP as described by Shimer (1997) will also be profiled and compared against its multithreaded counterpart in order to draw an adequate conclusion to answer the research question.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Evaluation&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The main area of evaluation will be comparing the two applications based on Amdahl’s Law (Hill &amp;amp; Marty 2008).&lt;br /&gt;The theorised performance improvement will be obtained from the single threaded application like so:&lt;br /&gt;&lt;br /&gt;Find how much of the program is performed in serial order by doing:&lt;br /&gt;&lt;br /&gt;Serial= (1-(Time for collision processing/Time for single frame))&lt;br /&gt;&lt;br /&gt;Where (Time for collision processing/Time for single frame) will give the percentage of the program that can be parallelised&lt;br /&gt;&lt;br /&gt;And applying Amdahl's law to achieve maximum speed up using N processors gives:&lt;br /&gt;&lt;br /&gt;Max Speed Up= ((Time for collision processing /Time for single frame)/N)&lt;br /&gt;&lt;br /&gt;Therefore:&lt;br /&gt;&lt;br /&gt;Speed up ((Time for Collisions/Time for Single frame), N)&lt;br /&gt;&lt;br /&gt;= 1/ (Serial + Max Speed Up)&lt;br /&gt;&lt;br /&gt;This is where N equals the number of processors on the machine designated to process the multithreaded application.&lt;br /&gt;&lt;br /&gt;This will then be compared to the actual speed up of the application gained through profiling the multithreaded application and calculated like so:&lt;br /&gt;&lt;br /&gt;Obtain the amount that the application has been speeded up by:&lt;br /&gt;&lt;br /&gt;Speed Multiplier= (Time for collision processing /Multithreaded collision time)&lt;br /&gt;&lt;br /&gt;Therefore you can find the amount of time for the multithreaded part of the program:&lt;br /&gt;&lt;br /&gt;Multithreaded part time= ((Time for collision processing/Time for single frame))/Speed Multiplier)&lt;br /&gt;&lt;br /&gt;(Where the Time for collisions and Time for single frame are from the single threaded application)&lt;br /&gt;&lt;br /&gt;And then applying Amdahl's law gives:&lt;br /&gt;&lt;br /&gt;Speed up ((Time for collisions/Time for single frame, Speed Multiplier)&lt;br /&gt;&lt;br /&gt;= 1/ (Serial+ Multithreaded part time)&lt;br /&gt;&lt;br /&gt;Additional considerations with respect to the amount of overhead for each application will also be taken into account when writing the conclusion as well as the differing conditions such as the number of colliding objects and the number of volumes collisions occur in. This will provide a wide spectrum of conditions on which to asses the multithreaded application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Equipment&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;At minimum a single core PC to test the single threaded application and a multiple core machine to process the multithreaded application. Ideally the machine processing the multithreaded application should have a quad core processor. Both should have the same type of graphics hardware in order to eliminate any discrepancy in performance while rendering the 3D scenes.&lt;br /&gt;Additionally depending on the limits of the Visual Studio profiler a copy of Intel VTune may be required for accurate profiling due to its ability to show detailed thread information (Intel 2008).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Two main issues will have a major impact on this project:&lt;br /&gt;How the parallelism of the multithreaded application is handled&lt;br /&gt;How the working sets for the multithreaded application are created&lt;br /&gt;&lt;br /&gt;Currently there are three main ways that could be used to handle the parallelism of the multithreaded application:&lt;br /&gt;&lt;br /&gt;·        Programming in C#  (Albahari 2006-2007)&lt;br /&gt;·        Using an OpenMP compliant Compiler (Pas 2008)&lt;br /&gt;·        Using Intel’s SMOKE Framework (Grantir 2008)&lt;br /&gt;&lt;br /&gt;As it is highly possible that implementing this in C++ would be far too complex  due to the lack of standardised support as described by Sutter (2005), these are the most likely candidates to be used. Each one of them will have an effect at some level on overheads.&lt;br /&gt;The implementation with the largest amount of overhead requiring a system that is heavily parallel would be using the SMOKE Framework but due to its basic design being for Computer Game applications it would be the most ideal. Programming the application in C# may remove the threading overhead meaning that the comparison of the overhead may be more straightforward than using another method. Compiling the application with an OpenMP compiler can give access to “Hardware Threads” which means that any overhead between the operating system and the application is effectively eliminated as for each physical processor there is a single thread (Chapman 2008).&lt;br /&gt;&lt;br /&gt;Depending on what system is used to implement the multithreaded system there is also the problem with Amdahl’s Law in that it is theorised that the application being parallelised will have exclusive access to each of the processing cores. With threads being handled by windows there will always be other processes using the processor (Albahari 2006-2007). Additionally Amdahl’s law was re-evaluated as Gustafson (1988) states that Amdahl’s law may be better represented as:&lt;br /&gt;                        Totally Work= Serial Amount + No Processors X parallel amount&lt;br /&gt;Giving another metric on which the project could be gauged on.&lt;br /&gt;&lt;br /&gt;The other main consideration is the creation of the working sets, based on the paper by Lewis &amp;amp; Massingill (2006), depending on the number of collision samples per second will depend on the size of each working set. Additionally if there is a large amount of spheres overlapping into many different working sets the multithreaded application could become even less efficient than the single threaded application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;            “Your free lunch will soon be over” (Sutter 2005)&lt;br /&gt;In order to continue for a personal computer to continue to be a platform for high performance computer games the game software developed for it must continue to adapt to the current techniques of programming on a multi-processor architecture.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bibliography&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Turley, J.2006.A Glimpse Inside The Cell Processor. [Online] Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/view/feature/2759/a_glimpse_inside_the_cell_processor.php"&gt;http://www.gamasutra.com/view/feature/2759/a_glimpse_inside_the_cell_processor.php&lt;/a&gt; [Accessed 15th October 2008]&lt;br /&gt;&lt;br /&gt;Gabb, H &amp;amp; Lake, A. 2005. Threading 3D Game Engine Basics. [Online]. Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/features/20051117/gabb_01.shtm"&gt;http://www.gamasutra.com/features/20051117/gabb_01.shtm&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Mönkkönen, V. 2006. Multithreaded Game Engine Architectures. [Online]. Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php"&gt;http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Paquet, P. 2006. Programming Multi-threaded Architectures: Interlocked Operations. [Online]. Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/view/feature/2745/programming_multithreaded_.php"&gt;http://www.gamasutra.com/view/feature/2745/programming_multithreaded_.php&lt;/a&gt; [Accessed 07th October 2008]&lt;br /&gt;&lt;br /&gt;Sutter, H. 2008. Break Amdahl’s Law!.[Online]. Dr Dobb’s Portal. Available from: &lt;a href="http://www.ddj.com/cpp/205900309"&gt;http://www.ddj.com/cpp/205900309&lt;/a&gt; [Accessed 8th December 2008]&lt;br /&gt;&lt;br /&gt;Sutter, H. 2007. Avoid Calling Unknown Code While Inside a Critical Section, [Online]. Dr Dobb’s Portal. Available from: &lt;a href="http://www.ddj.com/architect/202802983"&gt;http://www.ddj.com//architect/202802983&lt;/a&gt; [Accessed 8th December 2008]&lt;br /&gt;&lt;br /&gt;Sutter, H. 2008. Understanding Parallel Performance. [Online]. Dr Dobb’s Portal. Available from: &lt;a href="http://www.ddj.com/cpp/211800538"&gt;http://www.ddj.com/cpp/211800538&lt;/a&gt; [Accessed 3rd December 2008]&lt;br /&gt;&lt;br /&gt;Sutter, H. 2007. The Pillars of Concurrency: Building a consistent mental model for reasoning about concurrency. [Online]. Dr Dobb’s Portal. Available from: &lt;a href="http://www.ddj.com/architect/200001985"&gt;http://www.ddj.com/architect/200001985&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Lander, J.2000. When Two hearts Collide: Axis-Aligned Bounding Boxes. [Online]. Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/view/feature/3426/when_two_hearts_collide_.php"&gt;http://www.gamasutra.com/view/feature/3426/when_two_hearts_collide_.php&lt;/a&gt; [Accessed 07th October 2008]&lt;br /&gt;&lt;br /&gt;Wilson, K. 2006. Managing Concurrency: Latent Futures, Parallel Lives. [Online]. GameArchitect.net Available from: &lt;a href="http://www.gamearchitect.net/Articles/ManagingConcurrency1.html"&gt;http://www.gamearchitect.net/Articles/ManagingConcurrency1.html&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Chalmers, A &amp;amp; Tidmus, J 1996, Practical Parallel Processing, International Thomson Computing Press, London, UK&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Moore, G.E. 1965. Cramming more components onto integrated circuits. [Online]. Intel Museum Available from: &lt;a href="ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf"&gt;ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Sutter, H. 2005. A Fundamental Turn Toward Concurrency in Software. [Online]. Dr Dobb’s Portal. Available from:  &lt;a href="http://www.ddj.com/architect/184405990"&gt;http://www.ddj.com/architect/184405990&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Dubash,M. 2005. Moore’s law is dead, says Gordon Moore. [Online] Techworld. Available from: &lt;a href="http://www.techworld.com/opsys/news/index.cfm?NewsID=3477"&gt;http://www.techworld.com/opsys/news/index.cfm?NewsID=3477&lt;/a&gt; [Accessed 20th October 2008]&lt;br /&gt;&lt;br /&gt;Hill, M.D. &amp;amp; Marty M.R. 2008. Amdahl’s Law in the Multicore Era. [Online]. IEEE Computer Society Digital Library. Available from: &lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209"&gt;http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209&lt;/a&gt; [Accessed 30th October 2008]&lt;br /&gt;&lt;br /&gt;Granatir, O. 2008. Performance Scaling With cores: Introducing the SMOKE Framework. [Online]. Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/view/feature/3861/performance_scaling_with_cores_.php"&gt;http://www.gamasutra.com/view/feature/3861/performance_scaling_with_cores_.php&lt;/a&gt; [Accessed 28th November 2008]&lt;br /&gt;&lt;br /&gt;Granatir, O. 2008. SMOKE-Game technology Demo. [Online]. Intel What IF. Available from: &lt;a href="http://software.intel.com/en-us/articles/smoke-game-technology-demo"&gt;http://software.intel.com/en-us/articles/smoke-game-technology-demo&lt;/a&gt; [Accessed 28th November 2008, from]&lt;br /&gt;&lt;br /&gt;Pas, R V D 2008. An Overview of OpenMP 2.5. [Online]. IWOMP Workshop. Available from: &lt;a href="http://cobweb.ecn.purdue.edu/ParaMount/iwomp2008/documents/3.Overview_OpenMP_HO.pdf"&gt;http://cobweb.ecn.purdue.edu/ParaMount/iwomp2008/documents/3.Overview_OpenMP_HO.pdf&lt;/a&gt;  [Accessed 1st December 2008]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lewis, M.C &amp;amp; Massingill, B.L. 2006. Multithreaded Collision Detection in Java. [Online]. World Congress in Computer Science, Computer Engineering and Applied Computing. Available from: &lt;a href="http://ww1.ucmss.com/books/LFS/CSREA2006/PDP4236.pdf"&gt;http://ww1.ucmss.com/books/LFS/CSREA2006/PDP4236.pdf&lt;/a&gt; [Accessed 15th October 2008]&lt;br /&gt;&lt;br /&gt;Shimer, C. 1997. Binary Space Partition Trees. [Online]. Worcester Polytechnic Institute Computer Science CS 563 '99 - Advanced Topics in Computer Graphics. Available from: &lt;a href="http://web.cs.wpi.edu/~matt/courses/cs563/talks/bsp/bsp.html"&gt;http://web.cs.wpi.edu/~matt/courses/cs563/talks/bsp/bsp.html&lt;/a&gt; [Accessed 05th November 2008]&lt;br /&gt;&lt;br /&gt;Gustafson, J.L. 1988. Reevaluating Amdahl’s Law. Communications of the ACM. vol. 31. May Issue 5. p 532 – 533. [Online]. Available from: &lt;a href="http://doi.acm.org/10.1145/42411.42415"&gt;http://doi.acm.org/10.1145/42411.42415&lt;/a&gt; [Accessed 24th November 2008]&lt;br /&gt;&lt;br /&gt;Albahari, J. 2006-2007. Threading in C#. [online]. O’Reilly. Available from: &lt;a href="http://www.albahari.com/threading/"&gt;http://www.albahari.com/threading/&lt;/a&gt; . [Accessed 8th December 2008]&lt;br /&gt;&lt;br /&gt;&lt;a style="mso-comment-reference: 0_11; mso-comment-date: 20081208T1719"&gt;Intel. 2008. Intel VTune. Available Online. From: &lt;/a&gt;&lt;a href="http://www.intel.com/cd/software/products/asmo-na/eng/239144.htm"&gt;http://www.intel.com/cd/software/products/asmo-na/eng/239144.htm&lt;/a&gt; . Intel&lt;a language="JavaScript" class="msocomanchor" id="_anchor_11" onmouseover="msoCommentShow('_anchor_11','_com_11')" onmouseout="msoCommentHide('_com_11')" href="http://www.blogger.com/post-create.g?blogID=454215893956321549#_msocom_11" name="_msoanchor_11"&gt;[011]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; Chapman, B. 2008. How OpenMP is compiled. [Online]. in IWOMP Workshop. Available from: &lt;a href="http://cobweb.ecn.purdue.edu/ParaMount/iwomp2008/documents/chapman-underthehood"&gt;http://cobweb.ecn.purdue.edu/ParaMount/iwomp2008/documents/chapman-underthehood&lt;/a&gt; . [Accessed 8th December 2008]&lt;br /&gt;&lt;br /&gt;Bobic, N. 2000. Advanced Collision Detection techniques. [Online] Gamasutra.com. Available from: &lt;a href="http://www.gamasutra.com/view/feature/3190/advanced_collision_detection_.php"&gt;http://www.gamasutra.com/view/feature/3190/advanced_collision_detection_.php&lt;/a&gt; [Accessed 10th October 2008]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now I can go off and panic about my exams and other coursework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1440306358706623191?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1440306358706623191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1440306358706623191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1440306358706623191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1440306358706623191'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/12/gold-master.html' title='Gold Master'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2513611769315983164</id><published>2008-12-01T15:54:00.009Z</published><updated>2008-12-01T16:53:06.163Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='first draft'/><category scheme='http://www.blogger.com/atom/ns#' term='OD'/><category scheme='http://www.blogger.com/atom/ns#' term='Project'/><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><category scheme='http://www.blogger.com/atom/ns#' term='proposal'/><title type='text'>Proposal Draft</title><content type='html'>First draft of the project Proposal, well over the word limit and missing some references and proofs.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Up until recently the computing industry has been governed by Moore’s law stating that:&lt;br /&gt;Every two years the number of transistors on an integrated circuit (IC) will double (Moore 1965)&lt;br /&gt;&lt;br /&gt;This is attributed to the falling cost of each transistor over these two year periods and has held reasonably true over the past forty years. Although not thought of at when it was theorised in 1965 there is a major limiting factor in this exponential rule:&lt;br /&gt;&lt;br /&gt;· The size of a transistor on a silicone wafer (Dubash 2005)&lt;br /&gt;&lt;br /&gt;As the size of a transistor approaches the size of an atom electrical current will cease to flow through the transistor. Other considerations such as the amount of heat generated from an IC will increase in line with the number of transistors etched onto the single silicone wafer at the core of the IC also plays a major role in creating the limit of this law.&lt;br /&gt;In order to extent the life of the current fabrication process until other fabrication processes such as ICs operating on the nano scale or quantum computing become cost effective as the current process the industry is changing.&lt;br /&gt;&lt;br /&gt;These physical limits are causing the industry to shift towards multiple processor architectures (Sutter 2005). Because of this shift the industry becomes controlled by another rule: Amdahl’s Law&lt;br /&gt;&lt;br /&gt;Amdahl’s Law gives the expected speed up of a system when one or more parts of it are parallelised base upon the amount of time that it takes for a sequential operation. It also assumes that there is no change in the actual size of the problem when converted to run on a parallelised system (Hill &amp;amp; Marty 2008).&lt;br /&gt;&lt;br /&gt;The most recent generation of games consoles all exploit parallelism to some degree in an attempt to push higher technical specifications that its competitors. However personal computers have been utilising parallel processing since 2004 but as (Granatir 2008) states:&lt;br /&gt;&lt;br /&gt;“Game development is one area that has lagged behind in the progression of multi-threaded software”&lt;br /&gt;&lt;br /&gt;With most games collision detection plays an important part in either game mechanics or making the world the player is immersed in seem more realistic yet in creating a more realistic simulation more collisions may have to occur. Current approaches such as space partitioning or use of the rules of the game are used to cut down the number of actual collisions that will be calculated. But with parallelisation becoming more apparent within the industry can these collision culling approaches become less imperative meaning that a more realistic simulation of collision in the player’s world can take place?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Research Topic&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The core of this project is researching how all collision detection in a world can be processed by a parallel system and if the resulting parallel system can then compare performance wise to a non parallel system processing collision detection using a collision culling technique. Specifically the technique used to cull collisions for the non parallel system will be Binary Space Partitioning (BSP).&lt;br /&gt;&lt;br /&gt;This comparative study of both applications will have conclusions drawn from the results gained from profiling the operation of each program under a number of different circumstances. These circumstances will range from varying the number of objects that can possibly collide in the scene to altering the number of volumes that they collide in. The greater the number of volumes that they can collide in the more spread out all of the objects will be. These two changing variables would provide adequate simulation of the number of collisions that could possibly take place in different game environments.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Research Question&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;What are the Considerations with respect to Overhead and serialisation performance between a single threaded application and a multithreaded application where both are processing the same 3D scene where a large number of collisions are occurring?&lt;br /&gt;&lt;br /&gt;Project Execution&lt;br /&gt;&lt;br /&gt;Two applications will be created:&lt;br /&gt;· One multithreaded application that will use a threading methodology gained from research.&lt;br /&gt;· A single threaded application that will use BSP to cull the number of collision tests happening per time sampled.&lt;br /&gt;Both of these applications will render a 3D scene. This 3D scene will have several bounding volumes with a number of objects colliding within them. The bounding volumes will represent possible level geometry and be shown as simple wireframe cubes and the objects will be spheres (very low complexity as a large number of them may be rendered on screen at any one time).&lt;br /&gt;&lt;br /&gt;Two types of collision will take place in this scene:&lt;br /&gt;· Radial collision between each sphere and the boundaries of the volume containing it&lt;br /&gt;· Axis Aligned Bounding Box collision (AABB) between spheres&lt;br /&gt;At all times the radial collision between the spheres and the bounding of the containing volume will occur. This means that regardless of what is culled in the single threaded example there will always be a benchmark between both applications at a base level. This base level of collisions will also preserve visual continuity for the BSP example, as only the BSP area that the camera is within will have the AABB collision calculated for it. Defining each BSP area will be either done by a 3rd party library or hard coded for ease depending on the complexity of the scene.&lt;br /&gt;&lt;br /&gt;Each object after colliding with either the bounding of the area or another object will pick a semi realistic direction to rebound from the collision. Each collision will be elastic for each of the objects colliding meaning that objects in the scene should never stop moving. Collision detection will be performed after a certain number of frames.&lt;br /&gt;&lt;br /&gt;To profile the applications the internal profiling tool included within Visual Studio 2005 will be used. To accurately obtain the time taken per frame to process collision detection within the single threaded application collision detection will be performed each frame, lowering the frame rate but providing a stable result which to use as the basis of the conclusion.&lt;br /&gt;The multithreaded application will require two sets of time profiled:&lt;br /&gt;&lt;br /&gt;· One frame where collision detection is taking place in parallel&lt;br /&gt;· The total time over which all collision detection is processed.&lt;br /&gt;&lt;br /&gt;The first result will give the overall speed up per frame while the 2nd result may not actually give a speed up but an increased time for processing all collisions; this is one of the overheads that will be discussed in the conclusion. Additionally the amount time required to processes overhead required producing the working sets that the threaded system will processes will be found and it will have a bearing on the final conclusion. Also the overhead from the single threaded application namely the classification of objects that will be culled by BSP will also be profiled and compared against its multithreaded counterpart.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Evaluation&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The main area of evaluation will be comparing the two applications based on Amdahl’s Law (Hill &amp;amp; Marty 2008).&lt;br /&gt;The theorised performance improvement will be obtained from the single threaded application like so:&lt;br /&gt;&lt;br /&gt;Find how much of the program is performed in serial order by doing:&lt;br /&gt;&lt;br /&gt;Serial= (1-(Time for collision processing/Time for single frame))&lt;br /&gt;&lt;br /&gt;Where (Time for collision processing/Time for single frame) will give the percentage of the program that can be parallelised&lt;br /&gt;&lt;br /&gt;And applying Amdahl's law to achieve maximum speed up using N processors gives:&lt;br /&gt;&lt;br /&gt;Max Speed Up= ((Time for collision processing /Time for single frame)/N)&lt;br /&gt;&lt;br /&gt;Therefore:&lt;br /&gt;&lt;br /&gt;Speed up ((Time for Collisions/Time for Single frame), N)&lt;br /&gt;&lt;br /&gt;= 1/ (Serial + Max Speed Up)&lt;br /&gt;&lt;br /&gt;This is where N equals the number of processors on the machine designated to process the multithreaded application.&lt;br /&gt;&lt;br /&gt;This will then be compared to the actual speed up of the application gained through profiling the multithreaded application and calculated like so:&lt;br /&gt;&lt;br /&gt;Obtain the amount that the application has been speeded up by:&lt;br /&gt;&lt;br /&gt;Speed Multiplier= (Time for collision processing /Multithreaded collision time)&lt;br /&gt;&lt;br /&gt;Therefore you can find the amount of time for the multithreaded part of the program:&lt;br /&gt;&lt;br /&gt;Multithreaded part time= ((Time for collision processing/Time for single frame))/Speed Multiplier)&lt;br /&gt;&lt;br /&gt;(Where the Time for collisions and Time for single frame are from the single threaded application)&lt;br /&gt;&lt;br /&gt;And then applying Amdahl's law gives:&lt;br /&gt;&lt;br /&gt;Speed up ((Time for collisions/Time for single frame, Speed Multiplier)&lt;br /&gt;&lt;br /&gt;= 1/ (Serial+ Multithreaded part time)&lt;br /&gt;&lt;br /&gt;Additional considerations with respect to the amount of overhead for each application will also be taken into account when writing the conclusion.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Equipment&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;At minimum a single core PC to test the single threaded application and a multiple core machine to process the multithreaded application. Ideally the machine processing the multithreaded application should have a quad core processor.&lt;br /&gt;Additionally depending on the limits of the Visual Studio profiler a copy of Intel VTune may be required for accurate profiling.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Two main issues will have a major impact on this project:&lt;br /&gt;How the parallelism of the multithreaded application is handled&lt;br /&gt;How the working sets for the multithreaded application are created&lt;br /&gt;Currently there are three main ways that could be used to handle the parallelism of the multithreaded application:&lt;br /&gt;&lt;br /&gt;· Programming in C#&lt;br /&gt;· Using an OpenMP compliant Compiler (Pas 2008)&lt;br /&gt;· Using Intel’s SMOKE Framework (Grantir 2008)&lt;br /&gt;&lt;br /&gt;As it is highly possible that implementing this in C++ will be far too complex, these are the most likely candidates to be used. Each one of them will have an effect at some level on overheads.&lt;br /&gt;The implementation with the largest amount of overhead requiring a system that is heavily parallel would be using the SMOKE Framework but due to its basic design being for Computer Game applications it would be the most ideal. Programming the application in C# may remove the threading overhead meaning that the comparison of the overhead may be more straightforward than using another method. Compiling the application with an OpenMP compiler can give access to “Hardware Threads” which means that any overhead between the operating system and the application is effectively eliminated as these threads are run directly on the processor.&lt;br /&gt;&lt;br /&gt;Depending on what system is used to implement the multithreaded system there is also the problem with Amdahl’s Law in that it is theorised that the application being parallelised will have exclusive access to each of the processing cores. With threads being handled by windows there will always be other processes using the processor.&lt;br /&gt;&lt;br /&gt;The other main consideration is the creation of the working sets, based on the paper by Lewis &amp;amp; Massingill (2006); depending on the number of collision samples per second will depend on the size of each working set. Additionally if there is a large amount of spheres overlapping into many different working sets the multithreaded application could become even less efficient than the single threaded application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bibliography&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Turley, J 2006, ‘A Glimpse Inside The Cell Processor’, in Gamasutra, accessed 15th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/view/feature/2759/a_glimpse_inside_the_cell_processor.php"&gt;http://www.gamasutra.com/view/feature/2759/a_glimpse_inside_the_cell_processor.php&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Gabb, H &amp;amp; Lake, A 2005, ‘Threading 3D Game Engine Basics’, in Gamasutra, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/features/20051117/gabb_01.shtml"&gt;http://www.gamasutra.com/features/20051117/gabb_01.shtml&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Mönkkönen, V 2006, ‘Multithreaded Game Engine Architectures, in Gamasutra, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php"&gt;http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Paquet, P 2006, ‘Programming Multi-threaded Architectures: Interlocked Operations’, in Gamasutra, accessed 07th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/view/feature/2745/programming_multithreaded_.php"&gt;http://www.gamasutra.com/view/feature/2745/programming_multithreaded_.php&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Chalmers, A &amp;amp; Tidmus, J 1996, Practical Parallel Processing, International Thomson Computing Press, London, UK&lt;br /&gt;&lt;br /&gt;Shimer, C, Binary Space Partition Trees, in Worcester Polytechnic Institute Computer Science CS 563 '99 - Advanced Topics in Computer Graphics, accessed 05th November 2008 from &lt; &lt;a href="http://web.cs.wpi.edu/~matt/courses/cs563/talks/bsp/bsp.html"&gt;http://web.cs.wpi.edu/~matt/courses/cs563/talks/bsp/bsp.html&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Moore, G.E 1965, ‘Cramming more components onto integrated circuits’, from Intel Museum, accessed 20th October 2008, from &lt; &lt;a href="ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf"&gt;ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Sutter, H 2005, ‘A Fundamental Turn Toward Concurrency in Software’, in Dr. Dobb’s Portal, accessed 20th October 2008, from &lt; &lt;a href="http://www.ddj.com/architect/184405990"&gt;http://www.ddj.com/architect/184405990&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Dubash, M 2005, ‘Moore’s Law is dead, says Gordon Moore’, from Techworld, accessed 20th October 2008, from &lt; &lt;a href="http://www.techworld.com/opsys/news/index.cfm?NewsID=3477"&gt;http://www.techworld.com/opsys/news/index.cfm?NewsID=3477&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Hill, M.D. &amp;amp; Marty M.R. 2008, ‘Amdahl’s Law in the Multicore Era’, in IEEE Computer Society Digital Library, accessed 30th October 2008, from &lt; &lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209"&gt;http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Granatir, O 2008, ‘Performance Scaling With Cores: Introducing the SMOKE Framework’, in Gamasutra, accessed 28th November 2008, from &lt; &lt;a href="http://www.gamasutra.com/view/feature/3861/performance_scaling_with_cores_.php"&gt;http://www.gamasutra.com/view/feature/3861/performance_scaling_with_cores_.php&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Granatir, O 2008, ‘SMOKE – Game technology Demo’, in Intel what IF Experimental Software, accessed 28th November 2008, from &lt; &lt;a href="http://software.intel.com/en-us/articles/smoke-game-technology-demo"&gt;http://software.intel.com/en-us/articles/smoke-game-technology-demo&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Pas, R V D 2008, ‘An Overview of OpenMP 2.5’ in IWOMP Workshop, accessed 1st December 2008, from &lt; &lt;a href="http://cobweb.ecn.purdue.edu/ParaMount/iwomp2008/documents/3.Overview_OpenMP_HO.pdf"&gt;http://cobweb.ecn.purdue.edu/ParaMount/iwomp2008/documents/3.Overview_OpenMP_HO.pdf&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Lewis, M.C &amp;amp; Massingill, B.L, 2006, ‘Multithreaded Collision Detection in Java’, from World Congress in Computer Science, Computer Engineering and Applied Computing, accessed 15th October 2008, from &lt; &lt;a href="http://ww1.ucmss.com/books/LFS/CSREA2006/PDP4236.pdf"&gt;http://ww1.ucmss.com/books/LFS/CSREA2006/PDP4236.pdf&lt;/a&gt; &gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2513611769315983164?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2513611769315983164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2513611769315983164' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2513611769315983164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2513611769315983164'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/12/proposal-draft.html' title='Proposal Draft'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4714418669676252128</id><published>2008-12-01T13:31:00.002Z</published><updated>2008-12-01T13:49:49.062Z</updated><title type='text'>SMOKE Test</title><content type='html'>On saturday I went and downloaded the source for SMOKE in order to see how it worked. 4Gbs of tech demo later along with a copy of Havok 5.5 Programmer tools SDK it is finally working.&lt;br /&gt;&lt;br /&gt;On a Intel Dual Core 2.4 Ghz with an 86ooM GT graphics card with maximum threads running (two physical "hardware" threads) average FPS is around 15 or so. Cutting down to one thread further drops the frame rate to 8 or so. But heres the thing even at 8 FPS the camera and all controls were still responsive and the 3D scene was smoothe to navigate throught making the visibly apparent low frame rate in the scene bearable. From personal experence of using a PC with lower end graphics and processor harware a single threaded application that experiences a large scale frame rate drop like this can almost become unresponsive as input is only sampled once linking to how fast each frame can be completed.&lt;br /&gt;&lt;br /&gt;The Intel test rig from the stated requirements:&lt;br /&gt;&lt;br /&gt;CPU: Intel® Core™ 2 Quad Processor or better (Intel® Core™&gt; i7 recommend)&lt;br /&gt;GFX: NVIDIA 8800 GTS or better (Smoke was developed using 8800 GTS cards)&lt;br /&gt;OS: 32-bit Windows XP or Vista&lt;br /&gt;MEM: 2 GB of RAM of better&lt;br /&gt;Optional: Stereo speakers, Xbox 360 controller for Windows&lt;br /&gt;Software: Latest version of DirectX and .NET&lt;br /&gt;&lt;br /&gt;From the SMOKE overview video avaliable from &lt;a href="http://software.intel.com/en-us/articles/smoke-game-technology-demo"&gt;http://software.intel.com/en-us/articles/smoke-game-technology-demo&lt;/a&gt;&lt;br /&gt;on that test rig it runs around 60 FPS. The problem here is determining how much of the application is bottlenecked by either the graphics card or the CPU.&lt;br /&gt;Probably the next think that should be done with the Framework demo is to compile it in profiled mode on my own machine and find out where the bottleneck is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4714418669676252128?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4714418669676252128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4714418669676252128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4714418669676252128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4714418669676252128'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/12/smoke-test.html' title='SMOKE Test'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-5091650141105805962</id><published>2008-11-28T16:27:00.004Z</published><updated>2008-11-28T16:52:44.337Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenMP'/><category scheme='http://www.blogger.com/atom/ns#' term='SMOKE'/><category scheme='http://www.blogger.com/atom/ns#' term='Pillars of concurrenct'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>SMOKE N-way threading for games</title><content type='html'>Found an interesting article up on Gamasutra: &lt;a href="http://www.gamasutra.com/view/feature/3861/performance_scaling_with_cores_.php"&gt;Performance Scaling With Cores: Introducing the SMOKE Framework&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Overall intel's SMOKE framework is somewhat like the current application conjecture on the &lt;a href="http://honoursprojectio.blogspot.com/2008/10/speculation-on-possible-application.html"&gt;Threading Manager Post&lt;/a&gt;. Partially the article is to push intel's newly released core i7 processor and show off its performance but depending on how complex or complete the framework is it may prove to be an alternative to using OpenMP for creating the multithreaded application.&lt;br /&gt;The framework at a first glance from the &lt;a href="http://software.intel.com/en-us/articles/smoke-game-technology-demo"&gt;website&lt;/a&gt; seems that it will take care of discerning the maximum number of threads and physical processing cores which was a consideration if the system would need to be programmed from scratch. Additionally it also at first glance seems to adhere to the &lt;a href="http://www.ddj.com/architect/200001985"&gt;pillars of concurrency&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Depending on how invasive the framework is its an ideal candidtate to handle all threaded processing for each of the applications that this research question will require. Its a factor that using this framework may take away a lot of the depth presented by this research question but on the other side of that would be a justification of why this framework was used over OpenMP to produce the multithreaded application. A framework such as this would introduce a large amount of overhead when compaired to a single threaded application but it may be possible to argue that overheads such as this will become a necessity.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-5091650141105805962?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/5091650141105805962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=5091650141105805962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5091650141105805962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5091650141105805962'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/smoke-n-way-threading-for-games.html' title='SMOKE N-way threading for games'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7214268676437687636</id><published>2008-11-24T13:55:00.009Z</published><updated>2008-11-24T17:25:09.768Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='RQ presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='Overhead'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenMP'/><category scheme='http://www.blogger.com/atom/ns#' term='Amdhal&apos;s Law'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='Fixes'/><title type='text'>Additional considerations from the research Presentation</title><content type='html'>After performing the research presentation the following issues were asked about in the Q&amp;amp;A session:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How can you directly compare both the applications?&lt;/li&gt;&lt;li&gt;Are you aware of the overhead associated with building the working set for each thread?&lt;/li&gt;&lt;li&gt;Area or a volume, are you meaning a 2D or 3D simulation?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;How can you directly compare both the applications?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;I fumbled this question badly saying that it would all narrow down at some point. This was probably because the slides did not clearly explain how the applications would be compared.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Are you aware of the overhead associated with building the working set for each thread?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Before the presentation I had spent time thinking about &lt;a href="http://honoursprojectio.blogspot.com/2008/11/research-presentation.html"&gt;this&lt;/a&gt; so the questions wasn't too troublesome, there wasn't time to answer the question in as much detail as the blog post but hopefully the problems I had found were apparent.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Area or a volume, are you meaning a 2D or 3D simulation?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;This was purely my own fault for mixing up terminology. But this was covered easily by saying that if it was needed the application could be scaled back into 2D if the 3D approach caused too many problems.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Alterations&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;It is clear from this I may need to rethink a few parts of my research question and clarify how the applications would be compared.&lt;/p&gt;&lt;p&gt;In the presentation slides it states that the applications would be compared on theorised speed up obtained from the single threaded graphics application.&lt;/p&gt;&lt;p&gt;In order to find the percentage of the program that would be parallelised over one frame the code would be profiled to find out how long it spent calculating collisions on that frame. And the percentage of the program that would be parallelised would be found by dividing the time it took to process collision by the amount of time for one frame.&lt;/p&gt;&lt;p&gt;This can then be used to find how much of the program is performed in serial orderby doing:&lt;/p&gt;&lt;p&gt;Serial=(1-(Time for collisions/Time for single frame))&lt;/p&gt;&lt;p&gt;And applying Amdahl's law to achieve maximum speed up using N processors:&lt;/p&gt;&lt;p&gt;Max Speed Up=((Time for collisions/Time for single frame)/N)&lt;/p&gt;&lt;p&gt;Therefore:&lt;/p&gt;&lt;p&gt;Speed up( (Time for Collisions/Time for Single frame), N)&lt;/p&gt;&lt;p&gt;= 1/(Serial+Max Speed Up)&lt;/p&gt;&lt;p&gt;The problem when comparing is that unless collision is sampled every frame (highly unlikely, but it is usually the stance I take due to inexperience) it makes comparisons very difficult.&lt;/p&gt;&lt;p&gt;Assume that both applications are limited to 60 frames per second (in the multithreaded application only the main thread doing the rendering and such is frame limited).&lt;/p&gt;&lt;p&gt;Consider the single threaded application sampling collisions once every 10 frames and that there are no high speed collision problems (in that a collision could take place in-between collision samples). Every 10 frames there will be a performance spike in which the collision detections takes place, ideally this is the frame that would be sampled to give the amount of time that is spent calculating collision detection.&lt;/p&gt;&lt;p&gt;Now consider the multithreaded application that will sample at the same rate again with no high speed collision problems. Now instead of a single frame the multithreaded application will process collisions over a maximum of 10 frames before the next sample is due. Is it then fair to take a single frame when the collisions are being calculated in parallel and use that to calculate the speed up and thus give the performance or take the sum of the time spend on multithreaded calculations over the 10 frames? &lt;/p&gt;&lt;p&gt;Taking the time in one frame spent on multithreaded collision calculations here means that only a fraction of the calculations will be done this would be considered fair if all of the calculations could possibly be done by the multithreading system within this one frame but that cannot be guaranteed. Taking the time over all of the frames until either the multithreaded system signals that its finished or the next collision sample starts may mean with the working set of each thread possibly containing duplicates as explained in the blog post that was stated above may increase overall calculation time giving the impression that the multithreaded program is actually less efficient than the single threaded one.&lt;/p&gt;&lt;p&gt;Calculating the improvement would be:&lt;/p&gt;&lt;p&gt;The Serial part of the program will be as before in getting the expected performance improvement from the single threaded application.&lt;/p&gt;&lt;p&gt;Then obtain the amount that the application has been speeded up by:&lt;/p&gt;&lt;p&gt;Speed Multiplier= (Time for collisions/Multithreaded collision time)&lt;/p&gt;&lt;p&gt;Therefore you can find the amount of time for the multithreaded part of the program:&lt;/p&gt;&lt;p&gt;Multithreaded part time= ((Time for collisions/Time for single frame))/Speed Multiplier)&lt;/p&gt;&lt;p&gt;(Where the Time for collisions and Time for single frame are from the single threaded application)&lt;/p&gt;&lt;p&gt;And then applying Amdahl's law gives:&lt;/p&gt;&lt;p&gt;Speed up((Time for collisions/Time for single frame, Speed Multiplier)&lt;/p&gt;&lt;p&gt;= 1/(Serial+Multithreaded part time)&lt;/p&gt;&lt;p&gt;One of the most major considerations is that most of the material on parallel processing consider that the users program has exclusive access to the processor(s) at all times where with threading in windows all of the threads are handled by the operating system meaning that they are not strictly "Hardware Threads" (in that its a direct instruction pipeline like in the PS2 there are 3 possible Hardware Threads each with their own set of instructions on the EE) meaning that the operating system will handle any load imbalances between processing cores increasing overhead. OpenMP may provide access to a hardware thread but it is currently still being looked into.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Overheads&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Each of the applications will have some overhead, the single threaded application overhead being discerning which object is within the current BSP volume (fixed terminology there) and the multithreaded overhead being building the working set for each thread as well as the overhead associated with windows controlling the threads.&lt;/p&gt;&lt;p&gt;This would be a possible area of comparison as regardless of what is happening per frame the overhead is always there.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;As objects move on the single threaded application they may move into different BSP volumes thus need to be reclassified so that more detailed collision detection will occur for this object&lt;/li&gt;&lt;li&gt;Windows will always be managing the threading overhead (if the first frame starts a collision detection sample) with an additional overhead spike when the working sets for the next collision detection sample are created&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;With these two considerations taking into account it may be best to change the research question to something&lt;strong&gt; &lt;/strong&gt;along these lines:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;What are the Considerations with respect to Overhead and serialisation&lt;br /&gt;performance between a single threaded application and a multithreaded&lt;br /&gt;application where both are processing the same 3D scene where a large number of&lt;br /&gt;collisions are occurring?&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The problem with this like with my previous is that it is not clear that the single threaded application is using BSP to cull collisions and the multithreaded application processing collisions without any culling.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7214268676437687636?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7214268676437687636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7214268676437687636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7214268676437687636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7214268676437687636'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/additional-considerations-from-research.html' title='Additional considerations from the research Presentation'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8043575591495440789</id><published>2008-11-17T11:33:00.008Z</published><updated>2008-12-01T14:37:11.851Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='RQ presentation'/><category scheme='http://www.blogger.com/atom/ns#' term='Working set'/><title type='text'>Research Presentation</title><content type='html'>Today is the research presentations, heres the most recent version of what I will present along with the notes: [Link Removed, somone churned up all my bandwidth]&lt;br /&gt;&lt;br /&gt;After doing some dry runs of the project presentation as a group on friday from the presentation of &lt;a href="http://yeraveragejoe.blogspot.com/"&gt;http://yeraveragejoe.blogspot.com/&lt;/a&gt; hightlitghted somthing that hadn't been considered yet:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How to split up the collisions between various threads&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Initially it was hoped that reading on multithreaded theroy may provide a difinitve answer as how to split up all of the collision tasks but after hearing the project presentation from &lt;a href="http://yeraveragejoe.blogspot.com/"&gt;http://yeraveragejoe.blogspot.com/&lt;/a&gt; it may not be so straightforward as to pick one strategy as it seems to be highly situational depending on the application it is to be applied to. It also highlights that Collision Detection may not be inherently parallel but may require additional considerations for each application.&lt;/p&gt;&lt;p&gt;Multithreaded Collision Detection in Java (Lewis &amp;amp; Massingill 2006) highlights this problem stating that collision detection is sequential based on the time meaning that at any given time any object can collide with any other and is dependant on the previous collisions. This is then used to create the working set for each thread by finding all the particles that could collide within one time step and segregating them into different cells. Each cell is then processed by the threaded system.&lt;/p&gt;&lt;p&gt;The problem for porting this approach to the current project is that applying Callahan's first pillar of concurrency (Sutter 2007): that the application must be responsive to the user at all times means that collision detection parralelisation must allow the program to continue operation. This means that the size of each working set would be directly linked to how often collision detection is sampled. The lower the collision detection samples per frame the larger each working set for each thread would be.&lt;/p&gt;&lt;p&gt;An example:&lt;/p&gt;&lt;p&gt;A high volume of objects that can collide with each other in a 3D enviroment (assume that collision with the boundaries is inherent at the moment) each moving along a vector at 0.1 per frame on a 60 FPS application. That means in one second each object has the possibility of moving 6 units in any direction. Momentum is also preserved after each collision.&lt;/p&gt;&lt;p&gt;If collison detection is sampled every 10 frames that means that each working set will include anything within a 1 cubed area (with additional objects that could cross into the area such as objects that are not quite fully within the area). The more frequent the samples the smaller each working set. Sampling ever 5 frames would mean that each working set would contain everything within a 0.5 cubed area. Preserving momentum for each collision means that working sets will be a constant size at all times during the application.&lt;/p&gt;&lt;p&gt;This also assumes that a thread per object which upon using a high volume of objects would overwhelm the system with overhead. Additionally this assumes that collision detection processing will finish before or as the next sample interval starts.&lt;/p&gt;&lt;p&gt;It then may be possible to create processing cells for each object based on a certain interval based on inital position but then it is possible that objects that are far away from any other may be missed.&lt;/p&gt;&lt;p&gt;From this working set will become a major consideration and impact on performance depending on the amount of overhead used to create each threads working sets.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Lewis, M.C &amp;amp; Massingill, B.L, 2006, ‘Multithreaded Collision Detection in Java’, from World Congress in Computer Science, Computer Engineering and Applied Computing, accessed 15th October 2008, from &lt; &lt;a href="http://ww1.ucmss.com/books/LFS/CSREA2006/PDP4236.pdf"&gt;http://ww1.ucmss.com/books/LFS/CSREA2006/PDP4236.pdf&lt;/a&gt; &gt;&lt;/p&gt;&lt;p&gt;Sutter, H 2007, ‘The Pillars of Concurrency: Building a consistent mental model for reasoning about concurrency’, in Dr. Dobb’s Portal, accessed 20th October 2008, from &lt; &lt;a href="http://www.ddj.com/architect/200001985"&gt;http://www.ddj.com/architect/200001985&lt;/a&gt; &gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8043575591495440789?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8043575591495440789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8043575591495440789' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8043575591495440789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8043575591495440789'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/research-presentation.html' title='Research Presentation'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-5618557207633094580</id><published>2008-11-13T13:40:00.003Z</published><updated>2008-11-13T13:47:45.045Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Worksheet 4'/><category scheme='http://www.blogger.com/atom/ns#' term='feedback'/><category scheme='http://www.blogger.com/atom/ns#' term='additional thoughts'/><title type='text'>Worksheet 4 feedback</title><content type='html'>CS1004A-Honours Project Planning and Reporting&lt;br /&gt;Worksheet 4&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;&lt;br /&gt;With the current generation of game consoles and personal computers multiple processing cores are a standard but currently the industry is still adapting to the new technology. Collision detection can be one of the most time consuming processes within a computer game due to the number of objects that could be in a scene at any time that could collide with others, currently advanced algorithms are used to reduce the number of collision tests that may have to be performed at any point during the game but can the current expansion into multi-processor architecture make these techniques obsolete and provide more accurate collision simulation?&lt;br /&gt;&lt;br /&gt;The main focus of this research project will be on the ways to process collision detection in a multi-processor architecture using the threading system provided within windows. A performance comparison will be made between the multi-threaded application and the single threaded one to discern which one performs better.&lt;br /&gt;&lt;br /&gt;Issues&lt;br /&gt;&lt;br /&gt;Concurrency between threads processing large volumes of data&lt;br /&gt;Theorised speedup of the multi-threaded application defined by Ahmdal’s law compared to the actual application performance increase and reasons why this is the same or less than estimated.&lt;br /&gt;Scalability of large volume data processing over several threads&lt;br /&gt;Processing of exponential explosion of possible colliding objects&lt;br /&gt;&lt;br /&gt;Research question&lt;br /&gt;&lt;br /&gt;In comparison can a multi-threaded application outperform a single threaded application when both are rendering the same 3D scene where there are a large number of collision tests occurring?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Addressing the Question&lt;br /&gt;&lt;br /&gt;Two graphics applications need to be created:&lt;br /&gt;One single threaded application that will cull the number of collisions occurring in the scene to be processed using BSP&lt;br /&gt;A multi-threaded application that will process all collisions in the scene no matter their location&lt;br /&gt;Each will process a large number of collision tests using the methods described above, the objects colliding will be simple primitives. Colliding objects will be spaced equally through the scene.&lt;br /&gt;An external 3rd party library will be used to build the BSP trees required by the single threaded application. Because of how BSP will be used to cull collisions the area that the objects will collide in will have to be split into discreet areas that can be isolated into different sections of BSP. The area that will not cull any collisions will be defined by the location of the camera/viewer; any collisions outside this area will only collide with the external bounding of the area. Collision of the objects with the bounding of the areas will be defined by radial collision providing a quick calculation, collision between objects will be defined by axis aligned bounding boxes. As objects no matter of their location will collide with the bounding of each area there will be a constant number of collisions to server as a basic benchmark for each application. Each object after colliding with either the bounding of the area or another object will pick a semi realistic direction to rebound from the collision. Each collision will be elastic for each of the objects colliding meaning that objects in the scene should never stop moving. Collision detection will be performed after a certain number of frames&lt;br /&gt;&lt;br /&gt;From this application an average frame rate will be obtained and this frame rate used to obtain how long a single frame takes to process all the collision detection and rendering of the scene. Also the amount of time within one frame that is spent on processing collision detection will need to be found possibly by profiling the code. The amount of time for collision processing will be considered the % of the application per frame that the application can be parallelised. Thus the theorised speedup of the parallelisation of this application can be estimated using Ahmdal's Law (Hill &amp;amp; Marty 2008).&lt;br /&gt;&lt;br /&gt;After obtaining the theorised speed up the creation of the multi-threaded application will start. This will create the same scene as the multi-threaded application yet processes all of the collisions using a multi-threaded methodology obtained from research. The multi-threaded system should be scaleable to different processor configurations and be able to effectively split up the collisions into separate threads while preserving concurrency between them. Collisions will be processed after the same number of frames as the single threaded application but if by the next collision detection sample the application will either block and wait for all threads to finish processing the collision detection or will be discarded and start again with the current object positions (probably not advisable on discarding the current collision detection calculations).&lt;br /&gt;&lt;br /&gt;The time that it takes per frame will be obtained from the multi-threaded application and compared to the theorised speed up from the single threaded application depending on the results returned from the programs will answer the research questions taking into account the overhead, flexibility and feasibility over the BSP collision culling method.&lt;br /&gt;&lt;br /&gt;Additionally if time permits other testing scenarios could be devised in order to provide more situations where it may be possible that either application will perform better than the other.  Examples with the areas that the objects are colliding in could be:&lt;br /&gt;Where all the collisions are happening in a single BSP area&lt;br /&gt;Where collisions are more wide spread over a larger number of BSP areas&lt;br /&gt;As well as these changes to the area that the objects are colliding in also the number of colliding objects could be varied between a low, medium and high number of collision detections that could happen in the scene.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;I was wondering if you might want to investigate whether more complicated/accurate collision detection algorithms make an impact. They might make a difference in terms of altering the working set of the thread. I am sure there are well documented implementations available on the internet. Would things like scale of objects possibly make a difference as well?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Progress&lt;br /&gt;&lt;br /&gt;Currently a major amount of the multi-threading/parallel processing theory has been from online journal articles. This material (Sutter 2005) has lead to the theorisation of a threading manager system that would be used for the multi-threaded application that would handle:&lt;br /&gt;·        Creation and destruction of threads&lt;br /&gt;·        Keeping track of all running threads&lt;br /&gt;·        Splitting scaleable tasks into separate threads&lt;br /&gt;·        Returning the results of the processed threads to the main application&lt;br /&gt;&lt;br /&gt;Although this threading manager system provides a viable solution to the problem more research is required into the concurrency factor of this program as if each thread has a chance of locking data that could cause major performance problems making it pointless to parallelise the application. A possibly stumbling block may be the fact that within windows it will discern the best way to process the threads that the application creates and also that  most parallel processing theory is based on that a single application has exclusive access to all of the CPU(s) on a system.&lt;br /&gt;At the moment there is only once source that states that a threading manager of this nature would be the best implementation for solving the problems thus more research needs to be done to finalise this approach.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;Have you considered using the OpenMP (http://openmp.org/wp/) library, it provides a a variety of useful multithreading primitives. Might save you a bit of development time on the lower level stuff.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;A 3rd party library needs to be chosen for the single threaded application and depending of the BSP implementation may define the graphics API to be used to render the scene and the collisions.&lt;br /&gt;&lt;br /&gt;Current factors to answer the research questions (the amount of time required per frame and the theorised speed up using Amdahl’s Law) will need to be discussed with a technical supervisor in order to discern if they would carry enough weighting to answer the question to a satisfactory level. Additionally it will need to be taken into consideration the time to build the BSP trees and that the threaded application will be processing collision detection over a number of frames.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bibliography&lt;br /&gt;&lt;br /&gt;Sutter, H 2005, ‘A Fundamental Turn Towards Concurrency in Software’, in Dr. Dobb’s Portal, accessed 20th October 2008, from &lt; &lt;a href="http://www.ddj.com/architect/184405990"&gt;http://www.ddj.com/architect/184405990&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Hill, M.D. &amp;amp; Marty M.R. 2008, ‘Amdahl’s Law in the Multicore Era’, in IEEE Computer Society Digital Library, accessed 30th October 2008, from &lt; &lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209"&gt;http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;I’m not familiar with the BSP technique but conceptually it does seem like collision detection is something that should scale well across multiple cores.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Currently the only thought to how the threads would be handled was the possiblity of using C# but an additional implimentation using OpenMP might allow for the first iteration of the current concept discussed previously to be easily tested.&lt;/span&gt;&lt;br /&gt;As for more accurate collision detection a hight speed collision problem may be a worthwhile example to look into&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-5618557207633094580?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/5618557207633094580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=5618557207633094580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5618557207633094580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5618557207633094580'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/worksheet-4-feedback.html' title='Worksheet 4 feedback'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-5869282076647436567</id><published>2008-11-10T17:26:00.005Z</published><updated>2008-11-10T17:41:59.935Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='OD'/><category scheme='http://www.blogger.com/atom/ns#' term='4'/><category scheme='http://www.blogger.com/atom/ns#' term='worksheet'/><category scheme='http://www.blogger.com/atom/ns#' term='proposal'/><title type='text'>Worksheet 4</title><content type='html'>&lt;p&gt;&lt;strong&gt;CS1004A-Honours Project Planning and Reporting&lt;br /&gt;Worksheet 4&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;With the current generation of game consoles and personal computers multiple processing cores are a standard but currently the industry is still adapting to the new technology. Collision detection can be one of the most time consuming processes within a computer game due to the number of objects that could be in a scene at any time that could collide with others, currently advanced algorithms are used to reduce the number of collision tests that may have to be performed at any point during the game but can the current expansion into multi-processor architecture make these techniques obsolete and provide more accurate collision simulation?&lt;br /&gt;&lt;br /&gt;The main focus of this research project will be on the ways to process collision detection in a multi-processor architecture using the threading system provided within windows. A performance comparison will be made between the multi-threaded application and the single threaded one to discern which one performs better.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Concurrency between threads processing large volumes of data &lt;/li&gt;&lt;li&gt;Theorised speedup of the multi-threaded application defined by Ahmdal’s law compared to the actual application performance increase and reasons why this is the same or less than estimated.&lt;/li&gt;&lt;li&gt;Scalability of large volume data processing over several threads &lt;/li&gt;&lt;li&gt;Processing of exponential explosion of possible colliding objects &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Research question&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In comparison can a multi-threaded application outperform a single threaded application when both are rendering the same 3D scene where there are a large number of collision tests occurring?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Addressing the Question&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Two graphics applications need to be created:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;One single threaded application that will cull the number of collisions occurring in the scene to be processed using BSP &lt;/li&gt;&lt;li&gt;A multi-threaded application that will process all collisions in the scene no matter their location &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Each will process a large number of collision tests using the methods described above, the objects colliding will be simple primitives. Colliding objects will be spaced equally through the scene.&lt;br /&gt;An external 3rd party library will be used to build the BSP trees required by the single threaded application. Because of how BSP will be used to cull collisions the area that the objects will collide in will have to be split into discreet areas that can be isolated into different sections of BSP. The area that will not cull any collisions will be defined by the location of the camera/viewer; any collisions outside this area will only collide with the external bounding of the area. Collision of the objects with the bounding of the areas will be defined by radial collision providing a quick calculation, collision between objects will be defined by axis aligned bounding boxes. As objects no matter of their location will collide with the bounding of each area there will be a constant number of collisions to server as a basic benchmark for each application. Each object after colliding with either the bounding of the area or another object will pick a semi realistic direction to rebound from the collision. Each collision will be elastic for each of the objects colliding meaning that objects in the scene should never stop moving. Collision detection will be performed after a certain number of frames&lt;br /&gt;&lt;br /&gt;From this application an average frame rate will be obtained and this frame rate used to obtain how long a single frame takes to process all the collision detection and rendering of the scene. Also the amount of time within one frame that is spent on processing collision detection will need to be found possibly by profiling the code. The amount of time for collision processing will be considered the % of the application per frame that the application can be parallelised. Thus the theorised speedup of the parallelisation of this application can be estimated using Ahmdal's Law (Hill &amp;amp; Marty 2008).&lt;br /&gt;&lt;br /&gt;After obtaining the theorised speed up the creation of the multi-threaded application will start. This will create the same scene as the multi-threaded application yet processes all of the collisions using a multi-threaded methodology obtained from research. The multi-threaded system should be scaleable to different processor configurations and be able to effectively split up the collisions into separate threads while preserving concurrency between them. Collisions will be processed after the same number of frames as the single threaded application but if by the next collision detection sample the application will either block and wait for all threads to finish processing the collision detection or will be discarded and start again with the current object positions (probably not advisable on discarding the current collision detection calculations).&lt;br /&gt;&lt;br /&gt;The time that it takes per frame will be obtained from the multi-threaded application and compared to the theorised speed up from the single threaded application depending on the results returned from the programs will answer the research questions taking into account the overhead, flexibility and feasibility over the BSP collision culling method.&lt;br /&gt;&lt;br /&gt;Additionally if time permits other testing scenarios could be devised in order to provide more situations where it may be possible that either application will perform better than the other. Examples with the areas that the objects are colliding in could be: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Where all the collisions are happening in a single BSP area &lt;/li&gt;&lt;li&gt;Where collisions are more wide spread over a larger number of BSP areas &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;As well as these changes to the area that the objects are colliding in also the number of colliding objects could be varied between a low, medium and high number of collision detections that could happen in the scene.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Progress&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Currently a major amount of the multi-threading/parallel processing theory has been from online journal articles. This material (Sutter 2005) has lead to the theorisation of a threading manager system that would be used for the multi-threaded application that would handle:&lt;br /&gt;· Creation and destruction of threads&lt;br /&gt;· Keeping track of all running threads&lt;br /&gt;· Splitting scaleable tasks into separate threads&lt;br /&gt;· Returning the results of the processed threads to the main application&lt;br /&gt;&lt;br /&gt;Although this threading manager system provides a viable solution to the problem more research is required into the concurrency factor of this program as if each thread has a chance of locking data that could cause major performance problems making it pointless to parallelise the application. A possibly stumbling block may be the fact that within windows it will discern the best way to process the threads that the application creates and also that most parallel processing theory is based on that a single application has exclusive access to all of the CPU(s) on a system.&lt;br /&gt;At the moment there is only once source that states that a threading manager of this nature would be the best implementation for solving the problems thus more research needs to be done to finalise this approach.&lt;br /&gt;&lt;br /&gt;A 3rd party library needs to be chosen for the single threaded application and depending of the BSP implementation may define the graphics API to be used to render the scene and the collisions.&lt;br /&gt;&lt;br /&gt;Current factors to answer the research questions (the amount of time required per frame and the theorised speed up using Amdahl’s Law) will need to be discussed with a technical supervisor in order to discern if they would carry enough weighting to answer the question to a satisfactory level. Additionally it will need to be taken into consideration the time to build the BSP trees and that the threaded application will be processing collision detection over a number of frames.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bibliography&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Sutter, H 2005, ‘A Fundamental Turn Towards Concurrency in Software’, in Dr. Dobb’s Portal, accessed 20th October 2008, from &lt; &lt;a href="http://www.ddj.com/architect/184405990"&gt;http://www.ddj.com/architect/184405990&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Hill, M.D. &amp;amp; Marty M.R. 2008, ‘Amdahl’s Law in the Multicore Era’, in IEEE Computer Society Digital Library, accessed 30th October 2008, from &lt; &lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209"&gt;http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209&lt;/a&gt; &gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-5869282076647436567?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/5869282076647436567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=5869282076647436567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5869282076647436567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/5869282076647436567'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/worksheet-4.html' title='Worksheet 4'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1489920908999759918</id><published>2008-11-10T16:35:00.009Z</published><updated>2008-11-10T17:00:55.069Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='deliverables'/><title type='text'>Deliverables thoughts</title><content type='html'>Something to think about would be the minimum deliverables required to submit at the end of this research project first thoughts would be as follows:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Minimum submission: Single threaded application with theorised application performance increase upon parallelisation of collision detection. As well as possible non working multi-threaded application.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Mid range submission: Single threaded application and multi-threaded application along with a comparison between theorised increase in performance against actual performance increase (or decrease)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;High range submission: Single threaded application and multi-threaded application complete. A comparison between theorised performance increase against actual performance increase under different circumstances (different scenes and number of collisions occurring) providing an overall view of where its possible that multi-threading may have advantages over a more complex culling technique or vies-versa.&lt;/li&gt;&lt;/ul&gt;Worksheet 4 is also currently done and will be up after a re-read&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1489920908999759918?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1489920908999759918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1489920908999759918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1489920908999759918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1489920908999759918'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/deliverables-thoughts.html' title='Deliverables thoughts'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2443737473394644052</id><published>2008-11-05T14:59:00.003Z</published><updated>2008-11-05T15:05:28.372Z</updated><title type='text'>Worksheet 3 feedback</title><content type='html'>CS1004-Honours Project Planning and Reporting&lt;br /&gt;Worksheet 3&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;&lt;a style="mso-comment-reference: 'Jonathon _1'"&gt;&lt;/a&gt;&lt;a language="JavaScript" class="msocomanchor" id="_anchor_1" onmouseover="msoCommentShow('_anchor_1','_com_1')" onmouseout="msoCommentHide('_com_1')" href="http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html#_msocom_1" name="_msoanchor_1"&gt;[Jonathon 1]&lt;/a&gt; To discern if more complex collision culling techniques can be made obsolete by the current generation of multiple processor architectures.&lt;br /&gt;&lt;br /&gt;Motivation&lt;br /&gt;The current generation of home computer processors and games consoles all make extended use of multiple processor computer architectures yet within the PC market computer applications are only just beginning to take full advantage of this. The current shift into parallel processing has been triggered by the industry starting to reach the limits of Moore’s law (Dubash 2005), in a multiple processor architecture Moore’s law does not apply and instead the limitations of a multi-processor architecture are governed by Amdahl’s law (Hill &amp;amp; Marty 2008). This shift in processor architectures changes the entire way that applications that are designed. Collision detection is possibly one of the best examples of an operation that would be easily offloaded and scaled to multiple processor architecture through using one of the base principles of concurrency of scaling small repetitive tasks that are not essential to program operation (Sutter 2007). Removing the culling of collisions based on certain conditions would increase the accuracy of simulations making them seem more realistic.&lt;br /&gt;&lt;br /&gt;Research question&lt;br /&gt;&lt;a style="mso-comment-reference: 'Jonathon _2'"&gt;&lt;/a&gt;&lt;a language="JavaScript" class="msocomanchor" id="_anchor_2" onmouseover="msoCommentShow('_anchor_2','_com_2')" onmouseout="msoCommentHide('_com_2')" href="http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html#_msocom_2" name="_msoanchor_2"&gt;[Jonathon 2]&lt;/a&gt; In comparison can a multi-threaded application on a multiple processor architecture processing a large volume of collisions in a brute force method out perform a single threaded application processing the same number of collisions using a more advanced collision culling technique?&lt;br /&gt;&lt;br /&gt;Addressing the Question&lt;br /&gt;&lt;a style="mso-comment-reference: 'Jonathon _3'"&gt;&lt;/a&gt;&lt;a language="JavaScript" class="msocomanchor" id="_anchor_3" onmouseover="msoCommentShow('_anchor_3','_com_3')" onmouseout="msoCommentHide('_com_3')" href="http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html#_msocom_3" name="_msoanchor_3"&gt;[Jonathon 3]&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Two applications will be created:&lt;br /&gt;One multi-threaded application using a threading methodology created through research of multi-threading theory&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A single threaded application that will use BSP to cull the number of collisions tests happening.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Each application will render an area with different sections each with a high number of collision detections happening within them. The different areas are to allow the single threaded application to effectively use BSP collision culling.&lt;br /&gt;Collision occurring will be simple radius collision or axis aligned bounding box collision. The multi-threaded application will process all collisions at all times while the single threaded application will only process collisions between the separate objects when in the same BSP area as the viewer. If the objects are out with the BSP area of the viewer only collision with the bounding of the area the object is in will occur.&lt;br /&gt;The applications will be assessed on their performance under these conditions; additionally a system may be created to allow the user to see the thread utilisation and additional information that will be used to make the comparison.&lt;br /&gt;It’s undecided at the moment if Direct X D3D or Open GL will be used to display the graphics side of the application.&lt;br /&gt;&lt;br /&gt;Resource Requirements&lt;br /&gt;At minimum a single core machine about the level of a mid range P4 and a dual core machine to ensure that the single threaded application’s operations are only being processed on a single core.&lt;br /&gt;&lt;br /&gt;References and Bibliography&lt;br /&gt;&lt;br /&gt;Wilson, K 2006, ‘Managing Concurrency: Latent Futures, Parallel Lives’; from Game Architect.net, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamearchitect.net/Articles/ManagingConcurrency1.html"&gt;http://www.gamearchitect.net/Articles/ManagingConcurrency1.html&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Moore, G.E 1965, ‘Cramming more components onto integrated circuits’, from Intel Museum, accessed 20th October 2008, from &lt; &lt;a href="ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf"&gt;ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Dubash, M 2005, ‘Moore’s Law is dead, says Gordon Moore’, from Techworld, accessed 20th October 2008, from &lt; &lt;a href="http://www.techworld.com/opsys/news/index.cfm?NewsID=3477"&gt;http://www.techworld.com/opsys/news/index.cfm?NewsID=3477&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Hill, M.D. &amp;amp; Marty M.R. 2008, ‘Amdahl’s Law in the Multicore Era’, in IEEE Computer Society Digital Library, accessed 30th October 2008, from &lt; &lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209"&gt;http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Sutter, H 2007, ‘The Pillars of Concurrency: Building a consistent mental model for reasoning about concurrency’, in Dr. Dobb’s Portal, accessed 20th October 2008, from &lt; &lt;a href="http://www.ddj.com/architect/200001985"&gt;http://www.ddj.com/architect/200001985&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Gabb, H &amp;amp; Lake, A 2005, ‘Threading 3D Game Engine Basics’, in Gamasutra, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/features/20051117/gabb_01.shtml"&gt;http://www.gamasutra.com/features/20051117/gabb_01.shtml&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Mönkkönen, V 2006, ‘Multithreaded Game Engine Architectures, in Gamasutra, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php"&gt;http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_msocom_1"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a class="msocomoff" href="http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html#_msoanchor_1"&gt;[Jonathon 1]&lt;/a&gt;Nice. Definitely a good idea&lt;br /&gt;&lt;a name="_msocom_2"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a class="msocomoff" href="http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html#_msoanchor_2"&gt;[Jonathon 2]&lt;/a&gt;The idea behind the question is sound but the wording is pretty jumbled. Might be an idea to completely re-structure the question to make it easier to read.&lt;br /&gt;&lt;a name="_msocom_3"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a class="msocomoff" href="http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html#_msoanchor_3"&gt;[Jonathon 3]&lt;/a&gt;I don't know if you've already thought of this but to save time you could use some form of library (DLL ?) for the collision routines and just load in either the multi-threaded or single threaded versions depending on the system. Just a suggestion.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;So the main points I need to think about is restructuring the question and creating a DLL or Lib in order to cut creation time. I was hoping to be able to use a library for the collision culling technique but hadn't actualy thought too much about doing the same for the collision which ofcourse will be the same accross both applications.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2443737473394644052?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2443737473394644052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2443737473394644052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2443737473394644052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2443737473394644052'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/worksheet-3-feedback.html' title='Worksheet 3 feedback'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7928393043881599344</id><published>2008-11-03T12:02:00.001Z</published><updated>2008-11-03T12:05:15.281Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='requirements'/><category scheme='http://www.blogger.com/atom/ns#' term='reasons'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='Question'/><category scheme='http://www.blogger.com/atom/ns#' term='3'/><category scheme='http://www.blogger.com/atom/ns#' term='motivation'/><category scheme='http://www.blogger.com/atom/ns#' term='worksheet'/><title type='text'>Worksheet 3</title><content type='html'>&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;To discern if more complex collision culling techniques can be made obsolete by the current generation of multiple processor architectures.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Motivation&lt;/strong&gt;&lt;br /&gt;The current generation of home computer processors and games consoles all make extended use of multiple processor computer architectures yet within the PC market computer applications are only just beginning to take full advantage of this. The current shift into parallel processing has been triggered by the industry starting to reach the limits of Moore’s law (Dubash 2005), in a multiple processor architecture Moore’s law does not apply and instead the limitations of a multi-processor architecture are governed by Amdahl’s law (Hill &amp;amp; Marty 2008). This shift in processor architectures changes the entire way that applications that are designed.  Collision detection is possibly one of the best examples of an operation that would be easily offloaded and scaled to multiple processor architecture through using one of the base principles of concurrency of scaling small repetitive tasks that are not essential to program operation (Sutter 2007). Removing the culling of collisions based on certain conditions would increase the accuracy of simulations making them seem more realistic.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Research question&lt;/strong&gt;&lt;br /&gt;In comparison can a multi-threaded application on a multiple processor architecture processing a large volume of collisions in a brute force method out perform a single threaded application processing the same number of collisions using a more advanced collision culling technique?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Addressing the Question&lt;/strong&gt;&lt;br /&gt;Two applications will be created:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;One multi-threaded application using a threading methodology created through research of multi-threading theory&lt;/li&gt;&lt;li&gt;A single threaded application that will use BSP to cull the number of collisions tests happening.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;Each application will render an area with different sections each with a high number of collision detections happening within them. The different areas are to allow the single threaded application to effectively use BSP collision culling.&lt;br /&gt;Collision occurring will be simple radius collision or axis aligned bounding box collision. The multi-threaded application will process all collisions at all times while the single threaded application will only process collisions between the separate objects when in the same BSP area as the viewer. If the objects are out with the BSP area of the viewer only collision with the bounding of the area the object is in will occur.&lt;br /&gt;The applications will be assessed on their performance under these conditions; additionally a system may be created to allow the user to see the thread utilisation and additional information that will be used to make the comparison.&lt;br /&gt;It’s undecided at the moment if Direct X D3D or Open GL will be used to display the graphics side of the application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Resource Requirements&lt;br /&gt;&lt;/strong&gt;At minimum a single core machine about the level of a mid range P4 and a dual core machine to ensure that the single threaded application’s operations are only being processed on a single core.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References and Bibliography&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Wilson, K 2006, ‘Managing Concurrency:  Latent Futures, Parallel Lives’; from &lt;em&gt;Game Architect.net&lt;/em&gt;, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamearchitect.net/Articles/ManagingConcurrency1.html"&gt;http://www.gamearchitect.net/Articles/ManagingConcurrency1.html&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Moore, G.E 1965, ‘Cramming more components onto integrated circuits’, from &lt;em&gt;Intel Museum&lt;/em&gt;, accessed 20th October 2008, from &lt; &lt;a href="ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf"&gt;ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Dubash, M 2005, ‘Moore’s Law is dead, says Gordon Moore’, from &lt;em&gt;Techworld&lt;/em&gt;, accessed 20th October 2008, from &lt; &lt;a href="http://www.techworld.com/opsys/news/index.cfm?NewsID=3477"&gt;http://www.techworld.com/opsys/news/index.cfm?NewsID=3477&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Hill, M.D. &amp;amp; Marty M.R. 2008, ‘Amdahl’s Law in the Multicore Era’, in &lt;em&gt;IEEE Computer Society Digital Library&lt;/em&gt;, accessed 30th October 2008, from &lt; &lt;a href="http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209"&gt;http://www2.computer.org/portal/web/csdl/doi/10.1109/MC.2008.209&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Sutter, H 2007, ‘The Pillars of Concurrency: Building a consistent mental model for reasoning about concurrency’, in &lt;em&gt;Dr. Dobb’s Portal&lt;/em&gt;, accessed 20th October 2008, from &lt; &lt;a href="http://www.ddj.com/architect/200001985"&gt;http://www.ddj.com/architect/200001985&lt;/a&gt; &gt;&lt;br /&gt;&lt;br /&gt;Gabb, H &amp;amp; Lake, A 2005, ‘Threading 3D Game Engine Basics’, in &lt;em&gt;Gamasutra&lt;/em&gt;, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/features/20051117/gabb_01.shtml"&gt;http://www.gamasutra.com/features/20051117/gabb_01.shtml&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt;Mönkkönen, V 2006, ‘Multithreaded Game Engine Architectures, in &lt;em&gt;Gamasutra&lt;/em&gt;, accessed 20th October 2008, from &lt; &lt;a href="http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php"&gt;http://www.gamasutra.com/view/feature/1830/multithreaded_game_engine_.php&lt;/a&gt;&gt;&lt;br /&gt;&lt;br /&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7928393043881599344?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7928393043881599344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7928393043881599344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7928393043881599344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7928393043881599344'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/11/worksheet-3.html' title='Worksheet 3'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8342985379028933392</id><published>2008-10-30T14:17:00.004Z</published><updated>2008-10-30T14:37:36.107Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='Question'/><category scheme='http://www.blogger.com/atom/ns#' term='3'/><category scheme='http://www.blogger.com/atom/ns#' term='worksheet'/><title type='text'>Worksheet 3 and Research Questions</title><content type='html'>Currently doing Worksheet 3 in preperation for the Research Question presentations within the next two weeks.&lt;br /&gt;&lt;br /&gt;One thing that has come up from writing the worksheet is a more solid research question:&lt;br /&gt;&lt;br /&gt;In comparison can a multi-threaded application on a multiple processor architecture processing a large volume of collisions in a brute force method out perform a single threaded application processing collisions using a more advanced collision culling technique?&lt;br /&gt;&lt;br /&gt;Worksheet 3 should be up on here in the next couple of days as well as sent off for annotation.&lt;br /&gt;My most recent meeting with my technical supervisor has confirmed ideas that I thought of to define my areas of research.&lt;br /&gt;Additionally our blogs are shifting internal into webspace provided by the university so no idea whats going to happen to this blog once that happens.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8342985379028933392?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8342985379028933392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8342985379028933392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8342985379028933392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8342985379028933392'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/worksheet-3-and-research-questions.html' title='Worksheet 3 and Research Questions'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6337177732502246393</id><published>2008-10-27T15:20:00.005Z</published><updated>2008-10-27T16:15:20.959Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pillars of concurrenct'/><category scheme='http://www.blogger.com/atom/ns#' term='getting ahead of myself'/><category scheme='http://www.blogger.com/atom/ns#' term='threaded application'/><title type='text'>Speculation on a possible application</title><content type='html'>After reading &lt;a href="http://www.ddj.com/architect/200001985"&gt;Dr Dobb's Journal: The Pillars of Concurrency&lt;/a&gt; I've been thinking about the actualy application that will be created to proof the multithreading aspect of this research project. Possibly quite a lot of this is speculation along with the small amount of knowledge on the subject from a 2nd year module: Computer Operating Enviroments. As well as this may be getting too far ahead of where the current focus should be: defining the research question and topics.&lt;br /&gt;&lt;br /&gt;The original idea for the application was that collision would be split from the main thread of the application (rendering,AI, game logic) and processed by threads based on a method obtained from research.&lt;br /&gt;The article above states there are three main aspecs of multithreaded applications:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The application is always responsive to the user&lt;/li&gt;&lt;li&gt;Aspects of the application are scaleable over multiple processors/threads to increase throughput &lt;/li&gt;&lt;li&gt;Application resources are shaired safely between threads&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The original idea above would only cover two of these aspects 1 and 3. Application responsiveness is gained throught extracting the possible and the shairing of resources safely must be planned for inhernetly between threads otherwise the application will run into major problems.&lt;/p&gt;&lt;p&gt;Aspect 2 is not catered for in this application. For a PC with a dual core processor this approach fufills aspect 2 but if more than two cores are present on the system the application will not take advantage of the additional cores itself. Alterting the application so that the collision is processed by a Threading Manager would help to solve this problem.&lt;/p&gt;&lt;p&gt;A Threading Manager would allow the application to scale to multiple processors inherently but comes with its own problems. &lt;/p&gt;&lt;p&gt;Capabilites of a Threading Manager (assuming that each thread will be processing the same sort of data) :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Creation and destruction of threads&lt;/li&gt;&lt;li&gt;Keep track of all running threads&lt;/li&gt;&lt;li&gt;Splitting scaleable tasks into seperate threads&lt;/li&gt;&lt;li&gt;Returning the results of the processed threads to the main application&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Things that need to be thought about for a Threading Manager:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;What is the goal of each thread?&lt;/li&gt;&lt;li&gt;How can the maximum number of threads be defined?&lt;/li&gt;&lt;li&gt;How can scaleable jobs be split into threads?&lt;/li&gt;&lt;li&gt;How will data be returned to the main application thread?&lt;/li&gt;&lt;li&gt;How will concurrency be preserved between the main application thread and the Threading Manager's thread pool?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Programming characteristics :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Portable&lt;/li&gt;&lt;li&gt;Adaptable for different tasks&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In order to be adaptable for different tasks it will be necessary to have the user program small protable functions to load, process the data and then pass the data back to the main program. From there the Threading Manager would utilise those functions to process all of the scaleable tasks. Additionally this may mean that it would be possible to have the Threading Manager process many different types of scaleable tasks in different ways at the same time.&lt;/p&gt;&lt;p&gt;In order to refocus after this detour I will need to read the article that inspired this project again and reconsider how to define the reasons that collision would be suitable as the a scaleable part of the application.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6337177732502246393?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6337177732502246393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6337177732502246393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6337177732502246393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6337177732502246393'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/speculation-on-possible-application.html' title='Speculation on a possible application'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-1104455107327469796</id><published>2008-10-20T13:24:00.003+01:00</published><updated>2008-10-20T14:07:44.470+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reasons'/><category scheme='http://www.blogger.com/atom/ns#' term='proposal'/><category scheme='http://www.blogger.com/atom/ns#' term='terminology check'/><title type='text'>Some reasons why</title><content type='html'>As part of the proposal I will need to justify my research topic.&lt;br /&gt;Essentially my topic requires two areas to be justified:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Why Multiprocessor architecture?&lt;/li&gt;&lt;li&gt;Why Collision?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The first is easily justified through looking at Moore's Law (&lt;a href="http://en.wikipedia.org/wiki/Moores_law"&gt;http://en.wikipedia.org/wiki/Moores_law&lt;/a&gt;) which states that the number of transistors on a microchip will increase exponentially doulbing the number every two years. This has mostly stayed true since it was theorised in a paper in 1965(&lt;a href="ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf"&gt;ftp://download.intel.com/museum/Moores_Law/Articles-Press_Releases/Gordon_Moore_1965_Article.pdf&lt;/a&gt;). &lt;/p&gt;&lt;p&gt;The problem occurs when the limits of this law are reached and the size of transistors on a microchip are on the atomic scale with the current chip fabrication process. This means that making the transistors any smaller will impede the electric current meaning that electrons can not flown throught the microchip. Until another fabrication process becomes cost effective comparied to the current one ,once the limit is reached , multiple microchip architectures will be one of the ways to increase performance. Already the current generation of microprocessor chips consist of two or more seperate processing 'cores'.&lt;/p&gt;&lt;p&gt;But increasing the number of processing 'cores' on a microchip creates its own problems with concurrency and organisation of data. This is one of the problems that will need to be addressed in the creation of the test applications.&lt;/p&gt;&lt;p&gt;Collision detection still needs defined as this will be the first thing that will be questioned.&lt;/p&gt;&lt;p&gt;Additionally the research question still needs to be looked at and changed from an aim to be more focused as a question.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-1104455107327469796?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/1104455107327469796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=1104455107327469796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1104455107327469796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/1104455107327469796'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/some-reasons-why.html' title='Some reasons why'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2081683676331626810</id><published>2008-10-15T13:35:00.004+01:00</published><updated>2008-10-15T13:41:24.104+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Question'/><category scheme='http://www.blogger.com/atom/ns#' term='worksheet'/><category scheme='http://www.blogger.com/atom/ns#' term='2'/><title type='text'>Worksheet 2 Initial comments</title><content type='html'>Just got the first set of comments back on worksheet 2:&lt;br /&gt;On the research Question:&lt;br /&gt;&lt;br /&gt;Good but this seems more of an aim rather than a research question. Try and see if you could possible reduce it down a bit more.&lt;br /&gt;&lt;br /&gt;On the Project focus, infomation and experemental work:&lt;br /&gt;&lt;br /&gt;Seems all ok. You know what information you need to research up on and how to implement this information into an application.&lt;br /&gt;&lt;br /&gt;On interperting the results:&lt;br /&gt;&lt;br /&gt;Sounds good. Like the idea of having the two applications so you can compare the differences between the two. Also gives you something to write up on in your report.&lt;br /&gt;&lt;br /&gt;So the main thing I need to concetrate on is fixing the research question.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2081683676331626810?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2081683676331626810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2081683676331626810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2081683676331626810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2081683676331626810'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/worksheet-2-initial-comments.html' title='Worksheet 2 Initial comments'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-588667894910086324</id><published>2008-10-14T15:59:00.004+01:00</published><updated>2008-10-14T16:27:01.869+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Death Omen Star'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='proposal'/><title type='text'>Reading material</title><content type='html'>It looks like that there may not be many articles dedicated to multi threading the processing of collision detection. This means that standard multithreading theroy should be researched and then applied to processing collision detection.&lt;br /&gt;&lt;br /&gt;The other glaring problem is when presenting to the panel for the proposal the first thing they will question is "Why Collision Detection processing?". There really needs to be a good reason for doing this approach.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-588667894910086324?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/588667894910086324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=588667894910086324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/588667894910086324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/588667894910086324'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/reading-material.html' title='Reading material'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-7664540603144685606</id><published>2008-10-12T14:01:00.000+01:00</published><updated>2008-10-12T14:03:37.241+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Question'/><category scheme='http://www.blogger.com/atom/ns#' term='worksheet'/><category scheme='http://www.blogger.com/atom/ns#' term='2'/><title type='text'>Worksheet 2</title><content type='html'>&lt;strong&gt;1. Formulate a research question for your project. Details on the research question can be found in presentation 1 in the module folder.&lt;/strong&gt;&lt;br /&gt;With the current generation of game consoles and personal computers multiple processing cores are a standard but currently the industry is still adapting to the new technology. Collision detection can be one of the most time consuming processes within a computer game due to the number of objects that could be in a scene at any time that could collide with others, currently advanced algorithms are used to reduce the number of collision tests that may have to be performed at any point during the game but can the current expansion into multi-processor architecture make these techniques obsolete?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. When developing a research question you must produce a question that can be answered by performing literature research, practical experimentation and critical analysis.  The question should also focus the activities of your project.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;a)      What is the focus of your project?&lt;br /&gt;The processing (threading in this case) of collision detection within a game engine&lt;br /&gt;b)      What information do you need to find out about?&lt;br /&gt;Are there any current threading methodologies that have been used to perform this? Different collision culling techniques to compare to.&lt;br /&gt;c)      What Experimental work do you need to perform?&lt;br /&gt;Create a multi threaded application that tests every object in the scene for collision creating an exponential amount of collision tests. Two or three different approaches will be considered but its possible only one approach will be created. Also create a single threaded application that uses a more complex collision culling method.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. How will the information that you obtain in 2 allow you to answer the research question?&lt;/strong&gt;&lt;br /&gt;The research into different threading methodologies will allow view of what is possible but from there either thought reading on other peoples work on implementing these methodologies or actually attempting to prototype them before creating the final multi threaded application will allow me to answer the question. Between the threaded and non-threaded version a comparison will be possible comparing CPU usage and frame rate of the each application. Other criteria for assessing both applications will be needed, this may include considering the overhead required for each method and other requirements. It may be best to set a scenario first of all with certain criteria such as a game engine that will be handling a high number of collisions per frame, the target platform is a standard users PC which will use an average price dual core processor and 2Gb of RAM. Problems will be apparent with simulation of the resources used by additional processes such as AI and Rendering.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-7664540603144685606?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/7664540603144685606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=7664540603144685606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7664540603144685606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/7664540603144685606'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/worksheet-2.html' title='Worksheet 2'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-8376896814743379083</id><published>2008-10-08T16:37:00.007+01:00</published><updated>2008-10-11T19:56:59.584+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Issue1'/><category scheme='http://www.blogger.com/atom/ns#' term='Provisional'/><category scheme='http://www.blogger.com/atom/ns#' term='Question'/><title type='text'>Provisional Research Question v0.5</title><content type='html'>Currently running through worksheet 2 at the moment after having a meeting with Mr Bett about proposed research for my honours project.&lt;br /&gt;The research topic seems to be ok with the only glaring problem may be that its too clean cut to provide an interesting discussion.&lt;br /&gt;Additional things I have to think about that might have a major impact on the probject would be&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The effects of other game processes on the collision threading (AI/Rendering/ect)&lt;/li&gt;&lt;li&gt;C# may be preferable if C++ proves too complex with the concurency&lt;/li&gt;&lt;li&gt;PS3 a large chance is that this would be an example of further research but depending on how the research and creation of the proof tests it may be a point to think about&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Things still to think about:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;What approaches to multi-threading? (2-3 possibly)&lt;/li&gt;&lt;li&gt;What collision culling technique to use for the single threaded model&lt;/li&gt;&lt;li&gt;How many collision tests per frame would be considered "High Volume"&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Hopfully during the research it will narrow down to a single viable threaded approach so that the comparison will be between that approach and the single threaded more complex algorithm.&lt;/p&gt;&lt;p&gt;On some thought to the collision culling technique for the single threaded model, it may be best to research a technique and then use an open source library that will perform this function in order to reduce the amount of time spent creating the single threaded application.&lt;/p&gt;&lt;p&gt;Another thing to rember that the main body of research is not into collision techniques but into how that a multi-processor architecture can process a large number of operations without effecting performance too drasticly.&lt;/p&gt;&lt;p&gt;Should have an actual Provisional Research Question later on this week.&lt;/p&gt;&lt;p&gt;Additional thought 1: Why Collision? Why not rendering or AI?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-8376896814743379083?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/8376896814743379083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=8376896814743379083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8376896814743379083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/8376896814743379083'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/provisional-research-question.html' title='Provisional Research Question v0.5'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6148006552915012896</id><published>2008-10-06T14:37:00.004+01:00</published><updated>2008-10-06T15:19:13.151+01:00</updated><title type='text'>Worksheet 1 Final Feedback</title><content type='html'>Finaly I got the final feeback from worksheet 1. Its as Follows:&lt;br /&gt;I think this has been well commented.  I like the first topic certainly sounds very interesting. Can you talk to Mr Bett/Dr H Fortuna about the first and the second one please.  I am not too sure about the third one though.&lt;br /&gt;&lt;br /&gt;Definiately the first issue was the most thought throught and would be the one I would possibly push for creating a question for as much as possible. The second issue would be the less interesting but possible easier to discern whats quantifiable from the project. As for the third issue it was rushed and wasn't really considered as a possibilty, it was mostly there to flesh out the worksheet and give a third option that was hugely different from the other two.&lt;br /&gt;&lt;br /&gt;Next thing to do would be to get in touch with one of my provisional technical supervisors with a selection of questions about each of the first two issues. Hopfuly I can get a meeting quickly and then begin to form the questions for the basis of worksheet 2. As well as this Friday the internet should be restored at my flat allowing easier searching for technical papers on the subject in my own time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6148006552915012896?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6148006552915012896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6148006552915012896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6148006552915012896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6148006552915012896'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/worksheet-1-final-feedback.html' title='Worksheet 1 Final Feedback'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-2426806349199111807</id><published>2008-10-03T14:07:00.003+01:00</published><updated>2008-10-03T14:20:48.699+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis Question Topic  Bsc Honours'/><category scheme='http://www.blogger.com/atom/ns#' term='Issue 1'/><category scheme='http://www.blogger.com/atom/ns#' term='collision'/><title type='text'>Issue 1 Resolver</title><content type='html'>I've been thinking about issue one on worksheet 1 (see prev posts) and have thought of a way to extend it.&lt;br /&gt;&lt;br /&gt;A comparison between two methods of optimising collision detection. Both applications will have to process a high number of collision tests within either 2d or 3d space. One application will use a brure force approach checking every object against every other object, the collision of the objects will be processed by a threaded system and then be returned to the main program. The other application will use a more complex collision culling algorithm such as BSP trees before performing the collision tests. The main research areas of this project would be into creating a multi threaded system for a collision engine and different types of collision culling. Factors contributing to the evaluation of each approach would be : application performace defined by the number of frames rendered per second, ease of implimentation, overhead required required for each approach and technical considerations.&lt;br /&gt;&lt;br /&gt;Of course it may not be feasable to compair these two implimentations and thus it may be better to compair several different types of collision culling but worksheet 2 is due in by the 12th oct and I'm still to get additional feedback on worksheet one from my lecturer&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-2426806349199111807?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/2426806349199111807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=2426806349199111807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2426806349199111807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/2426806349199111807'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/issue-1-resolver.html' title='Issue 1 Resolver'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-6228512191707417660</id><published>2008-10-01T14:18:00.006+01:00</published><updated>2008-10-01T14:44:02.812+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='viability'/><category scheme='http://www.blogger.com/atom/ns#' term='crirque'/><category scheme='http://www.blogger.com/atom/ns#' term='Issues'/><category scheme='http://www.blogger.com/atom/ns#' term='worksheet'/><category scheme='http://www.blogger.com/atom/ns#' term='1'/><title type='text'>Worksheet 1 Feedback</title><content type='html'>Just got feedback from my worksheet from the other member of my class.&lt;br /&gt;On part 2 Issues surrounding the topic, my third options:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;This should be expanded a bit more, event programming is a bit vague. It would have to be explored more to see if there was enough for the project. &lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And the final overall comment:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt; The issues surrounding the topic look fine and there are a few issues defined within each of the possible areas to perform an investigation into. However a good bit more research into some of these specific issues would have to be conducted to see if they are viable options for an honors project.&lt;br /&gt;&lt;br /&gt;It may be worth while to think about what sort of demo application you would want to create for your project as this may help to give a better insight into what could be done in the time scale. &lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;As commented above viability is a large issue here as well as it is possible I may be stepping outwith the bounds of a CGT honours project. Initaly the first idea was almost not used as it creates a problem with what is quantifiable with the results and this is also true for the other two issues. For the first and the thrid there is a chance that the quantifiable results would be a comparison of different implimentations based on either speed or lateny, the dissertation being based on comparing several models to solve the problem.  The second however causes more of a problem being quite vauge althought explaining it like the Ogre 3D engine handles all in game resources makes the research area a bit clearer, creating a test for this issue would possibly be the most challenging and depending on how the game resources would be stored and accessed that was decided on may be problematic to produce within the timescale.&lt;br /&gt;&lt;br /&gt;The first issue has the most potential to sprial out of control into somthing too large for a research project but also would possibly provide the most depth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-6228512191707417660?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/6228512191707417660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=6228512191707417660' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6228512191707417660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/6228512191707417660'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/10/worksheet-1-feedback.html' title='Worksheet 1 Feedback'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-454215893956321549.post-4327344262124331762</id><published>2008-09-29T15:19:00.000+01:00</published><updated>2008-09-29T15:27:20.590+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis Question Topic  Bsc Honours'/><title type='text'>Worksheet #1</title><content type='html'>Currently I'm trying to find a question or hypothesis on which to base my honours project around. As part of the planning and reporting module everyone has been asked to fill in a worksheet and then forward it to another member of the class for critque. Here's my first draft of the worksheet thats been sent on already:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;strong&gt;1. State the topic of interest that you may wish to take forward into a project&lt;br /&gt;&lt;/strong&gt;Topics within the area of Games programming interest me.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Indicate the issues surrounding this topic that you may wish to investigate&lt;/strong&gt;&lt;br /&gt;There are three main areas of this topic interest me:&lt;br /&gt;Use of collision detection within a multi threaded game engine, how would collision detection be split between or assigned its own thread, what are the considerations performance wise with waiting for the collision thread(s) to finish processing their data and what are the possible synchronisation problems between the graphics representation and the collision detection results.&lt;br /&gt;Inspired by: &lt;a href="http://www.gamasutra.com/view/feature/3782/sponsored_feature_multithreading_.php"&gt;http://www.gamasutra.com/view/feature/3782/sponsored_feature_multithreading_.php&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;The Serialisation and persistence of art assets within a game engine, how does the game engine store and render these objects as well as catalogue them for instancing and other graphical techniques.&lt;br /&gt;Inspired by: &lt;a href="http://www.gamasutra.com/view/feature/3683/a_templated_c_attribute_library_.php"&gt;http://www.gamasutra.com/view/feature/3683/a_templated_c_attribute_library_.php&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;Issues surrounding input lag with respect to programming logic, attempting to minimise the input lag through event programming.&lt;br /&gt;Inspired by: &lt;a href="http://www.gamasutra.com/view/feature/1942/programming_responsiveness.php"&gt;http://www.gamasutra.com/view/feature/1942/programming_responsiveness.php&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;3. Outline your initial ideas about how you would carry out the practical aspects of the project.&lt;br /&gt;&lt;/strong&gt;Mainly the objective and what is quantifiable with each of these areas needs to be defined first either through research of the topic or discussion with my technical advisor/lecturers. From there either the final topic to be developed into a research project would be chosen or a new topic posed. Once the research question is finalised background reading would begin along with basic planning of the test required to prove or disprove the research question. Each question may have several different approaches these may be used as the basis for the dissertation write up discussing the differences and advantages of each approach. &lt;/p&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/454215893956321549-4327344262124331762?l=honoursprojectio.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://honoursprojectio.blogspot.com/feeds/4327344262124331762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=454215893956321549&amp;postID=4327344262124331762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4327344262124331762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/454215893956321549/posts/default/4327344262124331762'/><link rel='alternate' type='text/html' href='http://honoursprojectio.blogspot.com/2008/09/worksheet-1.html' title='Worksheet #1'/><author><name>David Strachan</name><uri>http://www.blogger.com/profile/14637848258124147047</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://1.bp.blogspot.com/_Z3KsWqUusj4/SODmpUAlthI/AAAAAAAAAAM/2vbATULzREQ/S220/prinny+dood.jpg'/></author><thr:total>0</thr:total></entry></feed>
