Add OpenMP to the gradient code

Note this it's so much faster if you move the channels to the
front