/external/guava/guava-tests/test/com/google/common/hash/ |
D | HashCodeTest.java | 69 HashCode fromInt = HashCode.fromInt(expected.asInt); in testFromInt() 79 HashCode fromLong = HashCode.fromLong(expected.asLong); in testFromLong() 87 HashCode fromBytes = HashCode.fromBytes(expected.bytes); in testFromBytes() 94 HashCode hashCode = HashCode.fromBytes(bytes); in testFromBytes_copyOccurs() 109 HashCode hashCode = HashCode.fromBytesNoCopy(bytes); in testFromBytesNoCopy_noCopyOccurs() 122 HashCode hashCode = HashCode.fromBytes(bytes); in testGetBytesInternal_noCloneOccurs() 134 assertEquals(0x1111111111111111L, HashCode.fromLong(0x1111111111111111L).padToLong()); in testPadToLong() 135 assertEquals(0x9999999999999999L, HashCode.fromLong(0x9999999999999999L).padToLong()); in testPadToLong() 136 assertEquals(0x0000000011111111L, HashCode.fromInt(0x11111111).padToLong()); in testPadToLong() 137 assertEquals(0x0000000099999999L, HashCode.fromInt(0x99999999).padToLong()); in testPadToLong() [all …]
|
D | HashingTest.java | 210 checkSameResult(HashCode.fromLong(1), 1); in testConsistentHash_ofHashCode() 211 checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L); in testConsistentHash_ofHashCode() 212 checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L); in testConsistentHash_ofHashCode() 215 public void checkSameResult(HashCode hashCode, long equivLong) { in checkSameResult() 243 Hashing.combineOrdered(Collections.<HashCode>emptySet()); in testCombineOrdered_empty() 251 Hashing.combineOrdered(ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L))); in testCombineOrdered_differentBitLengths() 258 HashCode hash31 = HashCode.fromInt(31); in testCombineOrdered() 259 HashCode hash32 = HashCode.fromInt(32); in testCombineOrdered() 261 assertEquals(HashCode.fromBytes(new byte[] { (byte) 0x80, 0, 0, 0 }), in testCombineOrdered() 263 assertEquals(HashCode.fromBytes(new byte[] { (byte) 0xa0, 0, 0, 0 }), in testCombineOrdered() [all …]
|
D | AbstractNonStreamingHashFunctionTest.java | 49 HashCode[] codes = new HashCode[hashers.size()]; in testExhaustive() 105 HashCode makeHash() { in newHasher() 106 return HashCode.fromBytes(out.toByteArray()); in newHasher() 133 public HashCode hashBytes(byte[] input) { in hashBytes() 134 return HashCode.fromBytes(input); in hashBytes() 138 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() 139 return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); in hashBytes() 143 public HashCode hashString(CharSequence input, Charset charset) { in hashString() 148 public HashCode hashLong(long input) { in hashLong() 153 public HashCode hashInt(int input) { in hashInt()
|
D | AbstractStreamingHasherTest.java | 201 @Override HashCode makeHash() { in makeHash() 202 return HashCode.fromBytes(out.toByteArray()); in makeHash() 252 public HashCode hashBytes(byte[] input) { 253 return HashCode.fromBytes(input); 257 public HashCode hashBytes(byte[] input, int off, int len) { 267 public HashCode hashString(CharSequence input, Charset charset) { 272 public HashCode hashLong(long input) { 277 public HashCode hashInt(int input) {
|
D | Murmur3Hash128Test.java | 46 HashCode foxHash = in testKnownValues() 52 HashCode expected = toHashCode(expected1, expected2); in assertHash() 61 private static HashCode toHashCode(long... longs) { in toHashCode() 66 return HashCode.fromBytes(bb.array()); in toHashCode()
|
D | PackageSanityTests.java | 31 setDefault(HashCode.class, HashCode.fromInt(1)); in PackageSanityTests()
|
D | Murmur3Hash32Test.java | 55 private static void assertHash(int expected, HashCode actual) { in assertHash() 56 assertEquals(HashCode.fromInt(expected), actual); in assertHash()
|
D | HashingInputStreamTest.java | 117 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly() 128 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectlyReadOutOfBound() 140 HashCode expectedHash = Hashing.md5().hashBytes(new byte[] {'m', 's'}); in testHash_hashesCorrectlyForSkipping()
|
D | MessageDigestHashFunctionTest.java | 100 HashCode.fromBytes(digest.digest(input)), in assertMessageDigestHashing() 104 HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)), in assertMessageDigestHashing()
|
D | AbstractByteHasherTest.java | 136 public HashCode hash() { in hash() 137 return HashCode.fromBytesNoCopy(bytes()); in hash()
|
D | HashTestUtils.java | 416 Set<HashCode> hashcodes = Sets.newHashSetWithExpectedSize(objects); in assertInvariants() 419 HashCode hashcode1 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL); in assertInvariants() 420 HashCode hashcode2 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL); in assertInvariants() 453 HashCode expected1 = randomHash(hashFunction, new Random(1L), numActions); in assertIndependentHashers() 454 HashCode expected2 = randomHash(hashFunction, new Random(2L), numActions); in assertIndependentHashers() 470 static HashCode randomHash(HashFunction hashFunction, Random random, int numActions) { in randomHash()
|
/external/guava/guava/src/com/google/common/hash/ |
D | HashCode.java | 39 public abstract class HashCode { class 40 HashCode() {} in HashCode() method in HashCode 111 abstract boolean equalsSameBits(HashCode that); in equalsSameBits() 119 public static HashCode fromInt(int hash) { in fromInt() 123 private static final class IntHashCode extends HashCode implements Serializable { 166 @Override boolean equalsSameBits(HashCode that) { in equalsSameBits() 179 public static HashCode fromLong(long hash) { in fromLong() 183 private static final class LongHashCode extends HashCode implements Serializable { 231 boolean equalsSameBits(HashCode that) { in equalsSameBits() 244 public static HashCode fromBytes(byte[] bytes) { in fromBytes() [all …]
|
D | HashFunction.java | 160 HashCode hashInt(int input); in hashInt() 167 HashCode hashLong(long input); in hashLong() 174 HashCode hashBytes(byte[] input); in hashBytes() 184 HashCode hashBytes(byte[] input, int off, int len); in hashBytes() 194 HashCode hashUnencodedChars(CharSequence input); in hashUnencodedChars() 201 HashCode hashString(CharSequence input, Charset charset); in hashString() 209 <T> HashCode hashObject(T instance, Funnel<? super T> funnel); in hashObject()
|
D | Hashing.java | 319 public static int consistentHash(HashCode hashCode, int buckets) { in consistentHash() 363 public static HashCode combineOrdered(Iterable<HashCode> hashCodes) { in combineOrdered() 364 Iterator<HashCode> iterator = hashCodes.iterator(); in combineOrdered() 368 for (HashCode hashCode : hashCodes) { in combineOrdered() 376 return HashCode.fromBytesNoCopy(resultBytes); in combineOrdered() 389 public static HashCode combineUnordered(Iterable<HashCode> hashCodes) { in combineUnordered() 390 Iterator<HashCode> iterator = hashCodes.iterator(); in combineUnordered() 393 for (HashCode hashCode : hashCodes) { in combineUnordered() 401 return HashCode.fromBytesNoCopy(resultBytes); in combineUnordered() 427 HashCode makeHash(Hasher[] hashers) { in makeHash() [all …]
|
D | AbstractStreamingHashFunction.java | 36 @Override public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) { in hashObject() 40 @Override public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 44 @Override public HashCode hashString(CharSequence input, Charset charset) { in hashString() 48 @Override public HashCode hashInt(int input) { in hashInt() 52 @Override public HashCode hashLong(long input) { in hashLong() 56 @Override public HashCode hashBytes(byte[] input) { in hashBytes() 60 @Override public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() 228 public final HashCode hash() { in hash() 237 abstract HashCode makeHash(); in makeHash()
|
D | AbstractNonStreamingHashFunction.java | 44 @Override public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) { in hashObject() 48 @Override public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 57 @Override public HashCode hashString(CharSequence input, Charset charset) { in hashString() 61 @Override public HashCode hashInt(int input) { in hashInt() 65 @Override public HashCode hashLong(long input) { in hashLong() 69 @Override public HashCode hashBytes(byte[] input) { in hashBytes() 144 public HashCode hash() { in hash()
|
D | Murmur3_32HashFunction.java | 84 @Override public HashCode hashInt(int input) { in hashInt() 91 @Override public HashCode hashLong(long input) { in hashLong() 105 @Override public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 140 private static HashCode fmix(int h1, int length) { in fmix() 147 return HashCode.fromInt(h1); in fmix() 176 @Override public HashCode makeHash() { in makeHash()
|
D | ChecksumHashFunction.java | 80 public HashCode hash() { in hash() 88 return HashCode.fromInt((int) value); in hash() 90 return HashCode.fromLong(value); in hash()
|
D | Crc32cHashFunction.java | 120 public HashCode hash() { in hash() 121 return HashCode.fromInt(crc); in hash()
|
D | MessageDigestHashFunction.java | 151 public HashCode hash() { in hash() 155 ? HashCode.fromBytesNoCopy(digest.digest()) in hash() 156 : HashCode.fromBytesNoCopy(Arrays.copyOf(digest.digest(), bytes)); in hash()
|
D | AbstractCompositeHashFunction.java | 46 /* protected */ abstract HashCode makeHash(Hasher[] hashers); in makeHash() 146 @Override public HashCode hash() { in newHasher()
|
D | SipHashFunction.java | 140 @Override public HashCode makeHash() { in makeHash() 148 return HashCode.fromLong(v0 ^ v1 ^ v2 ^ v3); in makeHash()
|
/external/v8/test/cctest/compiler/ |
D | test-operator.cc | 35 CHECK_EQ(17, static_cast<int>(op1.HashCode())); in TEST() 38 CHECK_EQ(18, static_cast<int>(op2.HashCode())); in TEST() 97 CHECK(op1a.HashCode() == op1b.HashCode()); in TEST() 102 CHECK(op1a.HashCode() != op2a.HashCode()); in TEST() 103 CHECK(op2a.HashCode() != op2b.HashCode()); in TEST() 167 CHECK(op1a.HashCode() == op1b.HashCode()); in TEST() 172 CHECK(op1a.HashCode() != op2a.HashCode()); in TEST() 173 CHECK(op2a.HashCode() != op2b.HashCode()); in TEST()
|
/external/antlr/antlr-3.4/runtime/Delphi/Sources/Antlr3.Runtime/ |
D | Antlr.Runtime.Tools.pas | 242 HashCode: Integer; 256 function GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; 258 procedure RehashAdd(HashCode: Integer; const Key: TKey; const Value: TValue); 259 procedure DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TValue); 567 if oldItems[i].HashCode <> 0 then 568 RehashAdd(oldItems[i].HashCode, oldItems[i].Key, oldItems[i].Value); 599 function TDictionary<TKey,TValue>.GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; in GetBucketIndex() 606 start := HashCode and (Length(FItems) - 1); 610 hc := FItems[Result].HashCode; 617 if (hc = HashCode) and FComparer.Equals(FItems[Result].Key, Key) then [all …]
|
/external/v8/src/compiler/ |
D | value-numbering-reducer.cc | 18 size_t HashCode(Node* node) { in HashCode() function 19 size_t h = base::hash_combine(node->op()->HashCode(), node->InputCount()); in HashCode() 55 const size_t hash = HashCode(node); in Reduce() 147 for (size_t j = HashCode(old_entry) & mask;; j = (j + 1) & mask) { in Grow()
|