Skip to content

Working with OpenCL

Working with OpenCL

OpenCL programs are used for performing computations on video cards that support OpenCL 1.1 or higher. Modern video cards contain hundreds of small specialized processors that can simultaneously perform simple mathematical operations with incoming data streams. The OpenCL language organizes parallel computing and provides greater speed for a certain class of tasks.

It is recommended to write the source code for OpenCL in separate CL files, which can later be included in the MQL5 program using the resource variables.

FunctionAction
CLHandleTypeReturns the type of an OpenCL handle as a value of the ENUM_OPENCL_HANDLE_TYPE enumeration
CLGetInfoIntegerReturns the value of an integer property for an OpenCL object or device
CLGetInfoStringCreates an OpenCL context
CLContextCreateRemoves an OpenCL context
CLContextFreeReceives device property from OpenCL driver
CLGetDeviceInfoCreates an OpenCL program from a source code
CLProgramCreateRemoves an OpenCL program
CLProgramFreeCreates an OpenCL start function
CLKernelCreateRemoves an OpenCL start function
CLKernelFreeSets a parameter for the OpenCL function
CLSetKernelArgSets an OpenCL buffer as a parameter of the OpenCL function
CLSetKernelArgMemSets the local buffer as an argument of the kernel function
CLSetKernelArgMemLocalCreates an OpenCL buffer
CLBufferCreateDeletes an OpenCL buffer
CLBufferFreeWrites an array into an OpenCL buffer
CLBufferWriteReads an OpenCL buffer into an array
CLBufferReadRuns an OpenCL program
CLExecuteReturns the OpenCL program execution status
CLExecutionStatusReturns the OpenCL program execution status
Last updated on