Awesome
Matlab-OpenCL
OpenCL kernel support to emulate CUDA kernel support in MATLAB
This project provides an interface to run OpenCL kernels analagously to CUDA kernels provided by the Parallel Computing Toolbox in MATLAB. The API emulates the analagous classes in MATLAB to maximize code re-use while allowing for architectural differences in OpenCL.
Native | Matlab-OpenCL |
---|---|
parallel.gpu.CUDAKernel | oclKernel |
gpuDevice | oclDevice |
gpuDeviceCount | oclDeviceCount |
gpuDeviceTable | oclDeviceTable |
Requirements
- MATLAB R2020b or later
- A working OpenCL installation with available devices (verifiable with e.g.
clinfo
on linux) - A supported mex compiler
Quick Start
- Download the repository and its submodules
git clone --recurse-submodules https://github.com:thorstone25/Matlab-OpenCL.git
- Open the Project in MATLAB
>> cd Matlab-OpenCL;
>> openProject MatlabOpenCL.prj;
- Run the example script
>> addpath examples;
>> img_test_mocl;
Documentation
Further documentation is provided internally via help
and doc
, e.g. >> doc oclKernel
.