MCPcopy
hub / github.com/cortexlabs/cortex / pack

Function pack

pkg/proxy/breaker.go:314–316  ·  view source on GitHub ↗

pack takes two uint32 (as uint64 to avoid casting) and packs them into a single uint64 at the leftmost and the rightmost bits respectively. It's up to the caller to ensure that left and right actually fit into 32 bit.

(left, right uint64)

Source from the content-addressed store, hash-verified

312// at the leftmost and the rightmost bits respectively.
313// It's up to the caller to ensure that left and right actually fit into 32 bit.
314func pack(left, right uint64) uint64 {
315 return left<<32 | right
316}

Callers 5

TestPackUnpackFunction · 0.85
tryAcquireMethod · 0.85
acquireMethod · 0.85
releaseMethod · 0.85
updateCapacityMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestPackUnpackFunction · 0.68