MCPcopy Index your code
hub / github.com/mudler/LocalAI / parseVulkanGPUHeader

Function parseVulkanGPUHeader

pkg/xsysinfo/gpu.go:1161–1172  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

1159}
1160
1161func parseVulkanGPUHeader(line string) (int, bool) {
1162 if !strings.HasPrefix(line, "GPU") || !strings.HasSuffix(line, ":") {
1163 return 0, false
1164 }
1165
1166 index, err := strconv.Atoi(strings.TrimSuffix(strings.TrimPrefix(line, "GPU"), ":"))
1167 if err != nil {
1168 return 0, false
1169 }
1170
1171 return index, true
1172}
1173
1174func parseVulkanValue(line string) string {
1175 _, value, ok := strings.Cut(line, "=")

Callers 1

parseVulkanGPUMemoryTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected