Blender V2.61 - r43446
Defines | Typedefs | Functions | Variables

util_opencl.cpp File Reference

#include <stdlib.h>
#include "util_opencl.h"
#include <dlfcn.h>

Go to the source code of this file.

Defines

#define CLCC_DYNLIB_OPEN(path)   dlopen(path, RTLD_NOW | RTLD_GLOBAL)
#define CLCC_DYNLIB_CLOSE   dlclose
#define CLCC_DYNLIB_IMPORT   dlsym

Typedefs

typedef void * CLCC_DYNLIB_HANDLE

Functions

static void clewExit (void)
 Unloads OpenCL dynamic library, should not be called directly.
int clLibraryInit ()
const char * clErrorString (cl_int error)

Variables

static CCL_NAMESPACE_BEGIN
CLCC_DYNLIB_HANDLE 
module = NULL
 module handle
PFNCLGETPLATFORMIDS __clewGetPlatformIDs = NULL
PFNCLGETPLATFORMINFO __clewGetPlatformInfo = NULL
PFNCLGETDEVICEIDS __clewGetDeviceIDs = NULL
PFNCLGETDEVICEINFO __clewGetDeviceInfo = NULL
PFNCLCREATECONTEXT __clewCreateContext = NULL
PFNCLCREATECONTEXTFROMTYPE __clewCreateContextFromType = NULL
PFNCLRETAINCONTEXT __clewRetainContext = NULL
PFNCLRELEASECONTEXT __clewReleaseContext = NULL
PFNCLGETCONTEXTINFO __clewGetContextInfo = NULL
PFNCLCREATECOMMANDQUEUE __clewCreateCommandQueue = NULL
PFNCLRETAINCOMMANDQUEUE __clewRetainCommandQueue = NULL
PFNCLRELEASECOMMANDQUEUE __clewReleaseCommandQueue = NULL
PFNCLGETCOMMANDQUEUEINFO __clewGetCommandQueueInfo = NULL
PFNCLSETCOMMANDQUEUEPROPERTY __clewSetCommandQueueProperty = NULL
PFNCLCREATEBUFFER __clewCreateBuffer = NULL
PFNCLCREATEIMAGE2D __clewCreateImage2D = NULL
PFNCLCREATEIMAGE3D __clewCreateImage3D = NULL
PFNCLRETAINMEMOBJECT __clewRetainMemObject = NULL
PFNCLRELEASEMEMOBJECT __clewReleaseMemObject = NULL
PFNCLGETSUPPORTEDIMAGEFORMATS __clewGetSupportedImageFormats = NULL
PFNCLGETMEMOBJECTINFO __clewGetMemObjectInfo = NULL
PFNCLGETIMAGEINFO __clewGetImageInfo = NULL
PFNCLCREATESAMPLER __clewCreateSampler = NULL
PFNCLRETAINSAMPLER __clewRetainSampler = NULL
PFNCLRELEASESAMPLER __clewReleaseSampler = NULL
PFNCLGETSAMPLERINFO __clewGetSamplerInfo = NULL
PFNCLCREATEPROGRAMWITHSOURCE __clewCreateProgramWithSource = NULL
PFNCLCREATEPROGRAMWITHBINARY __clewCreateProgramWithBinary = NULL
PFNCLRETAINPROGRAM __clewRetainProgram = NULL
PFNCLRELEASEPROGRAM __clewReleaseProgram = NULL
PFNCLBUILDPROGRAM __clewBuildProgram = NULL
PFNCLUNLOADCOMPILER __clewUnloadCompiler = NULL
PFNCLGETPROGRAMINFO __clewGetProgramInfo = NULL
PFNCLGETPROGRAMBUILDINFO __clewGetProgramBuildInfo = NULL
PFNCLCREATEKERNEL __clewCreateKernel = NULL
PFNCLCREATEKERNELSINPROGRAM __clewCreateKernelsInProgram = NULL
PFNCLRETAINKERNEL __clewRetainKernel = NULL
PFNCLRELEASEKERNEL __clewReleaseKernel = NULL
PFNCLSETKERNELARG __clewSetKernelArg = NULL
PFNCLGETKERNELINFO __clewGetKernelInfo = NULL
PFNCLGETKERNELWORKGROUPINFO __clewGetKernelWorkGroupInfo = NULL
PFNCLWAITFOREVENTS __clewWaitForEvents = NULL
PFNCLGETEVENTINFO __clewGetEventInfo = NULL
PFNCLRETAINEVENT __clewRetainEvent = NULL
PFNCLRELEASEEVENT __clewReleaseEvent = NULL
PFNCLGETEVENTPROFILINGINFO __clewGetEventProfilingInfo = NULL
PFNCLFLUSH __clewFlush = NULL
PFNCLFINISH __clewFinish = NULL
PFNCLENQUEUEREADBUFFER __clewEnqueueReadBuffer = NULL
PFNCLENQUEUEWRITEBUFFER __clewEnqueueWriteBuffer = NULL
PFNCLENQUEUECOPYBUFFER __clewEnqueueCopyBuffer = NULL
PFNCLENQUEUEREADIMAGE __clewEnqueueReadImage = NULL
PFNCLENQUEUEWRITEIMAGE __clewEnqueueWriteImage = NULL
PFNCLENQUEUECOPYIMAGE __clewEnqueueCopyImage = NULL
PFNCLENQUEUECOPYIMAGETOBUFFER __clewEnqueueCopyImageToBuffer = NULL
PFNCLENQUEUECOPYBUFFERTOIMAGE __clewEnqueueCopyBufferToImage = NULL
PFNCLENQUEUEMAPBUFFER __clewEnqueueMapBuffer = NULL
PFNCLENQUEUEMAPIMAGE __clewEnqueueMapImage = NULL
PFNCLENQUEUEUNMAPMEMOBJECT __clewEnqueueUnmapMemObject = NULL
PFNCLENQUEUENDRANGEKERNEL __clewEnqueueNDRangeKernel = NULL
PFNCLENQUEUETASK __clewEnqueueTask = NULL
PFNCLENQUEUENATIVEKERNEL __clewEnqueueNativeKernel = NULL
PFNCLENQUEUEMARKER __clewEnqueueMarker = NULL
PFNCLENQUEUEWAITFOREVENTS __clewEnqueueWaitForEvents = NULL
PFNCLENQUEUEBARRIER __clewEnqueueBarrier = NULL
PFNCLGETEXTENSIONFUNCTIONADDRESS __clewGetExtensionFunctionAddress = NULL

