Geek Vacation Day #1: Going Native 2012

Thursday, February 2nd, 2012

I’m m taking another busman’s holiday and attending Going Native 2012. Like my GPU Technology Conference trip a few years ago this is a geek vacation rather than work for Microsoft. Although bizaarly it’s taking place at the Microsoft Conference Center on campus, it feels a little weird ...

Visual Studio 2010 Adding Intellisense Support for CUDA C

Thursday, October 28th, 2010

Someone asked me how to get intellisense working with CUDA files. So here’s a quick post on the couple of simple steps it takes to get it working… The following assumes you’ve setup a CUDA project with the correct include paths and it builds correctly.

Geek Vacation Day #4: GTC Highlights

Monday, October 11th, 2010

So after the dust has settled and I’m back in not quite so sunny Seattle what were the highlights from GTC? Keynotes: 3D and the Cure for Cancer I was really impressed by the keynotes and wish I could have stayed for the final one on Thursday evening ...

Gotchas: Adding Attributes to Properties on Interfaces in F#

Tuesday, September 15th, 2009

I ran into a couple of issues when writing an F# class to be consumed by C#. Specifically when it came to adding attributes to a property declared on an interface. You would expect the following code to decorate the SofteningLength property with the Dependency and DefaultValue attributes: ...

Conditional Acceptance Tests with xUnit.net

Tuesday, September 8th, 2009

I’ve been using xUnit.net to run some basic acceptance tests. Obviously xUnit is a unit test framework first and foremost but I don’t have a problem with reusing the framework provided you’re really clear about which tests are unit tests and which tests are not. I created an AcceptanceTest ...

C# Optimization Revisited Part 3: The “Native Option” C++

Tuesday, September 1st, 2009

In part 1 and part 2 of my thread on C# optimization there was a lot of talk about algorithms and the like. The next two posts take a different tack… first re-implementing the same algorithm using different languages and then in a different language and hardware. It turns out ...

An Alternative to the C# Generic new() Constraint using Lambdas

Friday, March 13th, 2009

A long while back I wrote about An alternative to the C# generic new() constraint using anonymous delegates to provide a mechanism for constructing an object which did not support a parameterless constructor. I’ve updated the same post to show an improved syntax using lambda expressions.

C# String Assignment Optimization

Tuesday, August 26th, 2008

I happened to come across the following code the other day. string cost = "FR" + "E" + "E"; // bad perf = true J Which, after my performance investigation the other day, got me wondering again. Is there performance really going to be ...

C# Inline Methods and Optimization

Tuesday, August 19th, 2008

Last night I was playing around with a vector class that's part of a scientific computation code I've been working on. It's a long story more on that later but it means I've found some of my own time to write code in. Anyway... The Vector class uses the automatically ...

An xUnit.net Assert.Throws() Code Snippet

Tuesday, June 24th, 2008

I was mucking around with code snippets over the weekend - it killed the time in between feeling sick. As my unit testing framework of choice is XUnit I thought I've have a go at adding a snippet or two around that. xUnit already comes with a nice code snippet for ...