Versions in this module Expand all Collapse all v0 v0.1.0 Aug 31, 2026 Changes in this version + var ErrNoDevice = errors.New("metal: no GPU on this machine") + var ErrUnsupported = errors.New("metal: only macOS has Metal") + func Constant[T any](e *Encoder, index int, v *T) + type Buffer struct + func (b *Buffer) Bytes() []byte + func (b *Buffer) Close() + type Device struct + func Default() (*Device, error) + func (d *Device) Close() + func (d *Device) Compile(source string) (*Library, error) + func (d *Device) Compile(string) (*Library, error) + func (d *Device) Name() string + func (d *Device) NewBuffer(int) (*Buffer, error) + func (d *Device) NewBuffer(n int) (*Buffer, error) + func (d *Device) Run(fn func(*Encoder)) error + func (d *Device) Run(func(*Encoder)) error + func (d *Device) UnifiedMemory() bool + type Encoder struct + func (e *Encoder) Buffer(index int, b *Buffer) + func (e *Encoder) Buffer(int, *Buffer) + func (e *Encoder) Dispatch(...int) + func (e *Encoder) Dispatch(dims ...int) + func (e *Encoder) Use(*Pipeline) + func (e *Encoder) Use(p *Pipeline) + type Library struct + func (l *Library) Close() + func (l *Library) Pipeline(name string) (*Pipeline, error) + func (l *Library) Pipeline(string) (*Pipeline, error) + type Pipeline struct + func (p *Pipeline) Close()