Optimized version of cv::gpu::histEven for CV_8UC1