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

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.73 by root, Sat May 5 13:30:07 2012 UTC vs.
Revision 1.74 by root, Sat May 5 13:56:00 2012 UTC

28#if PREFER_1_1 28#if PREFER_1_1
29 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS 29 #define CL_USE_DEPRECATED_OPENCL_1_1_APIS
30#endif 30#endif
31 31
32#ifdef __APPLE__ 32#ifdef __APPLE__
33 #include <OpenCL/opencl.h> 33 #define CLHDR(name) <OpenCL/name>
34#else 34#else
35 #define CLHDR(name) <CL/name>
36#endif
37
35 #include <CL/opencl.h> 38#include CLHDR(opencl.h)
39
40#ifndef CL_VERSION_1_2
41 #include CLHDR(cl_d3d9.h)
42#endif
43
44#if _WIN32
45 #include CLHDR(cl_d3d10.h)
46 #if CL_VERSION_1_2
47 #include CLHDR<cl_d3d11.h>
48 #endif
49 #include CLHDR<cl_dx9_media_sharing.h.h>
36#endif 50#endif
37 51
38#ifndef CL_VERSION_1_2 52#ifndef CL_VERSION_1_2
39 #undef PREFER_1_1 53 #undef PREFER_1_1
40 #define PREFER_1_1 1 54 #define PREFER_1_1 1
41#endif 55#endif
56
57// make sure all constants we might use are actually defined
58#include "default.h"
42 59
43typedef cl_platform_id OpenCL__Platform; 60typedef cl_platform_id OpenCL__Platform;
44typedef cl_device_id OpenCL__Device; 61typedef cl_device_id OpenCL__Device;
45typedef cl_device_id OpenCL__SubDevice; 62typedef cl_device_id OpenCL__SubDevice;
46typedef cl_context OpenCL__Context; 63typedef cl_context OpenCL__Context;
2517 PPCODE: 2534 PPCODE:
2518 cl_program_binary_type value [1]; 2535 cl_program_binary_type value [1];
2519 NEED_SUCCESS (GetProgramBuildInfo, (self, device, CL_PROGRAM_BINARY_TYPE, sizeof (value), value, 0)); 2536 NEED_SUCCESS (GetProgramBuildInfo, (self, device, CL_PROGRAM_BINARY_TYPE, sizeof (value), value, 0));
2520 EXTEND (SP, 1); 2537 EXTEND (SP, 1);
2521 const int i = 0; 2538 const int i = 0;
2522 PUSHs (sv_2mortal (newSVuv (UV)value [i]))); 2539 PUSHs (sv_2mortal (newSVuv ((UV)value [i])));
2523 2540
2524#END:program_build 2541#END:program_build
2525 2542
2526void 2543void
2527kernel (OpenCL::Program program, SV *function) 2544kernel (OpenCL::Program program, SV *function)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines