MCPcopy Create free account
hub / github.com/egonelbre/exp / WriteUint32

Method WriteUint32

bench/bulkencoder/encoder_test.go:39–48  ·  view source on GitHub ↗
(v uint32)

Source from the content-addressed store, hash-verified

37}
38
39func (enc *BulkEncoder) WriteUint32(v uint32) {
40 enc.fill |= uint64(v) << enc.off
41 enc.off += 32
42 if enc.off >= 64 {
43 enc.off -= 64
44 enc.fill = uint64(v) >> (32 - enc.off)
45 enc.data[enc.at] = enc.fill
46 enc.at++
47 }
48}
49
50func (enc *BulkEncoder) Reset() {
51 enc.fill, enc.off, enc.at = 0, 0, 0

Callers 3

BenchmarkBulk_uint32Function · 0.95
BenchmarkBulk_4xuint32Function · 0.95
BenchmarkBulk_mixFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected