OpenCL Toolbox v0.17

版本 1.6.0.0 (45.9 KB) 作者: Radford Juang
OpenCL Toolbox for MATLAB
3.7K 次下载
更新时间 2011/1/25

查看许可证

*****
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/

引用格式

Radford Juang (2026). OpenCL Toolbox v0.17 (https://ww2.mathworks.cn/matlabcentral/fileexchange/30109-opencl-toolbox-v0-17), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 GPU Computing 的更多信息
版本 已发布 发行说明
1.6.0.0

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

1.4.0.0

Updated description

1.3.0.0

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

1.1.0.0

Updated name of license holder in Copyright owner field.

1.0.0.0