MCPcopy Create free account
hub / github.com/google/gapid / Align

Method Align

gapis/memory/encoder.go:53–58  ·  view source on GitHub ↗

Align writes zero bytes until the write position is a multiple of to.

(to uint64)

Source from the content-addressed store, hash-verified

51
52// Align writes zero bytes until the write position is a multiple of to.
53func (e *Encoder) Align(to uint64) {
54 alignment := u64.AlignUp(e.o, to)
55 if pad := alignment - e.o; pad != 0 {
56 e.Pad(pad)
57 }
58}
59
60// Pad writes n zero bytes to the writer.
61func (e *Encoder) Pad(n uint64) {

Callers 1

alignAndOffsetMethod · 0.95

Calls 2

PadMethod · 0.95
AlignUpMethod · 0.80

Tested by

no test coverage detected