MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / fmix

Method fmix

lib/tokenizer.js:270–282  ·  view source on GitHub ↗

@param {MutableLong} k

(k)

Source from the content-addressed store, hash-verified

268
269 /** @param {MutableLong} k */
270 fmix(k) {
271 k.xor(new MutableLong(k.getUint16(2) >>> 1 | ((k.getUint16(3) << 15) & 0xffff), k.getUint16(3) >>> 1, 0, 0));
272 k.multiply(mconst3);
273 const other = new MutableLong(
274 (k.getUint16(2) >>> 1) | ((k.getUint16(3) << 15) & 0xffff),
275 k.getUint16(3) >>> 1,
276 0,
277 0
278 );
279 k.xor(other);
280 k.multiply(mconst4);
281 k.xor(new MutableLong(k.getUint16(2) >>> 1 | (k.getUint16(3) << 15 & 0xffff), k.getUint16(3) >>> 1, 0, 0));
282 }
283
284 /**
285 * Parses a int64 decimal string representation into a MutableLong.

Callers 2

hashMethod · 0.95
tokenizer-tests.jsFile · 0.80

Calls 3

xorMethod · 0.80
getUint16Method · 0.80
multiplyMethod · 0.80

Tested by

no test coverage detected