@VisibleForTesting public long[] getHashBuckets(FilterKey key, int hashCount, long max) { long[] hash = new long[2]; key.filterHash(hash); long[] indexes = new long[hashCount]; setIndexes(hash[1], hash[0], hashCount, max, indexes); return indexes; }
@VisibleForTesting public long[] getHashBuckets(FilterKey key, int hashCount, long max) { long[] hash = new long[2]; key.filterHash(hash); long[] indexes = new long[hashCount]; setIndexes(hash[1], hash[0], hashCount, max, indexes); return indexes; }
@VisibleForTesting public long[] getHashBuckets(FilterKey key, int hashCount, long max) { long[] hash = new long[2]; key.filterHash(hash); long[] indexes = new long[hashCount]; setIndexes(hash[1], hash[0], hashCount, max, indexes); return indexes; }
@VisibleForTesting public long[] getHashBuckets(FilterKey key, int hashCount, long max) { long[] hash = new long[2]; key.filterHash(hash); long[] indexes = new long[hashCount]; setIndexes(hash[1], hash[0], hashCount, max, indexes); return indexes; }
private long[] indexes(ByteBuffer key) { // we use the same array both for storing the hash result, and for storing the indexes we return, // so that we do not need to allocate two arrays. long[] indexes = reusableIndexes.get(); hash(key, key.position(), key.remaining(), 0L, indexes); setIndexes(indexes[0], indexes[1], hashCount, bitset.capacity(), indexes); return indexes; }
@VisibleForTesting public long[] getHashBuckets(ByteBuffer key, int hashCount, long max) { long[] hash = new long[2]; hash(key, key.position(), key.remaining(), 0L, hash); long[] indexes = new long[hashCount]; setIndexes(hash[0], hash[1], hashCount, max, indexes); return indexes; }
@Inline private long[] indexes(FilterKey key) { // we use the same array both for storing the hash result, and for storing the indexes we return, // so that we do not need to allocate two arrays. long[] indexes = reusableIndexes.get(); key.filterHash(indexes); setIndexes(indexes[1], indexes[0], hashCount, bitset.capacity(), indexes); return indexes; }
@Inline private long[] indexes(FilterKey key) { // we use the same array both for storing the hash result, and for storing the indexes we return, // so that we do not need to allocate two arrays. long[] indexes = reusableIndexes.get(); key.filterHash(indexes); setIndexes(indexes[1], indexes[0], hashCount, bitset.capacity(), indexes); return indexes; }
@Inline private long[] indexes(FilterKey key) { // we use the same array both for storing the hash result, and for storing the indexes we return, // so that we do not need to allocate two arrays. long[] indexes = reusableIndexes.get(); key.filterHash(indexes); setIndexes(indexes[1], indexes[0], hashCount, bitset.capacity(), indexes); return indexes; }
@Inline private long[] indexes(FilterKey key) { // we use the same array both for storing the hash result, and for storing the indexes we return, // so that we do not need to allocate two arrays. long[] indexes = reusableIndexes.get(); key.filterHash(indexes); setIndexes(indexes[1], indexes[0], hashCount, bitset.capacity(), indexes); return indexes; }