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

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.29 by root, Thu Apr 19 13:51:36 2012 UTC vs.
Revision 1.30 by root, Thu Apr 19 14:34:56 2012 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
5#ifdef I_DLFCN
6 #include <dlfcn.h>
7#endif
4 8
5#ifdef __APPLE__ 9#ifdef __APPLE__
6 #include <OpenCL/opencl.h> 10 #include <OpenCL/opencl.h>
7#else 11#else
8 #include <CL/opencl.h> 12 #include <CL/opencl.h>
28typedef cl_kernel OpenCL__Kernel; 32typedef cl_kernel OpenCL__Kernel;
29typedef cl_event OpenCL__Event; 33typedef cl_event OpenCL__Event;
30typedef cl_event OpenCL__UserEvent; 34typedef cl_event OpenCL__UserEvent;
31 35
32typedef SV *FUTURE; 36typedef SV *FUTURE;
37
38/*****************************************************************************/
39
40// name must include a leading underscore
41static void *
42getsym (const char *name)
43{
44 #if defined I_DLFCN && defined RTLD_DEFAULT
45 #if !DLSYM_NEEDS_UNDERSCORE
46 ++name; // skip _
47 #endif
48 return dlsym (RTLD_DEFAULT, name);
49 #else
50 return 0;
51 #endif
52}
33 53
34/*****************************************************************************/ 54/*****************************************************************************/
35 55
36/* up to two temporary buffers */ 56/* up to two temporary buffers */
37static void * 57static void *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines