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

Method InitCompute

vgpu/system.go:86–96  ·  view source on GitHub ↗

InitCompute initializes the System for compute functionality, which creates its own Compute device.

(gp *GPU, name string)

Source from the content-addressed store, hash-verified

84// InitCompute initializes the System for compute functionality,
85// which creates its own Compute device.
86func (sy *System) InitCompute(gp *GPU, name string) error {
87 sy.GPU = gp
88 sy.Render.Sys = sy
89 sy.Name = name
90 sy.Compute = true
91 sy.Device.Init(gp, vk.QueueComputeBit)
92 sy.InitCmd()
93 sy.Mem.Init(gp, &sy.Device)
94 sy.NewFence("ComputeWait") // always have this named fence avail for wait
95 return nil
96}
97
98// InitCmd initializes the command pool and buffer
99func (sy *System) InitCmd() {

Callers 1

NewComputeSystemMethod · 0.95

Calls 3

InitCmdMethod · 0.95
NewFenceMethod · 0.95
InitMethod · 0.65

Tested by

no test coverage detected