GPUOcelot
Public Member Functions | Public Attributes

cuda::CudaDriver::Interface Class Reference

Container for pointers to the actual functions. More...

#include <CudaDriver.h>

List of all members.

Public Member Functions

 Interface ()
 The constructor zeros out all of the pointers.
 ~Interface ()
 The destructor closes dlls.
void load ()
 Load the cuda driver.
bool loaded () const
 Has the driver been loaded?
void unload ()
 unloads the driver

Public Attributes

std::string _libname
 name of library to load
CUresult(* cuInit )(unsigned int Flags)
CUresult(* cuDriverGetVersion )(int *driverVersion)
CUresult(* cuDeviceGet )(CUdevice *device, int ordinal)
CUresult(* cuDeviceGetCount )(int *count)
CUresult(* cuDeviceGetName )(char *name, int len, CUdevice dev)
CUresult(* cuDeviceComputeCapability )(int *major, int *minor, CUdevice dev)
CUresult(* cuDeviceTotalMem )(size_t *bytes, CUdevice dev)
CUresult(* cuDeviceGetProperties )(CUdevprop *prop, CUdevice dev)
CUresult(* cuDeviceGetAttribute )(int *pi, CUdevice_attribute attrib, CUdevice dev)
CUresult(* cuCtxGetApiVersion )(CUcontext ctx, unsigned int *version)
CUresult(* cuCtxCreate )(CUcontext *pctx, unsigned int flags, CUdevice dev)
CUresult(* cuCtxGetLimit )(size_t *, CUlimit)
CUresult(* cuCtxDestroy )(CUcontext ctx)
CUresult(* cuCtxAttach )(CUcontext *pctx, unsigned int flags)
CUresult(* cuCtxDetach )(CUcontext ctx)
CUresult(* cuCtxPushCurrent )(CUcontext ctx)
CUresult(* cuCtxPopCurrent )(CUcontext *pctx)
CUresult(* cuCtxGetDevice )(CUdevice *device)
CUresult(* cuCtxSynchronize )(void)
CUresult(* cuModuleLoad )(CUmodule *module, const char *fname)
CUresult(* cuModuleLoadData )(CUmodule *module, const void *image)
CUresult(* cuModuleLoadDataEx )(CUmodule *module, const void *image, unsigned int numOptions, CUjit_option *options, void **optionValues)
CUresult(* cuModuleLoadFatBinary )(CUmodule *module, const void *fatCubin)
CUresult(* cuModuleUnload )(CUmodule hmod)
CUresult(* cuModuleGetFunction )(CUfunction *hfunc, CUmodule hmod, const char *name)
CUresult(* cuModuleGetGlobal )(CUdeviceptr *dptr, size_t *bytes, CUmodule hmod, const char *name)
CUresult(* cuModuleGetTexRef )(CUtexref *pTexRef, CUmodule hmod, const char *name)
CUresult(* cuMemGetInfo )(size_t *free, size_t *total)
CUresult(* cuMemAlloc )(CUdeviceptr *dptr, unsigned int bytesize)
CUresult(* cuMemAllocPitch )(CUdeviceptr *dptr, size_t *pPitch, unsigned int WidthInBytes, unsigned int Height, unsigned int ElementSizeBytes)
CUresult(* cuMemFree )(CUdeviceptr dptr)
CUresult(* cuMemGetAddressRange )(CUdeviceptr *pbase, size_t *psize, CUdeviceptr dptr)
CUresult(* cuMemAllocHost )(void **pp, unsigned int bytesize)
CUresult(* cuMemFreeHost )(void *p)
CUresult(* cuMemHostAlloc )(void **pp, unsigned long long bytesize, unsigned int Flags)
CUresult(* cuMemHostRegister )(void *pp, unsigned long long bytesize, unsigned int Flags)
CUresult(* cuMemHostUnregister )(void *pp)
CUresult(* cuMemHostGetDevicePointer )(CUdeviceptr *pdptr, void *p, unsigned int Flags)
CUresult(* cuMemHostGetFlags )(unsigned int *pFlags, void *p)
CUresult(* cuMemcpyHtoD )(CUdeviceptr dstDevice, const void *srcHost, unsigned int ByteCount)
CUresult(* cuMemcpyDtoH )(void *dstHost, CUdeviceptr srcDevice, unsigned int ByteCount)
CUresult(* cuMemcpyDtoD )(CUdeviceptr dstDevice, CUdeviceptr srcDevice, unsigned int ByteCount)
CUresult(* cuMemcpyDtoA )(CUarray dstArray, unsigned int dstIndex, CUdeviceptr srcDevice, unsigned int ByteCount)
CUresult(* cuMemcpyAtoD )(CUdeviceptr dstDevice, CUarray hSrc, unsigned int SrcIndex, unsigned int ByteCount)
CUresult(* cuMemcpyHtoA )(CUarray dstArray, unsigned int dstIndex, const void *pSrc, unsigned int ByteCount)
CUresult(* cuMemcpyAtoH )(void *dstHost, CUarray srcArray, unsigned int srcIndex, unsigned int ByteCount)
CUresult(* cuMemcpyAtoA )(CUarray dstArray, unsigned int dstIndex, CUarray srcArray, unsigned int srcIndex, unsigned int ByteCount)
CUresult(* cuMemcpy2D )(const CUDA_MEMCPY2D *pCopy)
CUresult(* cuMemcpy2DUnaligned )(const CUDA_MEMCPY2D *pCopy)
CUresult(* cuMemcpy3D )(const CUDA_MEMCPY3D *pCopy)
CUresult(* cuMemcpyHtoDAsync )(CUdeviceptr dstDevice, const void *srcHost, unsigned int ByteCount, CUstream hStream)
CUresult(* cuMemcpyDtoHAsync )(void *dstHost, CUdeviceptr srcDevice, unsigned int ByteCount, CUstream hStream)
CUresult(* cuMemcpyHtoAAsync )(CUarray dstArray, unsigned int dstIndex, const void *pSrc, unsigned int ByteCount, CUstream hStream)
CUresult(* cuMemcpyAtoHAsync )(void *dstHost, CUarray srcArray, unsigned int srcIndex, unsigned int ByteCount, CUstream hStream)
CUresult(* cuMemcpy2DAsync )(const CUDA_MEMCPY2D *pCopy, CUstream hStream)
CUresult(* cuMemcpy3DAsync )(const CUDA_MEMCPY3D *pCopy, CUstream hStream)
CUresult(* cuMemsetD8 )(CUdeviceptr dstDevice, unsigned char uc, unsigned int N)
CUresult(* cuMemsetD16 )(CUdeviceptr dstDevice, unsigned short us, unsigned int N)
CUresult(* cuMemsetD32 )(CUdeviceptr dstDevice, unsigned int ui, unsigned int N)
CUresult(* cuMemsetD2D8 )(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned char uc, unsigned int Width, unsigned int Height)
CUresult(* cuMemsetD2D16 )(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned short us, unsigned int Width, unsigned int Height)
CUresult(* cuMemsetD2D32 )(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned int ui, unsigned int Width, unsigned int Height)
CUresult(* cuFuncSetBlockShape )(CUfunction hfunc, int x, int y, int z)
CUresult(* cuFuncSetSharedSize )(CUfunction hfunc, unsigned int bytes)
CUresult(* cuFuncGetAttribute )(int *pi, CUfunction_attribute attrib, CUfunction hfunc)
CUresult(* cuFuncSetCacheConfig )(CUfunction hFunc, CUfunc_cache config)
CUresult(* cuArrayCreate )(CUarray *pHandle, const CUDA_ARRAY_DESCRIPTOR *pAllocateArray)
CUresult(* cuArrayGetDescriptor )(CUDA_ARRAY_DESCRIPTOR *pArrayDescriptor, CUarray hArray)
CUresult(* cuArrayDestroy )(CUarray hArray)
CUresult(* cuArray3DCreate )(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pAllocateArray)
CUresult(* cuArray3DGetDescriptor )(CUDA_ARRAY3D_DESCRIPTOR *pArrayDescriptor, CUarray hArray)
CUresult(* cuTexRefCreate )(CUtexref *pTexRef)
CUresult(* cuTexRefDestroy )(CUtexref hTexRef)
CUresult(* cuTexRefSetArray )(CUtexref hTexRef, CUarray hArray, unsigned int Flags)
CUresult(* cuTexRefSetAddress )(size_t *ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t bytes)
CUresult(* cuTexRefSetAddress2D )(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR *desc, CUdeviceptr dptr, unsigned int Pitch)
CUresult(* cuTexRefSetFormat )(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents)
CUresult(* cuTexRefSetAddressMode )(CUtexref hTexRef, int dim, CUaddress_mode am)
CUresult(* cuTexRefSetFilterMode )(CUtexref hTexRef, CUfilter_mode fm)
CUresult(* cuTexRefSetFlags )(CUtexref hTexRef, unsigned int Flags)
CUresult(* cuTexRefGetAddress )(CUdeviceptr *pdptr, CUtexref hTexRef)
CUresult(* cuTexRefGetArray )(CUarray *phArray, CUtexref hTexRef)
CUresult(* cuTexRefGetAddressMode )(CUaddress_mode *pam, CUtexref hTexRef, int dim)
CUresult(* cuTexRefGetFilterMode )(CUfilter_mode *pfm, CUtexref hTexRef)
CUresult(* cuTexRefGetFormat )(CUarray_format *pFormat, int *pNumChannels, CUtexref hTexRef)
CUresult(* cuTexRefGetFlags )(unsigned int *pFlags, CUtexref hTexRef)
CUresult(* cuParamSetSize )(CUfunction hfunc, unsigned int numbytes)
CUresult(* cuParamSeti )(CUfunction hfunc, int offset, unsigned int value)
CUresult(* cuParamSetf )(CUfunction hfunc, int offset, float value)
CUresult(* cuParamSetv )(CUfunction hfunc, int offset, void *ptr, unsigned int numbytes)
CUresult(* cuParamSetTexRef )(CUfunction hfunc, int texunit, CUtexref hTexRef)
CUresult(* cuLaunch )(CUfunction f)
CUresult(* cuLaunchGrid )(CUfunction f, int grid_width, int grid_height)
CUresult(* cuLaunchGridAsync )(CUfunction f, int grid_width, int grid_height, CUstream hStream)
CUresult(* cuEventCreate )(CUevent *phEvent, unsigned int Flags)
CUresult(* cuEventRecord )(CUevent hEvent, CUstream hStream)
CUresult(* cuEventQuery )(CUevent hEvent)
CUresult(* cuEventSynchronize )(CUevent hEvent)
CUresult(* cuEventDestroy )(CUevent hEvent)
CUresult(* cuEventElapsedTime )(float *pMilliseconds, CUevent hStart, CUevent hEnd)
CUresult(* cuStreamCreate )(CUstream *phStream, unsigned int Flags)
CUresult(* cuStreamQuery )(CUstream hStream)
CUresult(* cuStreamSynchronize )(CUstream hStream)
CUresult(* cuStreamDestroy )(CUstream hStream)
CUresult(* cuGraphicsUnregisterResource )(CUgraphicsResource resource)
CUresult(* cuGraphicsSubResourceGetMappedArray )(CUarray *pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel)
CUresult(* cuGraphicsResourceGetMappedPointer )(CUdeviceptr *pDevPtr, size_t *pSize, CUgraphicsResource resource)
CUresult(* cuGraphicsResourceSetMapFlags )(CUgraphicsResource resource, unsigned int flags)
CUresult(* cuGraphicsMapResources )(unsigned int count, CUgraphicsResource *resources, CUstream hStream)
CUresult(* cuGraphicsUnmapResources )(unsigned int count, CUgraphicsResource *resources, CUstream hStream)
CUresult(* cuGetExportTable )(const void **ppExportTable, const CUuuid *pExportTableId)
CUresult(* cuGLInit )()
CUresult(* cuGLCtxCreate )(CUcontext *pCtx, unsigned int Flags, CUdevice device)
CUresult(* cuGLRegisterBufferObject )(GLuint bufferobj)
CUresult(* cuGraphicsGLRegisterBuffer )(CUgraphicsResource *pCudaResource, unsigned int buffer, unsigned int Flags)
CUresult(* cuGraphicsGLRegisterImage )(CUgraphicsResource *pCudaResource, unsigned int image, int target, unsigned int Flags)
CUresult(* cuGLSetBufferObjectMapFlags )(GLuint buffer, unsigned int flags)

Detailed Description

Container for pointers to the actual functions.


Constructor & Destructor Documentation

cuda::CudaDriver::Interface::Interface ( )

The constructor zeros out all of the pointers.

cuda::CudaDriver::Interface::~Interface ( )

The destructor closes dlls.


Member Function Documentation

void cuda::CudaDriver::Interface::load ( )

Load the cuda driver.

bool cuda::CudaDriver::Interface::loaded ( ) const

Has the driver been loaded?

void cuda::CudaDriver::Interface::unload ( )

unloads the driver


Member Data Documentation

name of library to load

CUresult(* cuda::CudaDriver::Interface::cuGetExportTable)(const void **ppExportTable, const CUuuid *pExportTableId)
CUresult(* cuda::CudaDriver::Interface::cuGraphicsGLRegisterBuffer)(CUgraphicsResource *pCudaResource, unsigned int buffer, unsigned int Flags)
CUresult(* cuda::CudaDriver::Interface::cuGraphicsGLRegisterImage)(CUgraphicsResource *pCudaResource, unsigned int image, int target, unsigned int Flags)
CUresult(* cuda::CudaDriver::Interface::cuGraphicsSubResourceGetMappedArray)(CUarray *pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel)
CUresult(* cuda::CudaDriver::Interface::cuLaunchGrid)(CUfunction f, int grid_width, int grid_height)
CUresult(* cuda::CudaDriver::Interface::cuLaunchGridAsync)(CUfunction f, int grid_width, int grid_height, CUstream hStream)
CUresult(* cuda::CudaDriver::Interface::cuMemAllocHost)(void **pp, unsigned int bytesize)
CUresult(* cuda::CudaDriver::Interface::cuMemAllocPitch)(CUdeviceptr *dptr, size_t *pPitch, unsigned int WidthInBytes, unsigned int Height, unsigned int ElementSizeBytes)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyAtoA)(CUarray dstArray, unsigned int dstIndex, CUarray srcArray, unsigned int srcIndex, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyAtoD)(CUdeviceptr dstDevice, CUarray hSrc, unsigned int SrcIndex, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyAtoH)(void *dstHost, CUarray srcArray, unsigned int srcIndex, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyAtoHAsync)(void *dstHost, CUarray srcArray, unsigned int srcIndex, unsigned int ByteCount, CUstream hStream)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyDtoA)(CUarray dstArray, unsigned int dstIndex, CUdeviceptr srcDevice, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyDtoD)(CUdeviceptr dstDevice, CUdeviceptr srcDevice, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyDtoH)(void *dstHost, CUdeviceptr srcDevice, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyDtoHAsync)(void *dstHost, CUdeviceptr srcDevice, unsigned int ByteCount, CUstream hStream)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyHtoA)(CUarray dstArray, unsigned int dstIndex, const void *pSrc, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyHtoAAsync)(CUarray dstArray, unsigned int dstIndex, const void *pSrc, unsigned int ByteCount, CUstream hStream)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyHtoD)(CUdeviceptr dstDevice, const void *srcHost, unsigned int ByteCount)
CUresult(* cuda::CudaDriver::Interface::cuMemcpyHtoDAsync)(CUdeviceptr dstDevice, const void *srcHost, unsigned int ByteCount, CUstream hStream)
CUresult(* cuda::CudaDriver::Interface::cuMemHostAlloc)(void **pp, unsigned long long bytesize, unsigned int Flags)
CUresult(* cuda::CudaDriver::Interface::cuMemHostGetFlags)(unsigned int *pFlags, void *p)
CUresult(* cuda::CudaDriver::Interface::cuMemHostRegister)(void *pp, unsigned long long bytesize, unsigned int Flags)
CUresult(* cuda::CudaDriver::Interface::cuMemsetD16)(CUdeviceptr dstDevice, unsigned short us, unsigned int N)
CUresult(* cuda::CudaDriver::Interface::cuMemsetD2D16)(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned short us, unsigned int Width, unsigned int Height)
CUresult(* cuda::CudaDriver::Interface::cuMemsetD2D32)(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned int ui, unsigned int Width, unsigned int Height)
CUresult(* cuda::CudaDriver::Interface::cuMemsetD2D8)(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned char uc, unsigned int Width, unsigned int Height)
CUresult(* cuda::CudaDriver::Interface::cuMemsetD32)(CUdeviceptr dstDevice, unsigned int ui, unsigned int N)
CUresult(* cuda::CudaDriver::Interface::cuMemsetD8)(CUdeviceptr dstDevice, unsigned char uc, unsigned int N)
CUresult(* cuda::CudaDriver::Interface::cuModuleLoadDataEx)(CUmodule *module, const void *image, unsigned int numOptions, CUjit_option *options, void **optionValues)
CUresult(* cuda::CudaDriver::Interface::cuParamSetf)(CUfunction hfunc, int offset, float value)
CUresult(* cuda::CudaDriver::Interface::cuParamSeti)(CUfunction hfunc, int offset, unsigned int value)
CUresult(* cuda::CudaDriver::Interface::cuParamSetv)(CUfunction hfunc, int offset, void *ptr, unsigned int numbytes)

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines