High Performance Histograms on SIMT and SIMD Architectures