Home
last modified time | relevance | path

Searched refs:bitCount (Results 1 – 15 of 15) sorted by relevance

/libcore/luni/src/main/java/java/util/
DHugeEnumSet.java153 size += Long.bitCount(newBits) - Long.bitCount(oldBits); in addAll()
184 size += Long.bitCount(b); in complement()
284 size += Long.bitCount(newBits) - Long.bitCount(oldBits); in removeAll()
313 size += Long.bitCount(newBits) - Long.bitCount(oldBits); in retainAll()
334 size -= Long.bitCount(bits[startIndex]); in setRange()
336 size += Long.bitCount(bits[startIndex]); in setRange()
340 size -= Long.bitCount(bits[startIndex]); in setRange()
342 size += Long.bitCount(bits[startIndex]); in setRange()
347 size -= Long.bitCount(bits[endIndex]); in setRange()
349 size += Long.bitCount(bits[endIndex]); in setRange()
[all …]
DMiniEnumSet.java133 size = Long.bitCount(newBits); in addAll()
180 size = Long.bitCount(newBits); in removeAll()
206 size = Long.bitCount(newBits); in retainAll()
259 size = Long.bitCount(bits); in setRange()
DBitSet.java86 public BitSet(int bitCount) { in BitSet() argument
87 if (bitCount < 0) { in BitSet()
88 throw new NegativeArraySizeException(Integer.toString(bitCount)); in BitSet()
90 this.bits = arrayForBits(bitCount); in BitSet()
100 private static long[] arrayForBits(int bitCount) { in arrayForBits() argument
101 return new long[(bitCount + 63)/ 64]; in arrayForBits()
663 result += Long.bitCount(bits[i]); in cardinality()
737 int bitCount = length(); in toByteArray() local
738 byte[] result = new byte[(bitCount + 7)/ 8]; in toByteArray()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DLongTest.java979 assertEquals(0, Long.bitCount(0x0)); in test_bitCountJ()
980 assertEquals(1, Long.bitCount(0x1)); in test_bitCountJ()
981 assertEquals(1, Long.bitCount(0x2)); in test_bitCountJ()
982 assertEquals(2, Long.bitCount(0x3)); in test_bitCountJ()
983 assertEquals(1, Long.bitCount(0x4)); in test_bitCountJ()
984 assertEquals(2, Long.bitCount(0x5)); in test_bitCountJ()
985 assertEquals(2, Long.bitCount(0x6)); in test_bitCountJ()
986 assertEquals(3, Long.bitCount(0x7)); in test_bitCountJ()
987 assertEquals(1, Long.bitCount(0x8)); in test_bitCountJ()
988 assertEquals(2, Long.bitCount(0x9)); in test_bitCountJ()
[all …]
DIntegerTest.java1144 assertEquals(0, Integer.bitCount(0x0)); in test_bitCountI()
1145 assertEquals(1, Integer.bitCount(0x1)); in test_bitCountI()
1146 assertEquals(1, Integer.bitCount(0x2)); in test_bitCountI()
1147 assertEquals(2, Integer.bitCount(0x3)); in test_bitCountI()
1148 assertEquals(1, Integer.bitCount(0x4)); in test_bitCountI()
1149 assertEquals(2, Integer.bitCount(0x5)); in test_bitCountI()
1150 assertEquals(2, Integer.bitCount(0x6)); in test_bitCountI()
1151 assertEquals(3, Integer.bitCount(0x7)); in test_bitCountI()
1152 assertEquals(1, Integer.bitCount(0x8)); in test_bitCountI()
1153 assertEquals(2, Integer.bitCount(0x9)); in test_bitCountI()
[all …]
/libcore/luni/src/main/java/java/math/
DBitLevel.java62 static int bitCount(BigInteger val) { in bitCount() method in BitLevel
73 bCount += Integer.bitCount(val.digits[i]); in bitCount()
77 bCount += Integer.bitCount(-val.digits[i]); in bitCount()
79 bCount += Integer.bitCount(~val.digits[i]); in bitCount()
105 int bitCount = numberOfBits & 31; in nonZeroDroppedBits() local
111 return ((i != intCount) || (digits[i] << (32 - bitCount) != 0)); in nonZeroDroppedBits()
DBigInteger.java660 public int bitCount() { in bitCount() method in BigInteger
662 return BitLevel.bitCount(this); in bitCount()
/libcore/benchmarks/src/benchmarks/regression/
DIntegerBenchmark.java86 int count = Integer.bitCount((int) (l & 0xffffffffL)); in pop2()
87 count += Integer.bitCount((int) (l >>> 32)); in pop2()
94 t += Long.bitCount((long) i); in timeLongBitCount_Long()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecureRandom2Test.java278 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
282 assertEquals(numBits, Integer.bitCount(random)); in test_nextJ()
286 assertEquals(32, Integer.bitCount(random)); in test_nextJ()
290 assertEquals(0, Integer.bitCount(random)); in test_nextJ()
/libcore/luni/src/main/java/java/security/spec/
DECFieldF2m.java89 int rp_bc = this.rp.bitCount(); in ECFieldF2m()
/libcore/luni/src/test/java/libcore/java/util/
DBitSetTest.java42 cardinality += Long.bitCount(longs[i]); in assertBitSet()
86 cardinality += Integer.bitCount(((int) bytes[i]) & 0xff); in assertBitSet()
/libcore/luni/src/main/java/java/lang/
DInteger.java640 public static int bitCount(int i) { in bitCount() method in Integer
DLong.java640 public static int bitCount(long v) { in bitCount() method in Long
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerOperateBitsTest.java37 assertEquals(0, aNumber.bitCount()); in testBitCountZero()
45 assertEquals(87, aNumber.bitCount()); in testBitCountNeg()
53 assertEquals(107, aNumber.bitCount()); in testBitCountPos()
DBigIntegerTest.java500 assertTrue("a.bitCount==b.bitCount", a.bitCount() == b.bitCount()); in test_shiftLeftI()