Skip to content

Matlab OpenCL support to emulate gpuDevice and CUDAKernel

License

Notifications You must be signed in to change notification settings

thorstone25/Matlab-OpenCL

Repository files navigation

Matlab-OpenCL

License

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

  1. Download the repository and its submodules
git clone --recurse-submodules https://github.com:thorstone25/Matlab-OpenCL.git
  1. Open the Project in MATLAB
>> cd Matlab-OpenCL;
>> openProject MatlabOpenCL.prj;
  1. Run the example script
>> addpath examples;
>> img_test_mocl;

Documentation

Further documentation is provided internally via help and doc, e.g. >> doc oclKernel.

About

Matlab OpenCL support to emulate gpuDevice and CUDAKernel

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published