Documentation ¶
Overview ¶
A simple wrapper around the OpenCL 1.1 C API.
Index ¶
- Constants
- Variables
- func BuildProgram(program Program, devices []DeviceID, options string, ...) error
- func CodeToError(code Int) error
- func CreateKernelsInProgram(program Program, kernels []Kernel, num_kernels_ret *Uint) error
- func EnqueueBarrier(command_queue CommandQueue) error
- func EnqueueCopyBuffer(command_queue CommandQueue, src_buffer, dst_buffer Mem, ...) error
- func EnqueueCopyBufferRect(command_queue CommandQueue, src_buffer, dst_buffer Mem, ...) error
- func EnqueueCopyBufferToImage(command_queue CommandQueue, src_buffer, dst_image Mem, src_offset Size, ...) error
- func EnqueueCopyImage(command_queue CommandQueue, src_image, dst_image Mem, ...) error
- func EnqueueCopyImageToBuffer(command_queue CommandQueue, src_image, dst_buffer Mem, ...) error
- func EnqueueMapBuffer(command_queue CommandQueue, buffer Mem, blocking_map Bool, map_flags MapFlags, ...) (unsafe.Pointer, error)
- func EnqueueMapImage(command_queue CommandQueue, image Mem, blocking_map Bool, map_flags MapFlags, ...) (unsafe.Pointer, error)
- func EnqueueMarker(command_queue CommandQueue, event *Event) error
- func EnqueueNDRangeKernel(command_queue CommandQueue, kernel Kernel, ...) error
- func EnqueueNativeKernel(command_queue CommandQueue, user_func NativeKernelFunc, userData interface{}, ...) error
- func EnqueueReadBuffer(command_queue CommandQueue, buffer Mem, blocking_read Bool, offset, cb Size, ...) error
- func EnqueueReadBufferRect(command_queue CommandQueue, buffer Mem, blocking_read Bool, ...) error
- func EnqueueReadImage(command_queue CommandQueue, image Mem, blocking_read Bool, ...) error
- func EnqueueTask(command_queue CommandQueue, kernel Kernel, wait_list []Event, event *Event) error
- func EnqueueUnmapMemObject(command_queue CommandQueue, memobj Mem, mapped_ptr unsafe.Pointer, ...) error
- func EnqueueWaitForEvents(command_queue CommandQueue, wait_list []Event) error
- func EnqueueWriteBuffer(command_queue CommandQueue, buffer Mem, blocking_read Bool, offset, cb Size, ...) error
- func EnqueueWriteBufferRect(command_queue CommandQueue, buffer Mem, blocking_read Bool, ...) error
- func EnqueueWriteImage(command_queue CommandQueue, image Mem, blocking_read Bool, ...) error
- func Finish(cq CommandQueue) error
- func Flush(cq CommandQueue) error
- func GetCommandQueueInfo(command_queue CommandQueue, param_name CommandQueueInfo, param_value_size Size, ...) error
- func GetContextInfo(context Context, param_name ContextInfo, param_value_size Size, ...) error
- func GetDeviceIDs(platform PlatformID, deviceType DeviceType, numEntries Uint, devices *DeviceID, ...) error
- func GetDeviceInfo(device DeviceID, paramName DeviceInfo, paramValueSize Size, ...) error
- func GetEventInfo(event Event, paramName EventInfo, paramValueSize Size, ...) error
- func GetEventProfilingInfo(event Event, paramName ProfilingInfo, paramValueSize Size, ...) error
- func GetImageInfo(image Mem, param_name ImageInfo, param_value_size Size, ...) error
- func GetKernelInfo(kernel Kernel, param_name KernelInfo, param_value_size Size, ...) error
- func GetKernelWorkGroupInfo(kernel Kernel, device DeviceID, param_name KernelWorkGroupInfo, ...) error
- func GetMemObjectInfo(memobj Mem, param_name MemInfo, param_value_size Size, ...) error
- func GetPlatformIDs(numEntries Uint, platforms *PlatformID, numPlatforms *Uint) error
- func GetPlatformInfo(platform PlatformID, paramName PlatformInfo, paramValueSize Size, ...) error
- func GetProgramBuildInfo(program Program, device DeviceID, param_name ProgramBuildInfo, ...) error
- func GetProgramInfo(program Program, param_name ProgramInfo, param_value_size Size, ...) error
- func GetSamplerInfo(sampler Sampler, param_name SamplerInfo, param_value_size Size, ...) error
- func GetSupportedImageFormats(context Context, flags MemFlags, image_type MemObjectType, num_entries Uint, ...) error
- func ReleaseCommandQueue(command_queue CommandQueue) error
- func ReleaseContext(context Context) error
- func ReleaseEvent(event Event) error
- func ReleaseKernel(kernel Kernel) error
- func ReleaseMemObject(memobj Mem) error
- func ReleaseProgram(program Program) error
- func ReleaseSampler(sampler Sampler) error
- func RetainCommandQueue(command_queue CommandQueue) error
- func RetainContext(context Context) error
- func RetainEvent(event Event) error
- func RetainKernel(kernel Kernel) error
- func RetainMemObject(memobj Mem) error
- func RetainProgram(program Program) error
- func RetainSampler(sampler Sampler) error
- func SetEventCallback(event Event, command_exec_callback_type CommandExecutionStatus, ...) error
- func SetKernelArg(kernel Kernel, arg_index Uint, arg_size Size, arg_value unsafe.Pointer) error
- func SetMemObjectDestructorCallback(memobj Mem, callback BufferCallbackFunc, user_data interface{}) error
- func SetUserEventStatus(event Event, execution_status Int) error
- func UnloadCompiler() error
- func WaitForEvents(wait_list []Event) error
- type AddressingMode
- type Bool
- type BufferCallbackFunc
- type BufferRegion
- type BuildStatus
- type ChannelOrder
- type ChannelType
- type Char
- type Char16
- type Char2
- type Char4
- type Char8
- type CommandExecutionStatus
- type CommandQueue
- type CommandQueueInfo
- type CommandQueueProperties
- type CommandType
- type Context
- type ContextCallbackFunc
- type ContextInfo
- type ContextProperties
- type DeviceExecCapabilities
- type DeviceFPConfig
- type DeviceID
- type DeviceInfo
- type DeviceLocalMemType
- type DeviceMemCacheType
- type DeviceType
- type Double
- type Double16
- type Double2
- type Double4
- type Double8
- type Event
- type EventCallbackFunc
- type EventInfo
- type FilterMode
- type Float
- type Float16
- type Float2
- type Float4
- type Float8
- type Half
- type ImageFormat
- type ImageInfo
- type Int
- type Int16
- type Int2
- type Int4
- type Int8
- type Kernel
- type KernelInfo
- type KernelWorkGroupInfo
- type Long
- type Long16
- type Long2
- type Long4
- type Long8
- type MapFlags
- type Mem
- func CreateBuffer(context Context, flags MemFlags, size Size, host_ptr unsafe.Pointer) (Mem, error)
- func CreateImage2D(context Context, flags MemFlags, image_format ImageFormat, ...) (Mem, error)
- func CreateImage3D(context Context, flags MemFlags, image_format ImageFormat, ...) (Mem, error)
- func CreateSubBuffer(buffer Mem, flags MemFlags, buffer_create interface{}) (Mem, error)
- type MemFlags
- type MemInfo
- type MemObjectType
- type NativeKernelFunc
- type PlatformID
- type PlatformInfo
- type ProfilingInfo
- type Program
- type ProgramBuildInfo
- type ProgramCallbackFunc
- type ProgramInfo
- type Sampler
- type SamplerInfo
- type Short
- type Short16
- type Short2
- type Short4
- type Short8
- type Size
- type Uchar
- type Uchar16
- type Uchar2
- type Uchar4
- type Uchar8
- type Uint
- type Uint16
- type Uint2
- type Uint4
- type Uint8
- type Ulong
- type Ulong16
- type Ulong2
- type Ulong4
- type Ulong8
- type UnknownError
- type Ushort
- type Ushort16
- type Ushort2
- type Ushort4
- type Ushort8
Constants ¶
const ( KernelFunctionName = KernelInfo(C.CL_KERNEL_FUNCTION_NAME) KernelNumArgs = KernelInfo(C.CL_KERNEL_NUM_ARGS) KernelReferenceCount = KernelInfo(C.CL_KERNEL_REFERENCE_COUNT) KernelContext = KernelInfo(C.CL_KERNEL_CONTEXT) KernelProgram = KernelInfo(C.CL_KERNEL_PROGRAM) )
const ( KernelWorkGroupSize = KernelWorkGroupInfo(C.CL_KERNEL_WORK_GROUP_SIZE) KernelCompileWorkGroupSize = KernelWorkGroupInfo(C.CL_KERNEL_COMPILE_WORK_GROUP_SIZE) KernelLocalMemSize = KernelWorkGroupInfo(C.CL_KERNEL_LOCAL_MEM_SIZE) KernelPreferredWorkGroupSizeMultiple = KernelWorkGroupInfo(C.CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE) KernelPrivateMemSize = KernelWorkGroupInfo(C.CL_KERNEL_PRIVATE_MEM_SIZE) )
const ( ProgramReferenceCount = ProgramInfo(C.CL_PROGRAM_REFERENCE_COUNT) ProgramContext = ProgramInfo(C.CL_PROGRAM_CONTEXT) ProgramNumDevices = ProgramInfo(C.CL_PROGRAM_NUM_DEVICES) ProgramDevices = ProgramInfo(C.CL_PROGRAM_DEVICES) ProgramSource = ProgramInfo(C.CL_PROGRAM_SOURCE) ProgramBinarySizes = ProgramInfo(C.CL_PROGRAM_BINARY_SIZES) ProgramBinaries = ProgramInfo(C.CL_PROGRAM_BINARIES) )
const ( ProgramBuildStatusInfo = ProgramBuildInfo(C.CL_PROGRAM_BUILD_STATUS) ProgramBuildOptions = ProgramBuildInfo(C.CL_PROGRAM_BUILD_OPTIONS) ProgramBuildLog = ProgramBuildInfo(C.CL_PROGRAM_BUILD_LOG) )
const ( BuildSuccess = BuildStatus(C.CL_BUILD_SUCCESS) BuildNone = BuildStatus(C.CL_BUILD_NONE) BuildError = BuildStatus(C.CL_BUILD_ERROR) BuildInProgress = BuildStatus(C.CL_BUILD_IN_PROGRESS) )
Variables ¶
var ( DeviceNotFound = errors.New("cl: device not found") DeviceNotAvailable = errors.New("cl: device not available") CompilerNotAvailable = errors.New("cl: compiler not available") MemObjectAllocationFailure = errors.New("cl: mem object allocation failure") OutOfResources = errors.New("cl: out of resources") OutOfHostMemory = errors.New("cl: out of host memory") ProfilingInfoNotAvailable = errors.New("cl: profiling info not available") MemCopyOverlap = errors.New("cl: mem copy overlap") ImageFormatMismatch = errors.New("cl: image format mismatch") ImageFormatNotSupported = errors.New("cl: image format not supported") BuildProgramFailure = errors.New("cl: build program failure") MapFailure = errors.New("cl: map failure") MisalignedSubBufferOffset = errors.New("cl: misaligned sub buffer offset") ExecStatusErrorForEventsInWaitList = errors.New("cl: exec status error for events in wait list") )
var ( InvalidValue = errors.New("cl: invalid value") InvalidDeviceType = errors.New("cl: invalid device type") InvalidPlatform = errors.New("cl: invalid platform") InvalidDevice = errors.New("cl: invalid device") InvalidContext = errors.New("cl: invalid context") InvalidQueueProperties = errors.New("cl: invalid queue properties") InvalidCommandQueue = errors.New("cl: invalid command queue") InvalidHostPtr = errors.New("cl: invalid host ptr") InvalidMemObject = errors.New("cl: invalid mem object") InvalidImageFormatDescriptor = errors.New("cl: invalid image format descriptor") InvalidImageSize = errors.New("cl: invalid image size") InvalidSampler = errors.New("cl: invalid sampler") InvalidBinary = errors.New("cl: invalid binary") InvalidBuildOptions = errors.New("cl: invalid build options") InvalidProgram = errors.New("cl: invalid program") InvalidProgramExecutable = errors.New("cl: invalid program executable") InvalidKernelName = errors.New("cl: invalid kernel name") InvalidKernelDefinition = errors.New("cl: invalid kernel definition") InvalidKernel = errors.New("cl: invalid kernel") InvalidArgIndex = errors.New("cl: invalid arg index") InvalidArgValue = errors.New("cl: invalid arg value") InvalidArgSize = errors.New("cl: invalid arg size") InvalidKernelArgs = errors.New("cl: invalid kernel args") InvalidWorkDimension = errors.New("cl: invalid work dimension") InvalidWorkGroupSize = errors.New("cl: invalid work group size") InvalidWorkItemSize = errors.New("cl: invalid work item size") InvalidGlobalOffset = errors.New("cl: invalid global offset") InvalidEventWaitList = errors.New("cl: invalid event wait list") InvalidEvent = errors.New("cl: invalid event") InvalidOperation = errors.New("cl: invalid operation") InvalidGlObject = errors.New("cl: invalid gl object") InvalidBufferSize = errors.New("cl: invalid buffer size") InvalidMipLevel = errors.New("cl: invalid mip level") InvalidGlobalWorkSize = errors.New("cl: invalid global work size") InvalidProperty = errors.New("cl: invalid property") )
var (
BufferCallbackFunction = bufferCallback
)
var (
EventCallbackFunction = eventCallback
)
Functions ¶
func BuildProgram ¶
func BuildProgram(program Program, devices []DeviceID, options string, callback ProgramCallbackFunc, userData interface{}) error
Builds (compiles and links) a program executable from the program source or binary. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clBuildProgram.html
func CodeToError ¶
CodeToError converts an OpenCL int to an OpenCL error.
func CreateKernelsInProgram ¶
Creates kernel objects for all kernel functions in a program object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernelsInProgram.html
func EnqueueBarrier ¶
func EnqueueBarrier(command_queue CommandQueue) error
A synchronization point that enqueues a barrier operation. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueBarrier.html
func EnqueueCopyBuffer ¶
func EnqueueCopyBuffer(command_queue CommandQueue, src_buffer, dst_buffer Mem, src_offset, dst_offset, cb Size, wait_list []Event, event *Event) error
Enqueues a command to copy from one buffer object to another. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBuffer.html
func EnqueueCopyBufferRect ¶
func EnqueueCopyBufferRect(command_queue CommandQueue, src_buffer, dst_buffer Mem, src_origin, dst_origin, region [3]Size, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch Size, wait_list []Event, event *Event) error
Enqueues a command to copy a rectangular region from the buffer object to another buffer object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferRect.html
func EnqueueCopyBufferToImage ¶
func EnqueueCopyBufferToImage(command_queue CommandQueue, src_buffer, dst_image Mem, src_offset Size, dst_origin, region [3]Size, wait_list []Event, event *Event) error
Enqueues a command to copy a buffer object to an image object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyBufferToImage.html
func EnqueueCopyImage ¶
func EnqueueCopyImage(command_queue CommandQueue, src_image, dst_image Mem, src_origin, dst_origin, region [3]Size, wait_list []Event, event *Event) error
Enqueues a command to copy image objects. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImage.html
func EnqueueCopyImageToBuffer ¶
func EnqueueCopyImageToBuffer(command_queue CommandQueue, src_image, dst_buffer Mem, src_origin, region [3]Size, dst_offset Size, wait_list []Event, event *Event) error
Enqueues a command to copy an image object to a buffer object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueCopyImageToBuffer.html
func EnqueueMapBuffer ¶
func EnqueueMapBuffer(command_queue CommandQueue, buffer Mem, blocking_map Bool, map_flags MapFlags, offset, cb Size, wait_list []Event, event *Event) (unsafe.Pointer, error)
Enqueues a command to map a region of the buffer object given by buffer into the host address space and returns a pointer to this mapped region. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMapBuffer.html
func EnqueueMapImage ¶
func EnqueueMapImage(command_queue CommandQueue, image Mem, blocking_map Bool, map_flags MapFlags, origin, region [3]Size, image_row_pitch, image_slice_pitch *Size, wait_list []Event, event *Event) (unsafe.Pointer, error)
Enqueues a command to map a region of an image object into the host address space and returns a pointer to this mapped region. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMapImage.html
func EnqueueMarker ¶
func EnqueueMarker(command_queue CommandQueue, event *Event) error
Enqueues a marker command. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMarker.html
func EnqueueNDRangeKernel ¶
func EnqueueNDRangeKernel(command_queue CommandQueue, kernel Kernel, global_work_offset, global_work_size, local_work_size []Size, wait_list []Event, event *Event) error
Enqueues a command to execute a kernel on a device. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html
func EnqueueNativeKernel ¶
func EnqueueNativeKernel(command_queue CommandQueue, user_func NativeKernelFunc, userData interface{}, mem_object_list []Mem, args_mem_loc *unsafe.Pointer, wait_list []Event, event *Event) error
Enqueues a command to execute a native C/C++ function not compiled using the OpenCL compiler. UNTESTED http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNativeKernel.html
func EnqueueReadBuffer ¶
func EnqueueReadBuffer(command_queue CommandQueue, buffer Mem, blocking_read Bool, offset, cb Size, ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueue commands to read from a buffer object to host memory. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBuffer.html
func EnqueueReadBufferRect ¶
func EnqueueReadBufferRect(command_queue CommandQueue, buffer Mem, blocking_read Bool, buffer_origin, host_origin, region [3]Size, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch Size, ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueue commands to read from a rectangular region from a buffer object to host memory. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReadBufferRect.html
func EnqueueReadImage ¶
func EnqueueReadImage(command_queue CommandQueue, image Mem, blocking_read Bool, origin, region [3]Size, row_pitch, slice_pitch Size, ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueues a command to read from a 2D or 3D image object to host memory. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMapImage.html
func EnqueueTask ¶
func EnqueueTask(command_queue CommandQueue, kernel Kernel, wait_list []Event, event *Event) error
Enqueues a command to execute a kernel on a device. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueTask.html
func EnqueueUnmapMemObject ¶
func EnqueueUnmapMemObject(command_queue CommandQueue, memobj Mem, mapped_ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueues a command to unmap a previously mapped region of a memory object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueUnmapMemObject.html
func EnqueueWaitForEvents ¶
func EnqueueWaitForEvents(command_queue CommandQueue, wait_list []Event) error
Enqueues a wait for a specific event or a list of events to complete before any future commands queued in the command-queue are executed. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWaitForEvents.html
func EnqueueWriteBuffer ¶
func EnqueueWriteBuffer(command_queue CommandQueue, buffer Mem, blocking_read Bool, offset, cb Size, ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueue commands to write to a buffer object from host memory. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBuffer.html
func EnqueueWriteBufferRect ¶
func EnqueueWriteBufferRect(command_queue CommandQueue, buffer Mem, blocking_read Bool, buffer_origin, host_origin, region [3]Size, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch Size, ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueue commands to write a rectangular region to a buffer object from host memory. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWriteBufferRect.html
func EnqueueWriteImage ¶
func EnqueueWriteImage(command_queue CommandQueue, image Mem, blocking_read Bool, origin, region [3]Size, row_pitch, slice_pitch Size, ptr unsafe.Pointer, wait_list []Event, event *Event) error
Enqueues a command to write to a 2D or 3D image object from host memory. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMapImage.html
func Finish ¶
func Finish(cq CommandQueue) error
Blocks until all previously queued OpenCL commands in a command-queue are issued to the associated device and have completed. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clFinish.html
func Flush ¶
func Flush(cq CommandQueue) error
Issues all previously queued OpenCL commands in a command-queue to the device associated with the command-queue. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clFlush.html
func GetCommandQueueInfo ¶
func GetCommandQueueInfo(command_queue CommandQueue, param_name CommandQueueInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Query information about a command-queue. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetCommandQueueInfo.html
func GetContextInfo ¶
func GetContextInfo(context Context, param_name ContextInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Query information about a context. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetContextInfo.html
func GetDeviceIDs ¶
func GetDeviceIDs(platform PlatformID, deviceType DeviceType, numEntries Uint, devices *DeviceID, numDevices *Uint) error
Obtain the list of devices available on a platform. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceIDs.html
func GetDeviceInfo ¶
func GetDeviceInfo(device DeviceID, paramName DeviceInfo, paramValueSize Size, paramValue unsafe.Pointer, paramValueSizeRet *Size) error
Get information about an OpenCL device. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html
func GetEventInfo ¶
func GetEventInfo(event Event, paramName EventInfo, paramValueSize Size, paramValue unsafe.Pointer, paramValueSizeRet *Size) error
Returns information about the event object. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventInfo.html
func GetEventProfilingInfo ¶
func GetEventProfilingInfo(event Event, paramName ProfilingInfo, paramValueSize Size, paramValue unsafe.Pointer, paramValueSizeRet *Size) error
Returns profiling information for the command associated with event if profiling is enabled. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetEventProfilingInfo.html
func GetImageInfo ¶
func GetImageInfo(image Mem, param_name ImageInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Get information specific to an image object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetImageInfo.html
func GetKernelInfo ¶
func GetKernelInfo(kernel Kernel, param_name KernelInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Returns information about the kernel object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelInfo.html
func GetKernelWorkGroupInfo ¶
func GetKernelWorkGroupInfo(kernel Kernel, device DeviceID, param_name KernelWorkGroupInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Returns information about the kernel object that may be specific to a device. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetKernelWorkGroupInfo.html
func GetMemObjectInfo ¶
func GetMemObjectInfo(memobj Mem, param_name MemInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_return *Size) error
Used to get information that is common to all memory objects (buffer and image objects). https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetMemObjectInfo.html
func GetPlatformIDs ¶
func GetPlatformIDs(numEntries Uint, platforms *PlatformID, numPlatforms *Uint) error
Obtain the list of platforms available. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformIDs.html
func GetPlatformInfo ¶
func GetPlatformInfo(platform PlatformID, paramName PlatformInfo, paramValueSize Size, paramValue unsafe.Pointer, paramValueSizeRet *Size) error
Get specific information about the OpenCL platform. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetPlatformInfo.html
func GetProgramBuildInfo ¶
func GetProgramBuildInfo(program Program, device DeviceID, param_name ProgramBuildInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Returns build information for each device in the program object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramBuildInfo.html
func GetProgramInfo ¶
func GetProgramInfo(program Program, param_name ProgramInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Returns information about the program object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetProgramInfo.html
func GetSamplerInfo ¶
func GetSamplerInfo(sampler Sampler, param_name SamplerInfo, param_value_size Size, param_value unsafe.Pointer, param_value_size_ret *Size) error
Returns information about the sampler object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSamplerInfo.html
func GetSupportedImageFormats ¶
func GetSupportedImageFormats(context Context, flags MemFlags, image_type MemObjectType, num_entries Uint, image_formats *ImageFormat, num_image_formats *Uint) error
Get the list of image formats supported by an OpenCL implementation. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetSupportedImageFormats.html
func ReleaseCommandQueue ¶
func ReleaseCommandQueue(command_queue CommandQueue) error
Decrements the command_queue reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseCommandQueue.html
func ReleaseContext ¶
Decrement the context reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseContext.html
func ReleaseEvent ¶
Decrements the event reference count. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseEvent.html
func ReleaseKernel ¶
Decrements the kernel reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseKernel.html
func ReleaseMemObject ¶
Decrements the memory object reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseMemObject.html
func ReleaseProgram ¶
Decrements the program reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseProgram.html
func ReleaseSampler ¶
Decrements the sampler reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clReleaseSampler.html
func RetainCommandQueue ¶
func RetainCommandQueue(command_queue CommandQueue) error
Increments the command_queue reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainCommandQueue.html
func RetainContext ¶
Increment the context reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainContext.html
func RetainEvent ¶
Increments the event reference count. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainEvent.html
func RetainKernel ¶
Increments the kernel object reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainKernel.html
func RetainMemObject ¶
Increments the memory object reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainMemObject.html
func RetainProgram ¶
Increments the program reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainProgram.html
func RetainSampler ¶
Increments the sampler reference count. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clRetainSampler.html
func SetEventCallback ¶
func SetEventCallback(event Event, command_exec_callback_type CommandExecutionStatus, callback EventCallbackFunc, user_data interface{}) error
Registers a user callback function for a specific command execution status. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetEventCallback.html
func SetKernelArg ¶
Used to set the argument value for a specific argument of a kernel. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetKernelArg.html
func SetMemObjectDestructorCallback ¶
func SetMemObjectDestructorCallback(memobj Mem, callback BufferCallbackFunc, user_data interface{}) error
Registers a user callback function that will be called when the memory object is deleted and its resources freed. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetMemObjectDestructorCallback.html
func SetUserEventStatus ¶
Sets the execution status of a user event object. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clSetUserEventStatus.html
func UnloadCompiler ¶
func UnloadCompiler() error
Allows the implementation to release the resources allocated by the OpenCL compiler. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clUnloadCompiler.html
func WaitForEvents ¶
Waits on the host thread for commands identified by event objects to complete. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clWaitForEvents.html
Types ¶
type AddressingMode ¶
type AddressingMode C.cl_addressing_mode
type BufferCallbackFunc ¶
type BufferCallbackFunc func(memobj Mem, userData interface{})
type BufferRegion ¶
type BuildStatus ¶
type BuildStatus C.cl_build_status
type ChannelOrder ¶
type ChannelOrder C.cl_channel_order
const ( R ChannelOrder = C.CL_R A ChannelOrder = C.CL_A RG ChannelOrder = C.CL_RG RA ChannelOrder = C.CL_RA RGB ChannelOrder = C.CL_RGB RGBA ChannelOrder = C.CL_RGBA BGRA ChannelOrder = C.CL_BGRA ARGB ChannelOrder = C.CL_ARGB Intensity ChannelOrder = C.CL_INTENSITY Luminance ChannelOrder = C.CL_LUMINANCE Rx ChannelOrder = C.CL_Rx RGx ChannelOrder = C.CL_RGx RGBx ChannelOrder = C.CL_RGBx )
type ChannelType ¶
type ChannelType C.cl_channel_type
const ( SnormInt8 ChannelType = C.CL_SNORM_INT8 SnormInt16 ChannelType = C.CL_SNORM_INT16 UnormInt8 ChannelType = C.CL_UNORM_INT8 UnormInt16 ChannelType = C.CL_UNORM_INT16 UnormShort565 ChannelType = C.CL_UNORM_SHORT_565 UnormShort555 ChannelType = C.CL_UNORM_SHORT_555 UnormInt101010 ChannelType = C.CL_UNORM_INT_101010 SignedInt8 ChannelType = C.CL_SIGNED_INT8 SignedInt16 ChannelType = C.CL_SIGNED_INT16 SignedInt32 ChannelType = C.CL_SIGNED_INT32 UnsignedInt8 ChannelType = C.CL_UNSIGNED_INT8 UnsignedInt16 ChannelType = C.CL_UNSIGNED_INT16 UnsignedInt32 ChannelType = C.CL_UNSIGNED_INT32 HalfFloat ChannelType = C.CL_HALF_FLOAT Float32 ChannelType = C.CL_FLOAT // Appended "32" due to conflict with type. )
type CommandExecutionStatus ¶
const ( Complete CommandExecutionStatus = C.CL_COMPLETE Running CommandExecutionStatus = C.CL_RUNNING Submitted CommandExecutionStatus = C.CL_SUBMITTED Queued CommandExecutionStatus = C.CL_QUEUED )
type CommandQueue ¶
type CommandQueue C.cl_command_queue
func CreateCommandQueue ¶
func CreateCommandQueue(context Context, device DeviceID, properties CommandQueueProperties) (CommandQueue, error)
Create a command-queue on a specific device. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateCommandQueue.html
type CommandQueueInfo ¶
type CommandQueueInfo C.cl_command_queue_info
const ( QueueContext CommandQueueInfo = C.CL_QUEUE_CONTEXT QueueDevice CommandQueueInfo = C.CL_QUEUE_DEVICE QueueReferenceCount CommandQueueInfo = C.CL_QUEUE_REFERENCE_COUNT QueueProperties CommandQueueInfo = C.CL_QUEUE_PROPERTIES )
type CommandQueueProperties ¶
type CommandQueueProperties C.cl_command_queue_properties
const ( QueueOutOfOrderExecModeEnable CommandQueueProperties = C.CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE QueueProfilingEnable CommandQueueProperties = C.CL_QUEUE_PROFILING_ENABLE )
Bitfield.
type CommandType ¶
type CommandType C.cl_command_type
const ( CommandNdrangeKernel CommandType = C.CL_COMMAND_NDRANGE_KERNEL CommandTask CommandType = C.CL_COMMAND_TASK CommandNativeKernel CommandType = C.CL_COMMAND_NATIVE_KERNEL CommandReadBuffer CommandType = C.CL_COMMAND_READ_BUFFER CommandWriteBuffer CommandType = C.CL_COMMAND_WRITE_BUFFER CommandCopyBuffer CommandType = C.CL_COMMAND_COPY_BUFFER CommandReadImage CommandType = C.CL_COMMAND_READ_IMAGE CommandWriteImage CommandType = C.CL_COMMAND_WRITE_IMAGE CommandCopyImage CommandType = C.CL_COMMAND_COPY_IMAGE CommandCopyImageToBuffer CommandType = C.CL_COMMAND_COPY_IMAGE_TO_BUFFER CommandCopyBufferToImage CommandType = C.CL_COMMAND_COPY_BUFFER_TO_IMAGE CommandMapBuffer CommandType = C.CL_COMMAND_MAP_BUFFER CommandMapImage CommandType = C.CL_COMMAND_MAP_IMAGE CommandUnmapMemoryObject CommandType = C.CL_COMMAND_UNMAP_MEM_OBJECT CommandMarker CommandType = C.CL_COMMAND_MARKER CommandAcquireGlObjects CommandType = C.CL_COMMAND_ACQUIRE_GL_OBJECTS CommandReleaseGlObjects CommandType = C.CL_COMMAND_RELEASE_GL_OBJECTS CommandReadBufferRectangle CommandType = C.CL_COMMAND_READ_BUFFER_RECT CommandWriteBufferRectangle CommandType = C.CL_COMMAND_WRITE_BUFFER_RECT CommandCopyBufferRectangle CommandType = C.CL_COMMAND_COPY_BUFFER_RECT CommandUser CommandType = C.CL_COMMAND_USER )
type Context ¶
type Context C.cl_context
func CreateContext ¶
func CreateContext(properties []ContextProperties, devices []DeviceID, callback ContextCallbackFunc, user_data interface{}) (Context, error)
Creates an OpenCL context. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContext.html
NOTE: The callback and user_data will be referenced for the lifetime of the
program. Thus any variables captured if callback is a closure or any variables referenced by user_data will not be garbage collected.
func CreateContextFromType ¶
func CreateContextFromType(properties []ContextProperties, device_type DeviceType, callback ContextCallbackFunc, user_data interface{}) (Context, error)
Create an OpenCL context from a device type that identifies the specific device(s) to use. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateContextFromType.html
NOTE: The callback and user_data will be referenced for the lifetime of the
program. Thus any variables captured if callback is a closure or any variables referenced by user_data will not be garbage collected.
type ContextCallbackFunc ¶
type ContextInfo ¶
type ContextInfo C.cl_context_info
const ( ContextReferenceCount ContextInfo = C.CL_CONTEXT_REFERENCE_COUNT ContextDevices ContextInfo = C.CL_CONTEXT_DEVICES ContextPropertiesInfo ContextInfo = C.CL_CONTEXT_PROPERTIES // Appended "Info" due to conflict with type. ContextNumDevices ContextInfo = C.CL_CONTEXT_NUM_DEVICES )
type ContextProperties ¶
type ContextProperties C.cl_context_properties
const ( GLContext ContextProperties = C.CL_GL_CONTEXT_KHR EGLDisplay ContextProperties = C.CL_EGL_DISPLAY_KHR GLXDisplay ContextProperties = C.CL_GLX_DISPLAY_KHR )
const (
ContextPlatform ContextProperties = C.CL_CONTEXT_PLATFORM
)
type DeviceExecCapabilities ¶
type DeviceExecCapabilities C.cl_device_exec_capabilities
const ( ExecKernel DeviceExecCapabilities = C.CL_EXEC_KERNEL ExecNativeKernel DeviceExecCapabilities = C.CL_EXEC_NATIVE_KERNEL )
Bitfield
type DeviceFPConfig ¶
type DeviceFPConfig C.cl_device_fp_config
const ( FPDenorm DeviceFPConfig = C.CL_FP_DENORM FPFma DeviceFPConfig = C.CL_FP_FMA FPInfNan DeviceFPConfig = C.CL_FP_INF_NAN FPRoundToInf DeviceFPConfig = C.CL_FP_ROUND_TO_INF FPRoundToNearest DeviceFPConfig = C.CL_FP_ROUND_TO_NEAREST FPRoundToZero DeviceFPConfig = C.CL_FP_ROUND_TO_ZERO FPSoftFloat DeviceFPConfig = C.CL_FP_SOFT_FLOAT )
Bitfield.
type DeviceID ¶
type DeviceID C.cl_device_id
type DeviceInfo ¶
type DeviceInfo C.cl_device_info
const ( DeviceTypeInfo DeviceInfo = C.CL_DEVICE_TYPE // Appended "Info" due to conflict with type. DeviceVendorID DeviceInfo = C.CL_DEVICE_VENDOR_ID DeviceMaxComputeUnits DeviceInfo = C.CL_DEVICE_MAX_COMPUTE_UNITS DeviceMaxWorkItemDimensions DeviceInfo = C.CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS DeviceMaxWorkGroupSize DeviceInfo = C.CL_DEVICE_MAX_WORK_GROUP_SIZE DeviceMaxWorkItemSizes DeviceInfo = C.CL_DEVICE_MAX_WORK_ITEM_SIZES DevicePreferredVectorWidthChar DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR DevicePreferredVectorWidthShort DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT DevicePreferredVectorWidthInt DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT DevicePreferredVectorWidthLong DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG DevicePreferredVectorWidthFloat DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT DevicePreferredVectorWidthDouble DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE DeviceMaxClockFrequency DeviceInfo = C.CL_DEVICE_MAX_CLOCK_FREQUENCY DeviceAddressBits DeviceInfo = C.CL_DEVICE_ADDRESS_BITS DeviceMaxReadImageArgs DeviceInfo = C.CL_DEVICE_MAX_READ_IMAGE_ARGS DeviceMaxWriteImageArgs DeviceInfo = C.CL_DEVICE_MAX_WRITE_IMAGE_ARGS DeviceMaxMemAllocSize DeviceInfo = C.CL_DEVICE_MAX_MEM_ALLOC_SIZE DeviceImage2dMaxWidth DeviceInfo = C.CL_DEVICE_IMAGE2D_MAX_WIDTH DeviceImage2dMaxHeight DeviceInfo = C.CL_DEVICE_IMAGE2D_MAX_HEIGHT DeviceImage3dMaxWidth DeviceInfo = C.CL_DEVICE_IMAGE3D_MAX_WIDTH DeviceImage3dMaxHeight DeviceInfo = C.CL_DEVICE_IMAGE3D_MAX_HEIGHT DeviceImage3dMaxDepth DeviceInfo = C.CL_DEVICE_IMAGE3D_MAX_DEPTH DeviceImageSupport DeviceInfo = C.CL_DEVICE_IMAGE_SUPPORT DeviceMaxParameterSize DeviceInfo = C.CL_DEVICE_MAX_PARAMETER_SIZE DeviceMaxSamplers DeviceInfo = C.CL_DEVICE_MAX_SAMPLERS DeviceMemBaseAddrAlign DeviceInfo = C.CL_DEVICE_MEM_BASE_ADDR_ALIGN DeviceMinDataTypeAlignSize DeviceInfo = C.CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE DeviceSingleFpConfig DeviceInfo = C.CL_DEVICE_SINGLE_FP_CONFIG DeviceDoubleFpConfig DeviceInfo = C.CL_DEVICE_DOUBLE_FP_CONFIG DeviceHalfFpConfig DeviceInfo = C.CL_DEVICE_HALF_FP_CONFIG DeviceGlobalMemCacheType DeviceInfo = C.CL_DEVICE_GLOBAL_MEM_CACHE_TYPE DeviceGlobalMemCachelineSize DeviceInfo = C.CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE DeviceGlobalMemCacheSize DeviceInfo = C.CL_DEVICE_GLOBAL_MEM_CACHE_SIZE DeviceGlobalMemSize DeviceInfo = C.CL_DEVICE_GLOBAL_MEM_SIZE DeviceMaxConstantBufferSize DeviceInfo = C.CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE DeviceMaxConstantArgs DeviceInfo = C.CL_DEVICE_MAX_CONSTANT_ARGS DeviceLocalMemTypeInfo DeviceInfo = C.CL_DEVICE_LOCAL_MEM_TYPE // Appended "Info" due to conflict with type. DeviceLocalMemSize DeviceInfo = C.CL_DEVICE_LOCAL_MEM_SIZE DeviceErrorCorrectionSupport DeviceInfo = C.CL_DEVICE_ERROR_CORRECTION_SUPPORT DeviceProfilingTimerResolution DeviceInfo = C.CL_DEVICE_PROFILING_TIMER_RESOLUTION DeviceEndianLittle DeviceInfo = C.CL_DEVICE_ENDIAN_LITTLE DeviceAvailable DeviceInfo = C.CL_DEVICE_AVAILABLE DeviceCompilerAvailable DeviceInfo = C.CL_DEVICE_COMPILER_AVAILABLE DeviceExecutionCapabilities DeviceInfo = C.CL_DEVICE_EXECUTION_CAPABILITIES DeviceQueueProperties DeviceInfo = C.CL_DEVICE_QUEUE_PROPERTIES DeviceName DeviceInfo = C.CL_DEVICE_NAME DeviceVendor DeviceInfo = C.CL_DEVICE_VENDOR DriverVersion DeviceInfo = C.CL_DRIVER_VERSION DeviceProfile DeviceInfo = C.CL_DEVICE_PROFILE DeviceVersion DeviceInfo = C.CL_DEVICE_VERSION DeviceExtensions DeviceInfo = C.CL_DEVICE_EXTENSIONS DevicePlatform DeviceInfo = C.CL_DEVICE_PLATFORM DevicePreferredVectorWidthHalf DeviceInfo = C.CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF DeviceHostUnifiedMemory DeviceInfo = C.CL_DEVICE_HOST_UNIFIED_MEMORY DeviceNativeVectorWidthChar DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR DeviceNativeVectorWidthShort DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT DeviceNativeVectorWidthInt DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_INT DeviceNativeVectorWidthLong DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG DeviceNativeVectorWidthFloat DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT DeviceNativeVectorWidthDouble DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE DeviceNativeVectorWidthHalf DeviceInfo = C.CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF DeviceOpenCLCVersion DeviceInfo = C.CL_DEVICE_OPENCL_C_VERSION )
type DeviceLocalMemType ¶
type DeviceLocalMemType C.cl_device_local_mem_type
const ( Global DeviceLocalMemType = C.CL_GLOBAL Local DeviceLocalMemType = C.CL_LOCAL )
type DeviceMemCacheType ¶
type DeviceMemCacheType C.cl_device_mem_cache_type
const ( None DeviceMemCacheType = C.CL_NONE ReadOnlyCache DeviceMemCacheType = C.CL_READ_ONLY_CACHE ReadWriteCache DeviceMemCacheType = C.CL_READ_WRITE_CACHE )
type DeviceType ¶
type DeviceType C.cl_device_type
const ( DeviceTypeDefault DeviceType = C.CL_DEVICE_TYPE_DEFAULT DeviceTypeCpu DeviceType = C.CL_DEVICE_TYPE_CPU DeviceTypeGpu DeviceType = C.CL_DEVICE_TYPE_GPU DeviceTypeAccelerator DeviceType = C.CL_DEVICE_TYPE_ACCELERATOR DeviceTypeAll DeviceType = C.CL_DEVICE_TYPE_ALL )
Bitfield.
type Double16 ¶
type Double16 C.cl_double16
type Double2 ¶
type Double2 C.cl_double2
type Double4 ¶
type Double4 C.cl_double4
type Double8 ¶
type Double8 C.cl_double8
type Event ¶
func CreateUserEvent ¶
Creates a user event object. https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateUserEvent.html
type EventCallbackFunc ¶
type EventCallbackFunc func(e Event, ces CommandExecutionStatus, userData interface{})
type EventInfo ¶
type EventInfo C.cl_event_info
const ( EventCommandQueue EventInfo = C.CL_EVENT_COMMAND_QUEUE EventCommandType EventInfo = C.CL_EVENT_COMMAND_TYPE EventReferenceCount EventInfo = C.CL_EVENT_REFERENCE_COUNT EventCommandExecutionStatus EventInfo = C.CL_EVENT_COMMAND_EXECUTION_STATUS EventContext EventInfo = C.CL_EVENT_CONTEXT )
type FilterMode ¶
type FilterMode C.cl_filter_mode
type Float16 ¶
type Float16 C.cl_float16
type ImageFormat ¶
type ImageFormat C.cl_image_format
func CreateImageFormat ¶
func CreateImageFormat(co ChannelOrder, ct ChannelType) ImageFormat
Create an image format descriptor.
func (*ImageFormat) ChannelOrder ¶
func (f *ImageFormat) ChannelOrder() ChannelOrder
Retruns the number of channels and the channel layout.
func (*ImageFormat) ChannelType ¶
func (f *ImageFormat) ChannelType() ChannelType
Returns the size of the channel data type.
type ImageInfo ¶
type ImageInfo C.cl_image_info
const ( ImageFormatInfo ImageInfo = C.CL_IMAGE_FORMAT // Appended "Info" due to conflict with type. ImageElementSize ImageInfo = C.CL_IMAGE_ELEMENT_SIZE ImageRowPitch ImageInfo = C.CL_IMAGE_ROW_PITCH ImageSlicePitch ImageInfo = C.CL_IMAGE_SLICE_PITCH ImageWidth ImageInfo = C.CL_IMAGE_WIDTH ImageHeight ImageInfo = C.CL_IMAGE_HEIGHT ImageDepth ImageInfo = C.CL_IMAGE_DEPTH )
type Kernel ¶
func CreateKernel ¶
Creates a kernal object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateKernel.html
type KernelInfo ¶
type KernelInfo C.cl_kernel_info
type KernelWorkGroupInfo ¶
type KernelWorkGroupInfo C.cl_kernel_work_group_info
type MapFlags ¶
type MapFlags C.cl_map_flags
const ( MapRead MapFlags = C.CL_MAP_READ MapWrite MapFlags = C.CL_MAP_WRITE )
Bitfield.
type Mem ¶
func CreateBuffer ¶
Creates a buffer object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateBuffer.html
func CreateImage2D ¶
func CreateImage2D(context Context, flags MemFlags, image_format ImageFormat, image_width, image_height, image_row_pitch Size, host_ptr unsafe.Pointer) (Mem, error)
Creates a 2D image object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage2D.html
func CreateImage3D ¶
func CreateImage3D(context Context, flags MemFlags, image_format ImageFormat, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch Size, host_ptr unsafe.Pointer) (Mem, error)
Creates a 3D image object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateImage3D.html
func CreateSubBuffer ¶
Creates a buffer object (referred to as a sub-buffer object) from an existing buffer object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html
type MemFlags ¶
type MemFlags C.cl_mem_flags
const ( MemReadWrite MemFlags = C.CL_MEM_READ_WRITE MemWriteOnly MemFlags = C.CL_MEM_WRITE_ONLY MemReadOnly MemFlags = C.CL_MEM_READ_ONLY MemUseHostPointer MemFlags = C.CL_MEM_USE_HOST_PTR MemAllocHostPointer MemFlags = C.CL_MEM_ALLOC_HOST_PTR MemCopyHostPointer MemFlags = C.CL_MEM_COPY_HOST_PTR )
Bitfield.
type MemInfo ¶
type MemInfo C.cl_mem_info
const ( MemType MemInfo = C.CL_MEM_TYPE MemFlagsInfo MemInfo = C.CL_MEM_FLAGS // Appended "Info" due to conflict with type. MemSize MemInfo = C.CL_MEM_SIZE MemHostPtr MemInfo = C.CL_MEM_HOST_PTR MemMapCount MemInfo = C.CL_MEM_MAP_COUNT MemReferenceCount MemInfo = C.CL_MEM_REFERENCE_COUNT MemContext MemInfo = C.CL_MEM_CONTEXT MemAssociatedMemobject MemInfo = C.CL_MEM_ASSOCIATED_MEMOBJECT MemOffset MemInfo = C.CL_MEM_OFFSET )
type MemObjectType ¶
type MemObjectType C.cl_mem_object_type
const ( MemObjectBuffer MemObjectType = C.CL_MEM_OBJECT_BUFFER MemObjectImage2D MemObjectType = C.CL_MEM_OBJECT_IMAGE2D MemObjectImage3D MemObjectType = C.CL_MEM_OBJECT_IMAGE3D )
type NativeKernelFunc ¶
type NativeKernelFunc func(args interface{})
type PlatformID ¶
type PlatformID C.cl_platform_id
type PlatformInfo ¶
type PlatformInfo C.cl_platform_info
const ( PlatformProfile PlatformInfo = C.CL_PLATFORM_PROFILE PlatformVersion PlatformInfo = C.CL_PLATFORM_VERSION PlatformName PlatformInfo = C.CL_PLATFORM_NAME PlatformVendor PlatformInfo = C.CL_PLATFORM_VENDOR PlatformExtensions PlatformInfo = C.CL_PLATFORM_EXTENSIONS )
type ProfilingInfo ¶
type ProfilingInfo C.cl_profiling_info
const ( ProfilingCommandQueued ProfilingInfo = C.CL_PROFILING_COMMAND_QUEUED ProfilingCommandSubmit ProfilingInfo = C.CL_PROFILING_COMMAND_SUBMIT ProfilingCommandStart ProfilingInfo = C.CL_PROFILING_COMMAND_START ProfilingCommandEnd ProfilingInfo = C.CL_PROFILING_COMMAND_END )
type Program ¶
type Program C.cl_program
func CreateProgramWithBinary ¶
func CreateProgramWithBinary(context Context, devices []DeviceID, binaries [][]byte, binary_status []error) (Program, error)
Creates a program object for a context, and loads the binary bits specified by binary into the program object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateProgramWithBinary.html
func CreateProgramWithSource ¶
Creates a program object for a context, and loads the source code specified by the text strings in the strings array into the program object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateProgramWithSource.html
type ProgramBuildInfo ¶
type ProgramBuildInfo C.cl_program_build_info
type ProgramCallbackFunc ¶
type ProgramCallbackFunc func(program Program, userData interface{})
type ProgramInfo ¶
type ProgramInfo C.cl_program_info
type Sampler ¶
type Sampler C.cl_sampler
func CreateSampler ¶
func CreateSampler(context Context, normalized_coords Bool, addressing_mode AddressingMode, filter_mode FilterMode) (Sampler, error)
Creates a sampler object. http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clCreateSampler.html
type SamplerInfo ¶
type SamplerInfo C.cl_sampler_info
type Short16 ¶
type Short16 C.cl_short16
type Uchar16 ¶
type Uchar16 C.cl_uchar16
type Ulong16 ¶
type Ulong16 C.cl_ulong16
type UnknownError ¶
type UnknownError Int
func (UnknownError) Error ¶
func (ue UnknownError) Error() string
type Ushort16 ¶
type Ushort16 C.cl_ushort16
type Ushort2 ¶
type Ushort2 C.cl_ushort2
type Ushort4 ¶
type Ushort4 C.cl_ushort4
type Ushort8 ¶
type Ushort8 C.cl_ushort8