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

Method TotalByteSize

vgpu/image.go:306–308  ·  view source on GitHub ↗

TotalByteSize returns total number of bytes required to represent all layers of images in Host memory. TODO only works for known formats -- need to add more as needed.

()

Source from the content-addressed store, hash-verified

304// images in Host memory. TODO only works
305// for known formats -- need to add more as needed.
306func (im *ImageFormat) TotalByteSize() int {
307 return im.LayerByteSize() * im.Layers
308}
309
310// Stride returns number of bytes per image row. TODO only works
311// for known formats -- need to add more as needed.

Callers 3

AllocHostMethod · 0.80
ConfigValueHostMethod · 0.80
MemSizeMethod · 0.80

Calls 1

LayerByteSizeMethod · 0.95

Tested by

no test coverage detected