Lines Matching refs:adder

328         LongAdder adder = new LongAdder();  in testKeySetSpliterator()  local
335 sp.forEachRemaining((Integer x) -> adder.add(x.longValue())); in testKeySetSpliterator()
336 long v = adder.sumThenReset(); in testKeySetSpliterator()
337 sp2.forEachRemaining((Integer x) -> adder.add(x.longValue())); in testKeySetSpliterator()
338 long v2 = adder.sum(); in testKeySetSpliterator()
588 LongAdder adder = new LongAdder(); in testForEachKeySequentially() local
590 m.forEachKey(Long.MAX_VALUE, (Long x) -> adder.add(x.longValue())); in testForEachKeySequentially()
591 assertEquals(adder.sum(), SIZE * (SIZE - 1) / 2); in testForEachKeySequentially()
598 LongAdder adder = new LongAdder(); in testForEachValueSequentially() local
600 m.forEachValue(Long.MAX_VALUE, (Long x) -> adder.add(x.longValue())); in testForEachValueSequentially()
601 assertEquals(adder.sum(), SIZE * (SIZE - 1)); in testForEachValueSequentially()
608 LongAdder adder = new LongAdder(); in testForEachSequentially() local
610 m.forEach(Long.MAX_VALUE, (Long x, Long y) -> adder.add(x.longValue() + y.longValue())); in testForEachSequentially()
611 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachSequentially()
618 LongAdder adder = new LongAdder(); in testForEachEntrySequentially() local
620 …m.forEachEntry(Long.MAX_VALUE, (Map.Entry<Long,Long> e) -> adder.add(e.getKey().longValue() + e.ge… in testForEachEntrySequentially()
621 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachEntrySequentially()
628 LongAdder adder = new LongAdder(); in testForEachKeyInParallel() local
630 m.forEachKey(1L, (Long x) -> adder.add(x.longValue())); in testForEachKeyInParallel()
631 assertEquals(adder.sum(), SIZE * (SIZE - 1) / 2); in testForEachKeyInParallel()
638 LongAdder adder = new LongAdder(); in testForEachValueInParallel() local
640 m.forEachValue(1L, (Long x) -> adder.add(x.longValue())); in testForEachValueInParallel()
641 assertEquals(adder.sum(), SIZE * (SIZE - 1)); in testForEachValueInParallel()
648 LongAdder adder = new LongAdder(); in testForEachInParallel() local
650 m.forEach(1L, (Long x, Long y) -> adder.add(x.longValue() + y.longValue())); in testForEachInParallel()
651 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachInParallel()
658 LongAdder adder = new LongAdder(); in testForEachEntryInParallel() local
660 …m.forEachEntry(1L, (Map.Entry<Long,Long> e) -> adder.add(e.getKey().longValue() + e.getValue().lon… in testForEachEntryInParallel()
661 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testForEachEntryInParallel()
669 LongAdder adder = new LongAdder(); in testMappedForEachKeySequentially() local
672 (Long x) -> adder.add(x.longValue())); in testMappedForEachKeySequentially()
673 assertEquals(adder.sum(), 4 * SIZE * (SIZE - 1) / 2); in testMappedForEachKeySequentially()
681 LongAdder adder = new LongAdder(); in testMappedForEachValueSequentially() local
684 (Long x) -> adder.add(x.longValue())); in testMappedForEachValueSequentially()
685 assertEquals(adder.sum(), 4 * SIZE * (SIZE - 1)); in testMappedForEachValueSequentially()
693 LongAdder adder = new LongAdder(); in testMappedForEachSequentially() local
696 (Long x) -> adder.add(x.longValue())); in testMappedForEachSequentially()
697 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testMappedForEachSequentially()
705 LongAdder adder = new LongAdder(); in testMappedForEachEntrySequentially() local
708 (Long x) -> adder.add(x.longValue())); in testMappedForEachEntrySequentially()
709 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testMappedForEachEntrySequentially()
717 LongAdder adder = new LongAdder(); in testMappedForEachKeyInParallel() local
720 (Long x) -> adder.add(x.longValue())); in testMappedForEachKeyInParallel()
721 assertEquals(adder.sum(), 4 * SIZE * (SIZE - 1) / 2); in testMappedForEachKeyInParallel()
729 LongAdder adder = new LongAdder(); in testMappedForEachValueInParallel() local
732 (Long x) -> adder.add(x.longValue())); in testMappedForEachValueInParallel()
733 assertEquals(adder.sum(), 4 * SIZE * (SIZE - 1)); in testMappedForEachValueInParallel()
741 LongAdder adder = new LongAdder(); in testMappedForEachInParallel() local
744 (Long x) -> adder.add(x.longValue())); in testMappedForEachInParallel()
745 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testMappedForEachInParallel()
753 LongAdder adder = new LongAdder(); in testMappedForEachEntryInParallel() local
756 (Long x) -> adder.add(x.longValue())); in testMappedForEachEntryInParallel()
757 assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); in testMappedForEachEntryInParallel()