public override long Sum(Counts_Type type) { long[] all = _counts[( int )type]; long total = 0; foreach (long one in all) { total += one; } return(total); }
public override void IncAndGetCount(Counts_Type type) { outerInstance.counts.IncAndGet(type, ThreadIndex); }
public override void IncAndGet(Counts_Type type, int threadIndex) { Counts(type)[threadIndex]++; }
private long[] Counts(Counts_Type type) { return(_counts[( int )type]); }