An optimized approach to histogram computation on GPU