Tidied up cropCuda by adding a macro.

Maybe not the best idea. I should probably use a small function instead.