Documentation ¶
Index ¶
- Constants
- type Argument
- type Buffer
- func (b *Buffer) Cleanup()
- func (b *Buffer) GetData(dataSize int, dataPtr unsafe.Pointer) error
- func (b *Buffer) GetDataArr(dataSize int, dataPtr unsafe.Pointer) error
- func (b *Buffer) GetDataFloat() (float32, error)
- func (b *Buffer) GetDataFloatArr() ([]float32, error)
- func (b *Buffer) GetDataImage() (image.Image, error)
- func (b *Buffer) GetDataInt() (int32, error)
- func (b *Buffer) GetDataIntArr() ([]int32, error)
- type Const
- type Program
- func (p *Program) DeviceWorkGroupSize() int
- func (p *Program) Execute(length []int, local []int, args ...Argument) error
- func (p *Program) MaxWorkGroupSize() (int, error)
- func (p *Program) NewBufferFromArr(size int, dataPtr unsafe.Pointer, length int) (*Buffer, error)
- func (p *Program) NewBufferFromData(size int, dataPtr unsafe.Pointer) (*Buffer, error)
- func (p *Program) NewBufferFromFloat(data float32) (*Buffer, error)
- func (p *Program) NewBufferFromFloatArr(data []float32) (*Buffer, error)
- func (p *Program) NewBufferFromImage(im image.Image) (*Buffer, error)
- func (p *Program) NewBufferFromInt(data int32) (*Buffer, error)
- func (p *Program) NewBufferFromIntArr(data []int32) (*Buffer, error)
- func (p *Program) NewEmptyFloat32Arr(length int) (*Buffer, error)
- func (p *Program) PreferredWorkGroupSize() (int, error)
Constants ¶
View Source
const ( DeviceTypeCPU = cl.DeviceTypeCPU DeviceTypeGPU = cl.DeviceTypeGPU DeviceTypeAccelerator = cl.DeviceTypeAccelerator DeviceTypeDefault = cl.DeviceTypeDefault DeviceTypeAll = cl.DeviceTypeAll )
For convenience
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) GetDataFloat ¶
func (*Buffer) GetDataFloatArr ¶
func (*Buffer) GetDataInt ¶
func (*Buffer) GetDataIntArr ¶
type Program ¶
type Program struct {
// contains filtered or unexported fields
}
func NewProgram ¶
func (*Program) DeviceWorkGroupSize ¶
DeviceWorkGroupSize gets the device's maximum OpenCL work group size for the kernel
func (*Program) Execute ¶
Execute executes the kernel. The length should be the [width, height] for an image and [length] for an array.
func (*Program) MaxWorkGroupSize ¶
MaxWorkGroupSize gets the maximum OpenCL work group size for the kernel
func (*Program) NewBufferFromArr ¶
func (*Program) NewBufferFromData ¶
func (*Program) NewBufferFromFloat ¶
func (*Program) NewBufferFromFloatArr ¶
func (*Program) NewBufferFromImage ¶
func (*Program) NewBufferFromIntArr ¶
func (*Program) NewEmptyFloat32Arr ¶
func (*Program) PreferredWorkGroupSize ¶
PrefferedWorkGroupSize gets the preferred OpenCL local work group size
Click to show internal directories.
Click to hide internal directories.