ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/OpenCL.xs
(Generate patch)

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.12 by root, Thu Nov 17 06:22:29 2011 UTC vs.
Revision 1.13 by root, Sun Nov 20 01:09:48 2011 UTC

238void 238void
239info (OpenCL::Platform this, cl_platform_info name) 239info (OpenCL::Platform this, cl_platform_info name)
240 PPCODE: 240 PPCODE:
241 INFO (Platform) 241 INFO (Platform)
242 242
243#BEGIN:platform
244
245void
246profile (OpenCL::Platform this)
247 PPCODE:
248 size_t size;
249 int i, n;
250 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_PROFILE, 0, 0, &size));
251 char *value = tmpbuf (size);
252 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_PROFILE, size, value, 0));
253 n = 1;
254 EXTEND (SP, n);
255 for (i = 0; i < n; ++i)
256 PUSHs (sv_2mortal (newSVpvn (value, size)));
257
258void
259version (OpenCL::Platform this)
260 PPCODE:
261 size_t size;
262 int i, n;
263 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_VERSION, 0, 0, &size));
264 char *value = tmpbuf (size);
265 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_VERSION, size, value, 0));
266 n = 1;
267 EXTEND (SP, n);
268 for (i = 0; i < n; ++i)
269 PUSHs (sv_2mortal (newSVpvn (value, size)));
270
271void
272name (OpenCL::Platform this)
273 PPCODE:
274 size_t size;
275 int i, n;
276 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_NAME, 0, 0, &size));
277 char *value = tmpbuf (size);
278 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_NAME, size, value, 0));
279 n = 1;
280 EXTEND (SP, n);
281 for (i = 0; i < n; ++i)
282 PUSHs (sv_2mortal (newSVpvn (value, size)));
283
284void
285vendor (OpenCL::Platform this)
286 PPCODE:
287 size_t size;
288 int i, n;
289 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_VENDOR, 0, 0, &size));
290 char *value = tmpbuf (size);
291 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_VENDOR, size, value, 0));
292 n = 1;
293 EXTEND (SP, n);
294 for (i = 0; i < n; ++i)
295 PUSHs (sv_2mortal (newSVpvn (value, size)));
296
297void
298extensions (OpenCL::Platform this)
299 PPCODE:
300 size_t size;
301 int i, n;
302 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_EXTENSIONS, 0, 0, &size));
303 char *value = tmpbuf (size);
304 NEED_SUCCESS (GetPlatformInfo, (this, CL_PLATFORM_EXTENSIONS, size, value, 0));
305 n = 1;
306 EXTEND (SP, n);
307 for (i = 0; i < n; ++i)
308 PUSHs (sv_2mortal (newSVpvn (value, size)));
309
310#END:platform
311
243void 312void
244devices (OpenCL::Platform this, cl_device_type type = CL_DEVICE_TYPE_ALL) 313devices (OpenCL::Platform this, cl_device_type type = CL_DEVICE_TYPE_ALL)
245 PPCODE: 314 PPCODE:
246 cl_device_id *list; 315 cl_device_id *list;
247 cl_uint count; 316 cl_uint count;
386 455
387 len2 = len; 456 len2 = len;
388 NEED_SUCCESS_ARG (cl_program prog, CreateProgramWithSource, (this, 1, &ptr, &len2, &res)); 457 NEED_SUCCESS_ARG (cl_program prog, CreateProgramWithSource, (this, 1, &ptr, &len2, &res));
389 XPUSH_NEW_OBJ ("OpenCL::Program", prog); 458 XPUSH_NEW_OBJ ("OpenCL::Program", prog);
390 459
460#BEGIN:context
461
462#END:context
463
391MODULE = OpenCL PACKAGE = OpenCL::Queue 464MODULE = OpenCL PACKAGE = OpenCL::Queue
392 465
393void 466void
394DESTROY (OpenCL::Queue this) 467DESTROY (OpenCL::Queue this)
395 CODE: 468 CODE:
644 717
645void 718void
646info (OpenCL::Memory this, cl_mem_info name) 719info (OpenCL::Memory this, cl_mem_info name)
647 PPCODE: 720 PPCODE:
648 INFO (MemObject) 721 INFO (MemObject)
722
723MODULE = OpenCL PACKAGE = OpenCL::Image
724
725void
726image_info (OpenCL::Image this, cl_image_info name)
727 PPCODE:
728 INFO (Image)
649 729
650MODULE = OpenCL PACKAGE = OpenCL::Sampler 730MODULE = OpenCL PACKAGE = OpenCL::Sampler
651 731
652void 732void
653DESTROY (OpenCL::Sampler this) 733DESTROY (OpenCL::Sampler this)
705info (OpenCL::Kernel this, cl_kernel_info name) 785info (OpenCL::Kernel this, cl_kernel_info name)
706 PPCODE: 786 PPCODE:
707 INFO (Kernel) 787 INFO (Kernel)
708 788
709void 789void
790work_group_info (OpenCL::Kernel this, OpenCL::Device device, cl_kernel_work_group_info name)
791 PPCODE:
792 size_t size;
793 NEED_SUCCESS (GetKernelWorkGroupInfo, (this, device, name, 0, 0, &size));
794 SV *sv = sv_2mortal (newSV (size));
795 SvUPGRADE (sv, SVt_PV);
796 SvPOK_only (sv);
797 SvCUR_set (sv, size);
798 NEED_SUCCESS (GetKernelWorkGroupInfo, (this, device, name, size, SvPVX (sv), 0));
799 XPUSHs (sv);
800
801void
710set_char (OpenCL::Kernel this, cl_uint idx, cl_char value) 802set_char (OpenCL::Kernel this, cl_uint idx, cl_char value)
711 CODE: 803 CODE:
712 clSetKernelArg (this, idx, sizeof (value), &value); 804 clSetKernelArg (this, idx, sizeof (value), &value);
713 805
714void 806void
802info (OpenCL::Event this, cl_event_info name) 894info (OpenCL::Event this, cl_event_info name)
803 PPCODE: 895 PPCODE:
804 INFO (Event) 896 INFO (Event)
805 897
806void 898void
899profiling_info (OpenCL::Event this, cl_profiling_info name)
900 PPCODE:
901 INFO (EventProfiling)
902
903void
807wait (OpenCL::Event this) 904wait (OpenCL::Event this)
808 CODE: 905 CODE:
809 clWaitForEvents (1, &this); 906 clWaitForEvents (1, &this);
810 907
811MODULE = OpenCL PACKAGE = OpenCL::UserEvent 908MODULE = OpenCL PACKAGE = OpenCL::UserEvent

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines