Code covered by the BSD License  

Highlights from
OpenCL Toolbox v0.17

5.0

5.0 | 3 ratings Rate this file 44 Downloads (last 30 days) File Size: 45.94 KB File ID: #30109

OpenCL Toolbox v0.17

by Radford Juang

 

20 Jan 2011 (Updated 25 Jan 2011)

OpenCL Toolbox for MATLAB

| Watch this File

File Information
Description

*****
UPDATE: v0.15
 - various bug fixes
 - support for CPU/GPGPU devices
 - additional device information provided in routine to fetch device information
 - documented source code
 - added destroy_buffer command to free sources
******
This is the first release of the OpenCL Toolbox for MATLAB. It is a simple interface that encapsulates clBuffer and clKernel as MATLAB class objects. It allows one to easily create device buffers, set device memory, compile and call kernel functions, etc.

A future release will override Matlab primitives (plus, minus, times, rdivide, etc.) so that knowledge of OpenCL coding will not be required.

This current release simplifies integration of OpenCL (.cl) files with MATLAB.

For example, to call a kernel in an OpenCL file is done as follows:

ocl = opencl();
ocl.initialize(1,1);
ocl.addfile('simple_add.cl');
ocl.build();

global_workgroup_size = [128,0,0];
local_workgroup_size = [128,0,0];
addkernel = clkernel('add', global_workgroup_size, local_workgroup_size);

x = clobject(single(1:10));
y = clobject(single(11:20));
z = clobject(zeros(1,10, 'single'));

addkernel(x,y,z, uint32(10));

values = z.get();
disp(values);

Project homepage:
http://code.google.com/p/opencl-toolbox/

MATLAB release MATLAB 7.11 (2010b)
Other requirements Requires an OpenCL 1.1+ compliant GPGPU device.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
20 Jan 2011 Sebastien PARIS

Even in early stage, and not tested yet, It'a a great idea :) So keep going your project

20 Jan 2011 Sebastien PARIS  
20 Jan 2011 bmv  
22 Jan 2011 Radford Juang

In addition to bug fixes, I've updated the framework to support CPU devices. Latest versions will always be at the project homepage: http://code.google.com/p/opencl-toolbox

But I'll make efforts to update this page too.

06 Jan 2012 Allan Peter Engsig-Karup

Testet the toolbox on my MacOS. Worked fine. Just had to fix some paths.

Please login to add a comment or rating.
Updates
20 Jan 2011

Updated name of license holder in Copyright owner field.

24 Jan 2011

Updated file to version 0.15. Updated description to explain update.

24 Jan 2011

Updated description

25 Jan 2011

0.17: Added additional device information.
       Bug fix: I had swapped the local and global dims.. (big oops).
       Started adding matlab kernels

Tag Activity for this File
Tag Applied By Date/Time
opencl Radford Juang 20 Jan 2011 11:01:10
gpgpu Radford Juang 20 Jan 2011 11:01:10
parallel Radford Juang 20 Jan 2011 11:01:11
gpu Radford Juang 20 Jan 2011 11:01:11
cuda Radford Juang 20 Jan 2011 11:01:11
cuda Dr. 03 May 2011 16:30:22
cuda Pushkar Ratnalikar 06 Aug 2011 04:41:11

Contact us at files@mathworks.com