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

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.18 by root, Wed Nov 23 03:02:38 2011 UTC vs.
Revision 1.20 by root, Sat Dec 10 23:07:38 2011 UTC

1#include "EXTERN.h" 1#include "EXTERN.h"
2#include "perl.h" 2#include "perl.h"
3#include "XSUB.h" 3#include "XSUB.h"
4 4
5#ifdef __APPLE__
6 #include <OpenCL/opencl.h>
7#else
5#include <CL/opencl.h> 8 #include <CL/opencl.h>
9#endif
6 10
7typedef cl_platform_id OpenCL__Platform; 11typedef cl_platform_id OpenCL__Platform;
8typedef cl_device_id OpenCL__Device; 12typedef cl_device_id OpenCL__Device;
9typedef cl_context OpenCL__Context; 13typedef cl_context OpenCL__Context;
10typedef cl_command_queue OpenCL__Queue; 14typedef cl_command_queue OpenCL__Queue;
138} 142}
139 143
140static cl_event * 144static cl_event *
141event_list (SV **items, int count) 145event_list (SV **items, int count)
142{ 146{
147 if (!count)
148 return 0;
149
143 cl_event *list = tmpbuf (sizeof (cl_event) * count); 150 cl_event *list = tmpbuf (sizeof (cl_event) * count);
144 151
145 while (count--) 152 while (count--)
146 list [count] = SvPTROBJ ("clEnqueue", "wait_events", items [count], "OpenCL::Event"); 153 list [count] = SvPTROBJ ("clEnqueue", "wait_events", items [count], "OpenCL::Event");
147 154

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines