On Implementing Graph Cuts on CUDA