What They Never Told You

While tryinOld Broken Coolerg to fix a sudden disk breakdown in my desktop pc I stuck my finger in the fan of my cpu cooler, breaking one of the blades. Yeah, that’s so funny keep on laughing… Done? Anyways, I removed the broken blade leaving the cooler as can be seen in the foto. When I turned the power back on the cooler made a horrible noise. I put a vacuum cleaner to the cooler and found that the loss of the single blade made it completely unstable at high rpms. I was a bit worried that the amount of jumping by tNew Coolerhe cooler on the old Athlon XP 1800+ processor would kill it. I acquired a new cooler (as seen in the other picture) today and luckily the processor still works, phew. The moral of the story is this; keep your bloody hands away from a fan spinning in excess of 4000 RPM, this goes for man-size fans as well!

Got Data?

In anticipation of the algorithms presented in a course I’m having this semester I toyed around yesterday and created the diskvector. It is a simple piece of code that only took two hours to write. It is used when you need a vector of, say, a gibibyte of data. If you only have 128Mib of memory this will clearly nut suffice. Your operating system will then page the data onto disk, but you might find it hard to control this behaviour, and random access will nevertheless cripple your computer. The diskvector is initialized with the total size of the vector and the number of elements (B) you want to keep in memory. The disk vector overloads the [ ] operator and will always keep B consecutive elements in memory and only reload the memory if you try to get an element not in memory. This can be used to, for instance, the construction of a fast searching algorithm for large vectors. You could for instance modify the standard merge sort to work in blocks of size B.

A Not so Boring Weekend

Friday night I went with Brian and our respective girlfriends new shoesto Fatter Eskil to hear the danish band, tidsmaskinen. They played danish and international hits from the past three decades and were really cool. When we woke up Saturday, we went down to the city centre to shop for much needed shoes for me, the result of which can be seen on my very feet on the picture on the right. I think I am now eligible for “Best Dresser 2005″, but I am not sure many would agree with me on that :)I have been reading The Foundation Series by Isaac Asimov the last couple of weeks and have been passing the books on to my eager neighbour Mette who is also reading the series. They can highly be recommended and I am enjoying them as much as I did Peter F. Hamilton’s excellent Night’s Dawn Trilogy. So if you are looking for something to read, pick up one of those series, or another space opera, it is a great genre.

Today also marks the end of the exam period and the new courses are starting. I will be following I/O Algorithms by Lars Arge, Randomized Algorithms by Gudmund Frandsen and Foundations of Evolutionary Computing by Thiemo Krink. Aren’t you just thrilled I told you all that? At least I now have the links gathered somewhere :).

Finally!

After another days hard work I finally created my first cornell box, since yesterday I added a more capGPGPU Raytracer on the GPUable camera model and implemented the shading code. All the pieces are now slowly coming together. A small thing I still need is to associcate a material to each triangle, but that should be a quickie. The data is already exported from 3D Studio MAX so I just need some more textures and initialization code. The only large thing missing is support for uniform grid spatial paritioning, which is present in Purcells original paper. I’ll start implementing that next year, that is, the day after tommorow.I will celebrate new years eve here at the dorm with my girlfriend, Lars, Brian, Janus and a bunch of other people. It’s gonna be a blast. Happy new year everyone!

Update

Another days woGPGPU ray tracer rk, and I now have this. It does not look like that much have changed since yesterday, but it has! I can now handle an arbitrary amount of triangles and I have clean separation between the various stages of the pipeline. I was able to remove alot of redundant textures and Cg programs so the above screenshot, although more advanced under the hood, actually takes the same amount of videram as the previous one, and this one even has four times the triangle count.My major headache is the Cg compiler (1.3 beta 2) which has a comparable amount of bugs to your avarage country sized rain forest. Nested conditionals are apparently very hard to compile into fp30 code, and the arbfp1 code is simply incorrect. I sometimes has to add code updating some component of a vector just before a conditional which updates that same vector anyways (or kills the fragment) – so the first update is utter useless, but apparently required to make it compile right. Go figure. I would just like to add that I normally consider compiler/API complains as a sign of someone not understanding the tool they use. In this case though, I am the one complaining, and I am fairly sure that my complaints are justified. If you, however, know why my cgc is behaving this weird I would really like to hear from you.

Oh, and the above cube is of course exported from 3D Studio MAX using my own exporter, loaded from disk using my own engine, and then restructered and fed to the GPU :).

Exercising the GPU

I’m currently torturing the GeForce FX 5650GO card in my laptop with something it is not used to. As exam project for a course I am implementing a ray tracer almosGPGPU ray tracert entirely on the GPU and after several days of on-and-off work I have finally produced my first proper screenshot: I am using the technique described by Timothy Purcell in his Ph.D. dissertation from March 2004. To produce the screenshot I use 32MiB videoram in 13 32bit floating point textures and has a grand total of 14 Cg programs loaded. Nearly 500 lines of Cg code are used. Many of these numbers would be significantly reduced on a pixel shader model 3.0 card (the GeForce 6800 to name one), and I could really need multiple render targets, but hey, that is life.On other “news” I returned to Ã…rhus yesterday from my 9 days stay at my parents. My dad and sister gave me a lift and we ended up in IKEA where I bough a new bookcase which I assembled in the evening, now all I need is to fill it with all my books and junk.

You dare bribe Santa? I’m gonna shove coal so far up your stocking you’ll be coughing up diamonds!

I am going home to my parents for christmas today, my uncle is coming to pick me up in ten minutes, just wanted to wish everybody a merry christmas.

He knows when your are sleeping,
He knows when you’re on the can,
He’ll hunt you down and blast your ass from here to Pakistan.
You better not breathe, you better not move,
You’re better off dead, I’m telling you, dude.
Santa Claus is gunning you down!
(Futurama: XMas Story)