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

Function newConstantEncoder

gapis/replay/builder/constant_encoder.go:36–45  ·  view source on GitHub ↗
(memoryLayout *device.MemoryLayout)

Source from the content-addressed store, hash-verified

34}
35
36func newConstantEncoder(memoryLayout *device.MemoryLayout) *constantEncoder {
37 buffer := &bytes.Buffer{}
38 writer := endian.Writer(buffer, memoryLayout.GetEndian())
39 return &constantEncoder{
40 writer: writer,
41 buffer: buffer,
42 constantMap: make(map[id.ID]uint64),
43 alignment: uint64(memoryLayout.GetPointer().GetAlignment()),
44 }
45}
46
47func (e *constantEncoder) writeValues(v ...value.Value) value.Pointer {
48 if len(v) == 0 {

Callers 3

TestConstantEncoderCacheFunction · 0.85
NewFunction · 0.85

Calls 1

WriterMethod · 0.80

Tested by 2

TestConstantEncoderCacheFunction · 0.68