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

Method PropertiesString

vgpu/gpu.go:469–483  ·  view source on GitHub ↗

PropertiesString returns a human-readable summary of the GPU properties.

(print bool)

Source from the content-addressed store, hash-verified

467
468// PropertiesString returns a human-readable summary of the GPU properties.
469func (gp *GPU) PropertiesString(print bool) string {
470 ps := "\n\n######## GPU Properties\n"
471 prs := reflectx.StringJSON(&gp.GPUProperties)
472 devnm := ` "DeviceName": `
473 ps += prs[:strings.Index(prs, devnm)]
474 ps += devnm + string(gp.GPUProperties.DeviceName[:]) + "\n"
475 ps += prs[strings.Index(prs, ` "Limits":`):]
476 // ps += "\n\n######## GPU Memory Properties\n" // not really useful
477 // ps += reflectx.StringJSON(&gp.MemoryProperties)
478 ps += "\n"
479 if print {
480 fmt.Println(ps)
481 }
482 return ps
483}
484
485func dbgCallbackFunc(flags vk.DebugReportFlags, objectType vk.DebugReportObjectType,
486 object uint64, location uint64, messageCode int32, pLayerPrefix string,

Callers

nothing calls this directly

Calls 3

StringJSONFunction · 0.92
PrintlnMethod · 0.80
IndexMethod · 0.45

Tested by

no test coverage detected