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

Method AddDeviceExt

vgpu/gpu.go:174–183  ·  view source on GitHub ↗

AddDeviceExt adds given extension(s), only if not already set returns true if added.

(ext ...string)

Source from the content-addressed store, hash-verified

172// AddDeviceExt adds given extension(s), only if not already set
173// returns true if added.
174func (gp *GPU) AddDeviceExt(ext ...string) bool {
175 for _, ex := range ext {
176 i := FindString(ex, gp.DeviceExts)
177 if i >= 0 {
178 continue
179 }
180 gp.DeviceExts = append(gp.DeviceExts, ex)
181 }
182 return true
183}
184
185// AddValidationLayer adds given validation layer, only if not already set
186// returns true if added.

Callers

nothing calls this directly

Calls 1

FindStringFunction · 0.85

Tested by

no test coverage detected