GPU Part works again

Now both CPU and GPU variants are working. GPU part requires the
library gpumat at the moment. This could be changed to the GPU support
via Matlab.