hash-reduce optimization for GPU