Define Documentation

#define CLCC_DYNLIB_CLOSE   dlclose

Definition at line 31 of file util_opencl.cpp.

Referenced by clewExit(), and clLibraryInit().

#define CLCC_DYNLIB_IMPORT   dlsym

Definition at line 32 of file util_opencl.cpp.

Referenced by clLibraryInit().

#define CLCC_DYNLIB_OPEN (   path)    dlopen(path, RTLD_NOW | RTLD_GLOBAL)

Definition at line 30 of file util_opencl.cpp.

Referenced by clLibraryInit().


Typedef Documentation

typedef void* CLCC_DYNLIB_HANDLE

Definition at line 28 of file util_opencl.cpp.


Function Documentation

const char* clErrorString ( cl_int  error)
Parameters:
errorCL error code
Returns:
a string representation of the error code

Definition at line 243 of file util_opencl.cpp.

References error(), and strings.

static void clewExit ( void  ) [static]

Unloads OpenCL dynamic library, should not be called directly.

Definition at line 118 of file util_opencl.cpp.

References CLCC_DYNLIB_CLOSE, module, and NULL.

Referenced by clLibraryInit().

int clLibraryInit ( void  )
Parameters:
pathpath to dynamic library to load
Returns:
CLEW_ERROR_OPEN_FAILED if the library could not be opened CLEW_ERROR_ATEXIT_FAILED if atexit(clewExit) failed CLEW_SUCCESS when the library was succesfully loaded

Definition at line 132 of file util_opencl.cpp.

References __clewBuildProgram, __clewCreateBuffer, __clewCreateCommandQueue, __clewCreateContext, __clewCreateContextFromType, __clewCreateImage2D, __clewCreateImage3D, __clewCreateKernel, __clewCreateKernelsInProgram, __clewCreateProgramWithBinary, __clewCreateProgramWithSource, __clewCreateSampler, __clewEnqueueBarrier, __clewEnqueueCopyBuffer, __clewEnqueueCopyBufferToImage, __clewEnqueueCopyImage, __clewEnqueueCopyImageToBuffer, __clewEnqueueMapBuffer, __clewEnqueueMapImage, __clewEnqueueMarker, __clewEnqueueNativeKernel, __clewEnqueueNDRangeKernel, __clewEnqueueReadBuffer, __clewEnqueueReadImage, __clewEnqueueTask, __clewEnqueueUnmapMemObject, __clewEnqueueWaitForEvents, __clewEnqueueWriteBuffer, __clewEnqueueWriteImage, __clewFinish, __clewFlush, __clewGetCommandQueueInfo, __clewGetContextInfo, __clewGetDeviceIDs, __clewGetDeviceInfo, __clewGetEventInfo, __clewGetEventProfilingInfo, __clewGetExtensionFunctionAddress, __clewGetImageInfo, __clewGetKernelInfo, __clewGetKernelWorkGroupInfo, __clewGetMemObjectInfo, __clewGetPlatformIDs, __clewGetPlatformInfo, __clewGetProgramBuildInfo, __clewGetProgramInfo, __clewGetSamplerInfo, __clewGetSupportedImageFormats, __clewReleaseCommandQueue, __clewReleaseContext, __clewReleaseEvent, __clewReleaseKernel, __clewReleaseMemObject, __clewReleaseProgram, __clewReleaseSampler, __clewRetainCommandQueue, __clewRetainContext, __clewRetainEvent, __clewRetainKernel, __clewRetainMemObject, __clewRetainProgram, __clewRetainSampler, __clewSetCommandQueueProperty, __clewSetKernelArg, __clewUnloadCompiler, __clewWaitForEvents, CLCC_DYNLIB_CLOSE, CLCC_DYNLIB_IMPORT, CLCC_DYNLIB_OPEN, clewExit(), error(), module, and NULL.

Referenced by Device::available_devices(), Device::available_types(), and Device::create().


Variable Documentation

Definition at line 78 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 62 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 57 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 52 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 53 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 63 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 64 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 82 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 83 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 75 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 74 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 70 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 112 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 98 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 103 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 101 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 102 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 104 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 105 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 110 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 109 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 107 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 96 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 99 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 108 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 106 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 111 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 97 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 100 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 95 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 94 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 60 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 56 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 50 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 51 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 90 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 93 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 113 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 69 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 87 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 88 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 68 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 48 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 49 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 81 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 80 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 73 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 67 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 59 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 55 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 92 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 85 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 66 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 77 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 72 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 58 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 54 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 91 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 84 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 65 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 76 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 71 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 61 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 86 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 79 of file util_opencl.cpp.

Referenced by clLibraryInit().

Definition at line 89 of file util_opencl.cpp.

Referenced by clLibraryInit().

CCL_NAMESPACE_BEGIN CLCC_DYNLIB_HANDLE module = NULL [static]

module handle

Definition at line 44 of file util_opencl.cpp.

Referenced by clewExit(), and clLibraryInit().