Add histogram accumulator function.