mikeseven / node-opencl

Low-level OpenCL 1.x and 2.x bindgings for node.js
156 stars 33 forks source link

fixing setKernelArg for OpenCL versions < 1.2 #6

Closed patflick closed 9 years ago

patflick commented 9 years ago

The last argument to createBuffer() is an optional host pointer. The function itself is already written to check if the args[3] is present, but still required 4 arguments on top level.

The third commit also fixes a bug in setKernelArgs().

patflick commented 9 years ago

My previous pull request broke setKernelArg for older OpenCL versions (< 1.2). This fixes that issue, by re-introducing a 4th optional parameter (mandatory for versions < 1.2) which contains the type of the kernel argument.

patflick commented 9 years ago

forgot to remove a debug output. removed in the latest commit