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

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.77 by root, Sat May 5 14:57:32 2012 UTC vs.
Revision 1.78 by root, Sat May 5 15:11:19 2012 UTC

615 arg->num_devices = num_devices; 615 arg->num_devices = num_devices;
616 memcpy (arg + 1, device_list, sizeof (*device_list) * num_devices); 616 memcpy (arg + 1, device_list, sizeof (*device_list) * num_devices);
617 617
618 xthread_t id; 618 xthread_t id;
619 thread_create (&id, build_program_thread, arg); 619 thread_create (&id, build_program_thread, arg);
620}
621
622/*****************************************************************************/
623/* mem object destructor notify */
624
625static void ecb_noinline
626eq_destructor_push (void *data1, void *data2, void *data3)
627{
628}
629
630static eq_vtbl eq_destructor_vtbl = { 0, eq_destructor_push };
631
632static void CL_CALLBACK
633eq_destructor_notify (cl_mem memobj, void *user_data)
634{
635 eq_enq (&eq_destructor_vtbl, (SV *)user_data, (void *)memobj, 0, 0);
620} 636}
621 637
622/*****************************************************************************/ 638/*****************************************************************************/
623/* event objects */ 639/* event objects */
624 640
2208 INFO (MemObject) 2224 INFO (MemObject)
2209 2225
2210void 2226void
2211destructor_callback (OpenCL::Memory self, SV *notify) 2227destructor_callback (OpenCL::Memory self, SV *notify)
2212 PPCODE: 2228 PPCODE:
2229 clSetMemObjectDestructorCallback (self, eq_destructor_notify, SvREFCNT_inc (s_get_cv (notify)));
2213 2230
2214#BEGIN:mem 2231#BEGIN:mem
2215 2232
2216void 2233void
2217type (OpenCL::Memory self) 2234type (OpenCL::Memory self)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines