Home | History | Annotate | Download | only in jsr166

Lines Matching defs:adder

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