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

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.4 by root, Tue Nov 15 21:13:42 2011 UTC vs.
Revision 1.8 by root, Thu Nov 17 02:54:14 2011 UTC

20typedef cl_mem OpenCL__Image3D_ornull; 20typedef cl_mem OpenCL__Image3D_ornull;
21typedef cl_sampler OpenCL__Sampler; 21typedef cl_sampler OpenCL__Sampler;
22typedef cl_program OpenCL__Program; 22typedef cl_program OpenCL__Program;
23typedef cl_kernel OpenCL__Kernel; 23typedef cl_kernel OpenCL__Kernel;
24typedef cl_event OpenCL__Event; 24typedef cl_event OpenCL__Event;
25typedef cl_event OpenCL__UserEvent;
26
27typedef SV *FUTURE;
28
29/*****************************************************************************/
30
31/* up to two temporary buffers */
32static void *
33tmpbuf (size_t size)
34{
35 static int idx;
36 static void *buf [2];
37 static size_t len [2];
38
39 idx ^= 1;
40
41 if (len [idx] < size)
42 {
43 free (buf [idx]);
44 len [idx] = ((size + 31) & ~4095) + 4096 - 32;
45 buf [idx] = malloc (len [idx]);
46 }
47
48 return buf [idx];
49}
50
51/*****************************************************************************/
25 52
26typedef struct 53typedef struct
27{ 54{
28 IV iv; 55 IV iv;
29 const char *name; 56 const char *name;
63 }; 90 };
64 91
65 return iv2str (err, errstr, sizeof (errstr) / sizeof (errstr [0]), "ERROR(%d)"); 92 return iv2str (err, errstr, sizeof (errstr) / sizeof (errstr [0]), "ERROR(%d)");
66} 93}
67 94
95/*****************************************************************************/
96
97static cl_int res;
98
68#define FAIL(name,res) \ 99#define FAIL(name) \
69 croak ("cl" # name ": %s", err2str (res)); 100 croak ("cl" # name ": %s", err2str (res));
70 101
71#define NEED_SUCCESS(name,args) \ 102#define NEED_SUCCESS(name,args) \
72 do { \ 103 do { \
73 cl_int res = cl ## name args; \ 104 res = cl ## name args; \
74 \ 105 \
75 if (res) \ 106 if (res) \
76 FAIL (name, res); \ 107 FAIL (name); \
77 } while (0) 108 } while (0)
109
110#define NEED_SUCCESS_ARG(retdecl, name, args) \
111 retdecl = cl ## name args; \
112 if (res) \
113 FAIL (name);
114
115/*****************************************************************************/
78 116
79#define NEW_MORTAL_OBJ(class,ptr) sv_setref_pv (sv_newmortal (), class, ptr) 117#define NEW_MORTAL_OBJ(class,ptr) sv_setref_pv (sv_newmortal (), class, ptr)
80#define XPUSH_NEW_OBJ(class,ptr) XPUSHs (NEW_MORTAL_OBJ (class, ptr)) 118#define XPUSH_NEW_OBJ(class,ptr) XPUSHs (NEW_MORTAL_OBJ (class, ptr))
81 119
82/*TODO*/ 120static void *
83#define EVENT_LIST(items,count) cl_uint event_list_count = 0; cl_event *event_list_ptr = 0 121SvPTROBJ (const char *func, const char *svname, SV *sv, const char *pkg)
122{
123 if (SvROK (sv) && sv_derived_from (sv, pkg))
124 return (void *)SvIV (SvRV (sv));
125
126 croak ("%s: %s is not of type %s", func, svname, pkg);
127}
128
129/*****************************************************************************/
130
131static cl_event *
132event_list (SV **items, int count)
133{
134 cl_event *list = tmpbuf (sizeof (cl_event) * count);
135
136 while (count--)
137 list [count] = SvPTROBJ ("clEnqueue", "wait_events", items [count], "OpenCL::Event");
138
139 return list;
140}
141
142#define EVENT_LIST(items,count) \
143 cl_uint event_list_count = (count); \
144 cl_event *event_list_ptr = event_list (&ST (items), event_list_count)
84 145
85#define INFO(class) \ 146#define INFO(class) \
86{ \ 147{ \
87 size_t size; \ 148 size_t size; \
88 SV *sv; \ 149 SV *sv; \
89 \ 150 \
90 NEED_SUCCESS (Get ## class ## Info, (this, name, 0, 0, &size)); \ 151 NEED_SUCCESS (Get ## class ## Info, (this, name, 0, 0, &size)); \
91 sv = sv_2mortal (newSV (size)); \ 152 sv = sv_2mortal (newSV (size)); \
92 SvUPGRADE (sv, SVt_PV); \ 153 SvUPGRADE (sv, SVt_PV); \
93 SvPOK_only (sv); \ 154 SvPOK_only (sv); \
94 SvCUR_set (sv, size); \ 155 SvCUR_set (sv, size); \
95 NEED_SUCCESS (Get ## class ## Info, (this, name, size, SvPVX (sv), 0)); \ 156 NEED_SUCCESS (Get ## class ## Info, (this, name, size, SvPVX (sv), 0)); \
96 XPUSHs (sv); \ 157 XPUSHs (sv); \
97} 158}
98 159
99static void *
100SvPTROBJ (const char *func, const char *svname, SV *sv, const char *pkg)
101{
102 if (SvROK (sv) && sv_derived_from (sv, pkg))
103 return (void *)SvIV (SvRV (sv));
104
105 croak ("%s: %s is not of type %s", func, svname, pkg);
106}
107
108static void *
109tmpbuf (size_t size)
110{
111 static void *buf;
112 static size_t len;
113
114 if (len < size)
115 {
116 free (buf);
117 len = ((size + 31) & ~4095) + 4096 - 32;
118 buf = malloc (len);
119 }
120
121 return buf;
122}
123
124MODULE = OpenCL PACKAGE = OpenCL 160MODULE = OpenCL PACKAGE = OpenCL
125 161
126PROTOTYPES: ENABLE 162PROTOTYPES: ENABLE
127 163
128BOOT: 164BOOT:
129{ 165{
130 HV *stash = gv_stashpv ("OpenCL", 1); 166 HV *stash = gv_stashpv ("OpenCL", 1);
131 static const ivstr *civ, const_iv[] = { 167 static const ivstr *civ, const_iv[] = {
132 { sizeof (cl_char ), "SIZEOF_CHAR" }, 168 { sizeof (cl_char ), "SIZEOF_CHAR" },
133 { sizeof (cl_uchar ), "SIZEOF_UCHAR" }, 169 { sizeof (cl_uchar ), "SIZEOF_UCHAR" },
134 { sizeof (cl_short ), "SIZEOF_SHORT" }, 170 { sizeof (cl_short ), "SIZEOF_SHORT" },
135 { sizeof (cl_ushort), "SIZEOF_USHORT"}, 171 { sizeof (cl_ushort), "SIZEOF_USHORT" },
136 { sizeof (cl_int ), "SIZEOF_INT" }, 172 { sizeof (cl_int ), "SIZEOF_INT" },
137 { sizeof (cl_uint ), "SIZEOF_UINT" }, 173 { sizeof (cl_uint ), "SIZEOF_UINT" },
138 { sizeof (cl_long ), "SIZEOF_LONG" }, 174 { sizeof (cl_long ), "SIZEOF_LONG" },
139 { sizeof (cl_ulong ), "SIZEOF_ULONG" }, 175 { sizeof (cl_ulong ), "SIZEOF_ULONG" },
140 { sizeof (cl_half ), "SIZEOF_HALF" }, 176 { sizeof (cl_half ), "SIZEOF_HALF" },
141 { sizeof (cl_float ), "SIZEOF_FLOAT" }, 177 { sizeof (cl_float ), "SIZEOF_FLOAT" },
178 { sizeof (cl_double), "SIZEOF_DOUBLE" },
142#include "constiv.h" 179#include "constiv.h"
143 }; 180 };
144 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--) 181 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
145 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv)); 182 newCONSTSUB (stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
146} 183}
147 184
185cl_int
186errno ()
187 CODE:
188 errno = res;
189
148const char * 190const char *
149err2str (cl_int err) 191err2str (cl_int err)
150 192
151const char * 193const char *
152enum2str (cl_uint value) 194enum2str (cl_uint value)
167 for (i = 0; i < count; ++i) 209 for (i = 0; i < count; ++i)
168 PUSHs (NEW_MORTAL_OBJ ("OpenCL::Platform", list [i])); 210 PUSHs (NEW_MORTAL_OBJ ("OpenCL::Platform", list [i]));
169} 211}
170 212
171void 213void
172context_from_type_simple (cl_device_type type = CL_DEVICE_TYPE_DEFAULT) 214context_from_type (FUTURE properties = 0, cl_device_type type = CL_DEVICE_TYPE_DEFAULT, FUTURE notify = 0)
173 PPCODE: 215 PPCODE:
174{
175 cl_int res;
176 cl_context ctx = clCreateContextFromType (0, type, 0, 0, &res); 216 NEED_SUCCESS_ARG (cl_context ctx, CreateContextFromType, (0, type, 0, 0, &res));
177
178 if (res)
179 FAIL (CreateContextFromType, res);
180
181 XPUSH_NEW_OBJ ("OpenCL::Context", ctx); 217 XPUSH_NEW_OBJ ("OpenCL::Context", ctx);
182} 218
219void
220context (FUTURE properties, FUTURE devices, FUTURE notify = 0)
221 PPCODE:
222 /* der Gipfel der Kunst */
183 223
184void 224void
185wait_for_events (...) 225wait_for_events (...)
186 CODE: 226 CODE:
187{ 227{
214 for (i = 0; i < count; ++i) 254 for (i = 0; i < count; ++i)
215 PUSHs (sv_setref_pv (sv_newmortal (), "OpenCL::Device", list [i])); 255 PUSHs (sv_setref_pv (sv_newmortal (), "OpenCL::Device", list [i]));
216} 256}
217 257
218void 258void
259context (OpenCL::Platform this, FUTURE properties, SV *devices, FUTURE notify = 0)
260 PPCODE:
261 if (!SvROK (devices) || SvTYPE (SvRV (devices)) != SVt_PVAV)
262 croak ("OpenCL::Platform argument 'device' must be an arrayref with device objects, in call");
263
264 AV *av = (SV *)SvRV (devices);
265 cl_uint num_devices = av_len (av) + 1;
266 cl_device_id *device_list = tmpbuf (sizeof (cl_device_id) * num_devices);
267 int i;
268
269 for (i = num_devices; i--; )
270 device_list [i] = SvPTROBJ ("clCreateContext", "devices", *av_fetch (av, i, 0), "OpenCL::Device");
271
272 NEED_SUCCESS_ARG (cl_context ctx, CreateContext, (0, num_devices, device_list, 0, 0, &res));
273 XPUSH_NEW_OBJ ("OpenCL::Context", ctx);
274
275void
219context_from_type_simple (OpenCL::Platform this, cl_device_type type = CL_DEVICE_TYPE_DEFAULT) 276context_from_type (OpenCL::Platform this, FUTURE properties = 0, cl_device_type type = CL_DEVICE_TYPE_DEFAULT, FUTURE notify = 0)
220 PPCODE: 277 PPCODE:
221{
222 cl_int res;
223 cl_context_properties props[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)this, 0 }; 278 cl_context_properties props[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)this, 0 };
224 cl_context ctx = clCreateContextFromType (props, type, 0, 0, &res); 279 NEED_SUCCESS_ARG (cl_context ctx, CreateContextFromType, (props, type, 0, 0, &res));
225
226 if (res)
227 FAIL (CreateContextFromType, res);
228
229 XPUSH_NEW_OBJ ("OpenCL::Context", ctx); 280 XPUSH_NEW_OBJ ("OpenCL::Context", ctx);
230}
231 281
232MODULE = OpenCL PACKAGE = OpenCL::Device 282MODULE = OpenCL PACKAGE = OpenCL::Device
233 283
234void 284void
235info (OpenCL::Device this, cl_device_info name) 285info (OpenCL::Device this, cl_device_info name)
236 PPCODE: 286 PPCODE:
237 INFO (Device) 287 INFO (Device)
238 288
239void
240context_simple (OpenCL::Device this)
241 PPCODE:
242{
243 cl_int res;
244 cl_context ctx = clCreateContext (0, 1, &this, 0, 0, &res);
245
246 if (res)
247 FAIL (CreateContext, res);
248
249 XPUSH_NEW_OBJ ("OpenCL::Context", ctx);
250}
251
252MODULE = OpenCL PACKAGE = OpenCL::Context 289MODULE = OpenCL PACKAGE = OpenCL::Context
253 290
254void 291void
255DESTROY (OpenCL::Context context) 292DESTROY (OpenCL::Context context)
256 CODE: 293 CODE:
260info (OpenCL::Context this, cl_context_info name) 297info (OpenCL::Context this, cl_context_info name)
261 PPCODE: 298 PPCODE:
262 INFO (Context) 299 INFO (Context)
263 300
264void 301void
265command_queue_simple (OpenCL::Context this, OpenCL::Device device) 302queue (OpenCL::Context this, OpenCL::Device device, cl_command_queue_properties properties = 0)
266 PPCODE: 303 PPCODE:
267{
268 cl_int res;
269 cl_command_queue queue = clCreateCommandQueue (this, device, 0, &res); 304 NEED_SUCCESS_ARG (cl_command_queue queue, CreateCommandQueue, (this, device, properties, &res));
270
271 if (res)
272 FAIL (CreateCommandQueue, res);
273
274 XPUSH_NEW_OBJ ("OpenCL::Queue", queue); 305 XPUSH_NEW_OBJ ("OpenCL::Queue", queue);
275} 306
307void
308user_event (OpenCL::Context this)
309 PPCODE:
310 NEED_SUCCESS_ARG (cl_event ev, CreateUserEvent, (this, &res));
311 XPUSH_NEW_OBJ ("OpenCL::UserEvent", ev);
276 312
277void 313void
278buffer (OpenCL::Context this, cl_mem_flags flags, size_t len) 314buffer (OpenCL::Context this, cl_mem_flags flags, size_t len)
279 PPCODE: 315 PPCODE:
280{
281 cl_int res;
282 cl_mem mem;
283
284 if (flags & (CL_MEM_USE_HOST_PTR | CL_MEM_COPY_HOST_PTR)) 316 if (flags & (CL_MEM_USE_HOST_PTR | CL_MEM_COPY_HOST_PTR))
285 croak ("clCreateBuffer: cannot use/copy host ptr when no data is given, use $context->buffer_sv instead?"); 317 croak ("clCreateBuffer: cannot use/copy host ptr when no data is given, use $context->buffer_sv instead?");
286 318
287 mem = clCreateBuffer (this, flags, len, 0, &res); 319 NEED_SUCCESS_ARG (cl_mem mem, CreateBuffer, (this, flags, len, 0, &res));
288
289 if (res)
290 FAIL (CreateBuffer, res);
291
292 XPUSH_NEW_OBJ ("OpenCL::Buffer", mem); 320 XPUSH_NEW_OBJ ("OpenCL::Buffer", mem);
293}
294 321
295void 322void
296buffer_sv (OpenCL::Context this, cl_mem_flags flags, SV *data) 323buffer_sv (OpenCL::Context this, cl_mem_flags flags, SV *data)
297 PPCODE: 324 PPCODE:
298{
299 STRLEN len; 325 STRLEN len;
300 char *ptr = SvPVbyte (data, len); 326 char *ptr = SvPVbyte (data, len);
301 cl_int res;
302 cl_mem mem;
303 327
304 if (!(flags & (CL_MEM_USE_HOST_PTR | CL_MEM_COPY_HOST_PTR))) 328 if (!(flags & (CL_MEM_USE_HOST_PTR | CL_MEM_COPY_HOST_PTR)))
305 croak ("clCreateBuffer: have to specify use or copy host ptr when buffer data is given, use $context->buffer instead?"); 329 croak ("clCreateBuffer: have to specify use or copy host ptr when buffer data is given, use $context->buffer instead?");
306 330
307 mem = clCreateBuffer (this, flags, len, ptr, &res); 331 NEED_SUCCESS_ARG (cl_mem mem, CreateBuffer, (this, flags, len, ptr, &res));
308
309 if (res)
310 FAIL (CreateBuffer, res);
311
312 XPUSH_NEW_OBJ ("OpenCL::Buffer", mem); 332 XPUSH_NEW_OBJ ("OpenCL::Buffer", mem);
313}
314 333
315void 334void
316image2d (OpenCL::Context this, cl_mem_flags flags, cl_channel_order channel_order, cl_channel_type channel_type, size_t width, size_t height, SV *data) 335image2d (OpenCL::Context this, cl_mem_flags flags, cl_channel_order channel_order, cl_channel_type channel_type, size_t width, size_t height, SV *data)
317 PPCODE: 336 PPCODE:
318{
319 STRLEN len; 337 STRLEN len;
320 char *ptr = SvPVbyte (data, len); 338 char *ptr = SvPVbyte (data, len);
321 const cl_image_format format = { channel_order, channel_type }; 339 const cl_image_format format = { channel_order, channel_type };
322 cl_int res;
323 cl_mem mem = clCreateImage2D (this, flags, &format, width, height, len / height, ptr, &res); 340 NEED_SUCCESS_ARG (cl_mem mem, CreateImage2D, (this, flags, &format, width, height, len / height, ptr, &res));
324
325 if (res)
326 FAIL (CreateImage2D, res);
327
328 XPUSH_NEW_OBJ ("OpenCL::Image2D", mem); 341 XPUSH_NEW_OBJ ("OpenCL::Image2D", mem);
329}
330 342
331void 343void
332image3d (OpenCL::Context this, cl_mem_flags flags, cl_channel_order channel_order, cl_channel_type channel_type, size_t width, size_t height, size_t depth, size_t slice_pitch, SV *data) 344image3d (OpenCL::Context this, cl_mem_flags flags, cl_channel_order channel_order, cl_channel_type channel_type, size_t width, size_t height, size_t depth, size_t slice_pitch, SV *data)
333 PPCODE: 345 PPCODE:
334{
335 STRLEN len; 346 STRLEN len;
336 char *ptr = SvPVbyte (data, len); 347 char *ptr = SvPVbyte (data, len);
337 const cl_image_format format = { channel_order, channel_type }; 348 const cl_image_format format = { channel_order, channel_type };
338 cl_int res;
339 cl_mem mem = clCreateImage3D (this, flags, &format, width, height, 349 NEED_SUCCESS_ARG (cl_mem mem, CreateImage3D, (this, flags, &format, width, height,
340 depth, len / (height * slice_pitch), slice_pitch, ptr, &res); 350 depth, len / (height * slice_pitch), slice_pitch, ptr, &res));
341
342 if (res)
343 FAIL (CreateImage3D, res);
344
345 XPUSH_NEW_OBJ ("OpenCL::Image3D", mem); 351 XPUSH_NEW_OBJ ("OpenCL::Image3D", mem);
346}
347 352
348void 353void
349supported_image_formats (OpenCL::Context this, cl_mem_flags flags, cl_mem_object_type image_type) 354supported_image_formats (OpenCL::Context this, cl_mem_flags flags, cl_mem_object_type image_type)
350 PPCODE: 355 PPCODE:
351{ 356{
368} 373}
369 374
370void 375void
371sampler (OpenCL::Context this, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode) 376sampler (OpenCL::Context this, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode)
372 PPCODE: 377 PPCODE:
373{
374 cl_int res;
375 cl_sampler sampler = clCreateSampler (this, normalized_coords, addressing_mode, filter_mode, &res); 378 NEED_SUCCESS_ARG (cl_sampler sampler, CreateSampler, (this, normalized_coords, addressing_mode, filter_mode, &res));
376
377 if (res)
378 FAIL (CreateSampler, res);
379
380 XPUSH_NEW_OBJ ("OpenCL::Sampler", sampler); 379 XPUSH_NEW_OBJ ("OpenCL::Sampler", sampler);
381}
382 380
383void 381void
384program_with_source (OpenCL::Context this, SV *program) 382program_with_source (OpenCL::Context this, SV *program)
385 PPCODE: 383 PPCODE:
386{
387 STRLEN len; 384 STRLEN len;
388 size_t len2; 385 size_t len2;
389 const char *ptr = SvPVbyte (program, len); 386 const char *ptr = SvPVbyte (program, len);
390 cl_int res;
391 cl_program prog;
392 387
393 len2 = len; 388 len2 = len;
394 prog = clCreateProgramWithSource (this, 1, &ptr, &len2, &res); 389 NEED_SUCCESS_ARG (cl_program prog, CreateProgramWithSource, (this, 1, &ptr, &len2, &res));
395
396 if (res)
397 FAIL (CreateProgramWithSource, res);
398
399 XPUSH_NEW_OBJ ("OpenCL::Program", prog); 390 XPUSH_NEW_OBJ ("OpenCL::Program", prog);
400}
401 391
402MODULE = OpenCL PACKAGE = OpenCL::Queue 392MODULE = OpenCL PACKAGE = OpenCL::Queue
403 393
404void 394void
405DESTROY (OpenCL::Queue this) 395DESTROY (OpenCL::Queue this)
579 cl_event ev = 0; 569 cl_event ev = 0;
580 size_t *gwo = 0, *gws, *lws = 0; 570 size_t *gwo = 0, *gws, *lws = 0;
581 int gws_len; 571 int gws_len;
582 size_t *lists; 572 size_t *lists;
583 int i; 573 int i;
584 EVENT_LIST (2, items - 2); 574 EVENT_LIST (5, items - 5);
585 575
586 if (!SvROK (global_work_size) || SvTYPE (SvRV (global_work_size)) != SVt_PVAV) 576 if (!SvROK (global_work_size) || SvTYPE (SvRV (global_work_size)) != SVt_PVAV)
587 croak ("clEnqueueNDRangeKernel: global_work_size must be an array reference"); 577 croak ("clEnqueueNDRangeKernel: global_work_size must be an array reference");
588 578
589 gws_len = AvFILLp (SvRV (global_work_size)) + 1; 579 gws_len = AvFILLp (SvRV (global_work_size)) + 1;
716} 706}
717 707
718void 708void
719kernel (OpenCL::Program program, SV *function) 709kernel (OpenCL::Program program, SV *function)
720 PPCODE: 710 PPCODE:
721{
722 cl_int res;
723 cl_kernel kernel = clCreateKernel (program, SvPVbyte_nolen (function), &res); 711 NEED_SUCCESS_ARG (cl_kernel kernel, CreateKernel, (program, SvPVbyte_nolen (function), &res));
724
725 if (res)
726 FAIL (CreateKernel, res);
727
728 XPUSH_NEW_OBJ ("OpenCL::Kernel", kernel); 712 XPUSH_NEW_OBJ ("OpenCL::Kernel", kernel);
729}
730 713
731MODULE = OpenCL PACKAGE = OpenCL::Kernel 714MODULE = OpenCL PACKAGE = OpenCL::Kernel
732 715
733void 716void
734DESTROY (OpenCL::Kernel this) 717DESTROY (OpenCL::Kernel this)
789set_float (OpenCL::Kernel this, cl_uint idx, cl_float value) 772set_float (OpenCL::Kernel this, cl_uint idx, cl_float value)
790 CODE: 773 CODE:
791 clSetKernelArg (this, idx, sizeof (value), &value); 774 clSetKernelArg (this, idx, sizeof (value), &value);
792 775
793void 776void
777set_double (OpenCL::Kernel this, cl_uint idx, cl_double value)
778 CODE:
779 clSetKernelArg (this, idx, sizeof (value), &value);
780
781void
794set_memory (OpenCL::Kernel this, cl_uint idx, OpenCL::Memory_ornull value) 782set_memory (OpenCL::Kernel this, cl_uint idx, OpenCL::Memory_ornull value)
795 CODE: 783 CODE:
796 clSetKernelArg (this, idx, sizeof (value), &value); 784 clSetKernelArg (this, idx, sizeof (value), &value);
797 785
798void 786void
835void 823void
836wait (OpenCL::Event this) 824wait (OpenCL::Event this)
837 CODE: 825 CODE:
838 clWaitForEvents (1, &this); 826 clWaitForEvents (1, &this);
839 827
828MODULE = OpenCL PACKAGE = OpenCL::UserEvent
829
830void
831set_status (OpenCL::UserEvent this, cl_int execution_status)
832 CODE:
833 clSetUserEventStatus (this, execution_status);
834

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines