Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDeviceNotFound = errors.New("cl: Device Not Found") ErrDeviceNotAvailable = errors.New("cl: Device Not Available") ErrCompilerNotAvailable = errors.New("cl: Compiler Not Available") ErrMemObjectAllocationFailure = errors.New("cl: Mem Object Allocation Failure") ErrOutOfResources = errors.New("cl: Out Of Resources") ErrOutOfHostMemory = errors.New("cl: Out Of Host Memory") ErrProfilingInfoNotAvailable = errors.New("cl: Profiling Info Not Available") ErrMemCopyOverlap = errors.New("cl: Mem Copy Overlap") ErrImageFormatMismatch = errors.New("cl: Image Format Mismatch") ErrImageFormatNotSupported = errors.New("cl: Image Format Not Supported") ErrBuildProgramFailure = errors.New("cl: Build Program Failure") ErrMapFailure = errors.New("cl: Map Failure") ErrMisalignedSubBufferOffset = errors.New("cl: Misaligned Sub Buffer Offset") ErrExecStatusErrorForEventsInWaitList = errors.New("cl: Exec Status Error For Events In Wait List") ErrCompileProgramFailure = errors.New("cl: Compile Program Failure") ErrLinkerNotAvailable = errors.New("cl: Linker Not Available") ErrLinkProgramFailure = errors.New("cl: Link Program Failure") ErrDevicePartitionFailed = errors.New("cl: Device Partition Failed") ErrKernelArgInfoNotAvailable = errors.New("cl: Kernel Arg Info Not Available") ErrInvalidValue = errors.New("cl: Invalid Value") ErrInvalidDeviceType = errors.New("cl: Invalid Device Type") ErrInvalidPlatform = errors.New("cl: Invalid Platform") ErrInvalidDevice = errors.New("cl: Invalid Device") ErrInvalidContext = errors.New("cl: Invalid Context") ErrInvalidQueueProperties = errors.New("cl: Invalid Queue Properties") ErrInvalidCommandQueue = errors.New("cl: Invalid Command Queue") ErrInvalidHostPtr = errors.New("cl: Invalid Host Ptr") ErrInvalidMemObject = errors.New("cl: Invalid Mem Object") ErrInvalidImageFormatDescriptor = errors.New("cl: Invalid Image Format Descriptor") ErrInvalidImageSize = errors.New("cl: Invalid Image Size") ErrInvalidSampler = errors.New("cl: Invalid Sampler") ErrInvalidBinary = errors.New("cl: Invalid Binary") ErrInvalidBuildOptions = errors.New("cl: Invalid Build Options") ErrInvalidProgram = errors.New("cl: Invalid Program") ErrInvalidProgramExecutable = errors.New("cl: Invalid Program Executable") ErrInvalidKernelName = errors.New("cl: Invalid Kernel Name") ErrInvalidKernelDefinition = errors.New("cl: Invalid Kernel Definition") ErrInvalidKernel = errors.New("cl: Invalid Kernel") ErrInvalidArgIndex = errors.New("cl: Invalid Arg Index") ErrInvalidArgValue = errors.New("cl: Invalid Arg Value") ErrInvalidArgSize = errors.New("cl: Invalid Arg Size") ErrInvalidKernelArgs = errors.New("cl: Invalid Kernel Args") ErrInvalidWorkDimension = errors.New("cl: Invalid Work Dimension") ErrInvalidWorkGroupSize = errors.New("cl: Invalid Work Group Size") ErrInvalidWorkItemSize = errors.New("cl: Invalid Work Item Size") ErrInvalidGlobalOffset = errors.New("cl: Invalid Global Offset") ErrInvalidEventWaitList = errors.New("cl: Invalid Event Wait List") ErrInvalidEvent = errors.New("cl: Invalid Event") ErrInvalidOperation = errors.New("cl: Invalid Operation") ErrInvalidGlObject = errors.New("cl: Invalid Gl Object") ErrInvalidBufferSize = errors.New("cl: Invalid Buffer Size") ErrInvalidMipLevel = errors.New("cl: Invalid Mip Level") ErrInvalidGlobalWorkSize = errors.New("cl: Invalid Global Work Size") ErrInvalidProperty = errors.New("cl: Invalid Property") ErrInvalidImageDescriptor = errors.New("cl: Invalid Image Descriptor") ErrInvalidCompilerOptions = errors.New("cl: Invalid Compiler Options") ErrInvalidLinkerOptions = errors.New("cl: Invalid Linker Options") ErrInvalidDevicePartitionCount = errors.New("cl: Invalid Device Partition Count") ErrNoValidICDs = errors.New("cl: No valid ICDs found") )
View Source
var ErrUnknown = errors.New("cl: unknown error")
ErrUnknown is a result from an OpenCL function (e.g. CL_SUCCESS but null pointer)
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func GetDevices ¶
func GetDevices(platform *Platform, deviceType DeviceType) ([]*Device, error)
GetDevices returns a list of available devices on a platform. 'platform' refers to the platform returned by GetPlatforms or can be nil. If platform is nil, the behavior is implementation-defined.
func (*Device) DriverVersion ¶
DriverVersion returns the OpenCL driver revision
func (*Device) OpenCLVersion ¶
OpenCLVersion returns the version of OpenCL supported by this device
func (*Device) Type ¶
func (s *Device) Type() (dt DeviceType, err error)
Type returns the type of OpenCL device this is (CPU, GPU, etc.)
type DeviceType ¶
type DeviceType uint32
DeviceType is the type of OpenCL Device (e.g. FPGA, CPU, GPU)
const ( DeviceTypeCPU DeviceType = C.CL_DEVICE_TYPE_CPU DeviceTypeGPU DeviceType = C.CL_DEVICE_TYPE_GPU DeviceTypeAccelerator DeviceType = C.CL_DEVICE_TYPE_ACCELERATOR DeviceTypeDefault DeviceType = C.CL_DEVICE_TYPE_DEFAULT DeviceTypeAll DeviceType = C.CL_DEVICE_TYPE_ALL )
func (DeviceType) String ¶
func (dt DeviceType) String() string
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func GetPlatforms ¶
GetPlatforms returns a list of available OpenCL platforms
func (*Platform) GetDevices ¶
func (p *Platform) GetDevices(deviceType DeviceType) ([]*Device, error)
GetDevices returns a list of devices for this particular platform
Click to show internal directories.
Click to hide internal directories.