MCPcopy Create free account
hub / github.com/cogentcore/core / Bytes

Method Bytes

vgpu/vals.go:151–153  ·  view source on GitHub ↗

Bytes returns byte array of the Value data, including any additional alignment -- can be written to directly. Be mindful of potential padding and alignment issues relative to go-based storage. Set Mod flag when changes have been made.

()

Source from the content-addressed store, hash-verified

149// go-based storage.
150// Set Mod flag when changes have been made.
151func (vl *Value) Bytes() []byte {
152 return (*[ByteCopyMemoryLimit]byte)(vl.MemPtr)[:vl.AllocSize]
153}
154
155// Floats32 returns math32.ArrayF32 of the Value data -- can be written to directly.
156// Only recommended for Vertex data. Otherwise, be mindful of potential padding

Callers 15

CopyFromBytesMethod · 0.95
CopyToBytesMethod · 0.95
InitMethod · 0.45
ProcessFilesFunction · 0.45
nodeSizeMethod · 0.45
DiffFunction · 0.45
ConfigSysMethod · 0.45
ConfigSysMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mimeDataSyncMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected