Added some cuda code for grayscale