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

Method PaddedArrayCheck

vgpu/vals.go:176–181  ·  view source on GitHub ↗

PaddedArrayCheck checks if this is an array with padding on the elements due to alignment issues. If this is the case, then direct copying is not possible.

()

Source from the content-addressed store, hash-verified

174// due to alignment issues. If this is the case, then direct copying is not
175// possible.
176func (vl *Value) PaddedArrayCheck() error {
177 if vl.HasFlag(ValuePaddedArray) {
178 return fmt.Errorf("vgpu.Value PaddedArrayCheck: this array value has padding around elements not present in Go version -- cannot copy directly: %s", vl.Name)
179 }
180 return nil
181}
182
183// CopyFromBytes copies bytes from given source pointer into memory,
184// and sets Mod flag. Use this for struct data types.

Callers 2

CopyFromBytesMethod · 0.95
CopyToBytesMethod · 0.95

Calls 2

HasFlagMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected