Interface cuda.ICuda
interface wrapping all cuda versions
Assembly: Hybridizer.Runtime.CUDAImports.dll
Syntax
public interface ICuda : cuda.ICudaMarshalling
Methods
Gets info about the specified cudaArray
Declaration
cudaError_t ArrayGetInfo(out cudaChannelFormatDesc desc, out cudaExtent extent, out uint flags, cudaArray_t array)
Parameters
Returns
ChooseDevice(out Int32, ref cudaDeviceProp)
Select compute-device which best matches criteria.
Declaration
cudaError_t ChooseDevice(out int device, ref cudaDeviceProp prop)
Parameters
Returns
Configure a device-launch
Declaration
cudaError_t ConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMemory, cudaStream_t stream)
Parameters
Returns
CreateSurfaceObject(out cudaSurfaceObject_t, ref cudaResourceDesc)
Declaration
cudaError_t CreateSurfaceObject(out cudaSurfaceObject_t surface, ref cudaResourceDesc resDesc)
Parameters
Returns
CreateTextureObject(out cudaTextureObject_t, ref cudaResourceDesc, ref cudaTextureDesc)
Declaration
cudaError_t CreateTextureObject(out cudaTextureObject_t texture, ref cudaResourceDesc resDesc, ref cudaTextureDesc texDesc)
Parameters
Returns
CreateTextureObject(out cudaTextureObject_t, ref cudaResourceDesc, ref cudaTextureDesc, ref cudaResourceViewDesc)
Declaration
cudaError_t CreateTextureObject(out cudaTextureObject_t texture, ref cudaResourceDesc resDesc, ref cudaTextureDesc texDesc, ref cudaResourceViewDesc ResViewDesc)
Parameters
Returns
DestroySurfaceObject(cudaSurfaceObject_t)
Destroys a surface object
Declaration
cudaError_t DestroySurfaceObject(cudaSurfaceObject_t surface)
Parameters
Returns
DestroyTextureObject(cudaTextureObject_t)
Destroys a texture object
Declaration
cudaError_t DestroyTextureObject(cudaTextureObject_t texture)
Parameters
Returns
DeviceGetAttribute(out Int32, cudaDeviceAttr, Int32)
Returns information about the device.
Declaration
cudaError_t DeviceGetAttribute(out int value, cudaDeviceAttr attr, int device)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
cudaDeviceAttr |
attr |
|
System.Int32 |
device |
|
Returns
DeviceGetByPCIBusId(out Int32, String)
Returns a handle to a compute device.
Declaration
cudaError_t DeviceGetByPCIBusId(out int device, string pciBusId)
Parameters
Type |
Name |
Description |
System.Int32 |
device |
|
System.String |
pciBusId |
|
Returns
DeviceGetCacheConfig(IntPtr)
Returns the preferred cache configuration for the current device.
Declaration
cudaError_t DeviceGetCacheConfig(IntPtr pCacheConfig)
Parameters
Type |
Name |
Description |
System.IntPtr |
pCacheConfig |
|
Returns
DeviceGetLimit(out size_t, cudaLimit)
Declaration
cudaError_t DeviceGetLimit(out size_t pValue, cudaLimit limit)
Parameters
Returns
DeviceGetP2PAttribute(out Int32, cudaDeviceP2PAttr, Int32, Int32)
Queries attributes of the link between two devices.
Declaration
cudaError_t DeviceGetP2PAttribute(out int value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
cudaDeviceP2PAttr |
attr |
|
System.Int32 |
srcDevice |
|
System.Int32 |
dstDevice |
|
Returns
DeviceGetPCIBusId(StringBuilder, Int32, Int32)
Returns a PCI Bus Id string for the device.
Declaration
cudaError_t DeviceGetPCIBusId(StringBuilder pciBusId, int len, int device)
Parameters
Type |
Name |
Description |
System.Text.StringBuilder |
pciBusId |
|
System.Int32 |
len |
|
System.Int32 |
device |
|
Returns
DeviceGetSharedMemConfig(IntPtr)
Returns the shared memory configuration for the current device.
Declaration
cudaError_t DeviceGetSharedMemConfig(IntPtr pConfig)
Parameters
Type |
Name |
Description |
System.IntPtr |
pConfig |
|
Returns
DeviceGetStreamPriorityRange(out Int32, out Int32)
Returns numerical values that correspond to the least and greatest stream priorities.
Declaration
cudaError_t DeviceGetStreamPriorityRange(out int leastPriority, out int greatestPriority)
Parameters
Type |
Name |
Description |
System.Int32 |
leastPriority |
|
System.Int32 |
greatestPriority |
|
Returns
DeviceReset()
Destroy all allocations and reset all state on the current device in the current process.
Declaration
cudaError_t DeviceReset()
Returns
DeviceSetCacheConfig(cudaFuncCache)
Sets the preferred cache configuration for the current device.
Declaration
cudaError_t DeviceSetCacheConfig(cudaFuncCache cacheConfig)
Parameters
Returns
DeviceSetLimit(cudaLimit, size_t)
Declaration
cudaError_t DeviceSetLimit(cudaLimit limit, size_t value)
Parameters
Returns
DeviceSetSharedMemConfig(cudaSharedMemConfig)
Sets the shared memory configuration for the current device.
Declaration
cudaError_t DeviceSetSharedMemConfig(cudaSharedMemConfig config)
Parameters
Returns
DeviceSynchronize()
Wait for compute device to finish.
Declaration
cudaError_t DeviceSynchronize()
Returns
EventCreate(out cudaEvent_t)
Declaration
cudaError_t EventCreate(out cudaEvent_t evt)
Parameters
Returns
EventCreateWithFlags(out cudaEvent_t, cudaEventFlags)
Creates an event object with the specified flags
Declaration
cudaError_t EventCreateWithFlags(out cudaEvent_t evt, cudaEventFlags flags)
Parameters
Returns
EventDestroy(cudaEvent_t)
Declaration
cudaError_t EventDestroy(cudaEvent_t evt)
Parameters
Returns
EventElapsedTime(out Single, cudaEvent_t, cudaEvent_t)
Computes the elapsed time between events
Declaration
cudaError_t EventElapsedTime(out float ms, cudaEvent_t start, cudaEvent_t stop)
Parameters
Returns
EventQuery(cudaEvent_t)
Queries an event's status
Declaration
cudaError_t EventQuery(cudaEvent_t evt)
Parameters
Returns
EventRecord(cudaEvent_t, cudaStream_t)
Declaration
cudaError_t EventRecord(cudaEvent_t evt, cudaStream_t stream)
Parameters
Returns
EventSynchronize(cudaEvent_t)
Waits for an event to complete
Declaration
cudaError_t EventSynchronize(cudaEvent_t evt)
Parameters
Returns
FreeArray(cudaArray_t)
Frees an array on the device
Declaration
cudaError_t FreeArray(cudaArray_t arr)
Parameters
Returns
FreeMipmappedArray(cudaMipmappedArray_t)
Frees a mipmapped array on the device
Declaration
cudaError_t FreeMipmappedArray(cudaMipmappedArray_t mipmappedArray)
Parameters
Returns
FuncGetAttributes(out cudaFuncAttributes, String)
Find out attributes for a given function.
Declaration
cudaError_t FuncGetAttributes(out cudaFuncAttributes attr, string func)
Parameters
Returns
FuncSetCacheConfig(IntPtr, cudaFuncCache)
Sets the preferred cache configuration for a device function.
Declaration
cudaError_t FuncSetCacheConfig(IntPtr func, cudaFuncCache cacheConfig)
Parameters
Type |
Name |
Description |
System.IntPtr |
func |
|
cudaFuncCache |
cacheConfig |
|
Returns
FuncSetSharedMemConfig(IntPtr, cudaSharedMemConfig)
Sets the shared memory configuration for a device function.
Declaration
cudaError_t FuncSetSharedMemConfig(IntPtr func, cudaSharedMemConfig config)
Parameters
Returns
GetDevice(out Int32)
Returns which device is currently being used.
Declaration
cudaError_t GetDevice(out int device)
Parameters
Type |
Name |
Description |
System.Int32 |
device |
|
Returns
GetDeviceCount(out Int32)
Returns the number of compute-capable devices.
Declaration
cudaError_t GetDeviceCount(out int count)
Parameters
Type |
Name |
Description |
System.Int32 |
count |
|
Returns
GetDeviceFlags(out UInt32)
Gets the flags for the current device
Declaration
cudaError_t GetDeviceFlags(out uint flags)
Parameters
Type |
Name |
Description |
System.UInt32 |
flags |
|
Returns
GetDeviceProperties(out cudaDeviceProp, Int32)
Returns information about the compute-device.
Declaration
cudaError_t GetDeviceProperties(out cudaDeviceProp prop, int device)
Parameters
Returns
GetMipmappedArrayLevel(out cudaArray_t, cudaMipmappedArray_const_t, UInt32)
Gets a mipmap level of a CUDA mipmapped array
Declaration
cudaError_t GetMipmappedArrayLevel(out cudaArray_t levelArray, cudaMipmappedArray_const_t mipmappedArray, uint level)
Parameters
Returns
GetSurfaceObjectResourceDesc(out cudaResourceDesc, cudaSurfaceObject_t)
Returns a surface object's resource descriptor
Declaration
cudaError_t GetSurfaceObjectResourceDesc(out cudaResourceDesc resDesc, cudaSurfaceObject_t surface)
Parameters
Returns
GetSymbolAddress(out IntPtr, String)
Finds the address associated with a CUDA symbol
Declaration
cudaError_t GetSymbolAddress(out IntPtr devPtr, string symbol)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
|
System.String |
symbol |
|
Returns
GetSymbolSize(out size_t, String)
Finds the size of the object associated with a CUDA symbol
Declaration
cudaError_t GetSymbolSize(out size_t size, string symbol)
Parameters
Type |
Name |
Description |
size_t |
size |
|
System.String |
symbol |
|
Returns
GetTextureObjectResourceDesc(out cudaResourceDesc, cudaTextureObject_t)
Declaration
cudaError_t GetTextureObjectResourceDesc(out cudaResourceDesc resDesc, cudaTextureObject_t texture)
Parameters
Returns
GLRegisterBufferObject(UInt32)
Registers a buffer object for access by CUDA.
Declaration
cudaError_t GLRegisterBufferObject(uint buffer)
Parameters
Type |
Name |
Description |
System.UInt32 |
buffer |
Buffer object ID to register
|
Returns
GLUnregisterBufferObject(UInt32)
Unmaps a buffer object for access by CUDA.
Declaration
cudaError_t GLUnregisterBufferObject(uint buffer)
Parameters
Type |
Name |
Description |
System.UInt32 |
buffer |
Buffer object to unmap
|
Returns
GraphicsGLRegisterBuffer(out IntPtr, UInt32, UInt32)
Registers an OpenGL buffer object.
Declaration
cudaError_t GraphicsGLRegisterBuffer(out IntPtr pCudaResource, uint buffer, uint Flags)
Parameters
Type |
Name |
Description |
System.IntPtr |
pCudaResource |
Pointer to the returned object handle
|
System.UInt32 |
buffer |
name of buffer object to be registered
|
System.UInt32 |
Flags |
Register flags
|
Returns
GraphicsGLRegisterImage(out IntPtr, UInt32, UInt32, UInt32)
Register an OpenGL texture or renderbuffer object.
Declaration
cudaError_t GraphicsGLRegisterImage(out IntPtr cudaGraphicsResource, uint image, uint target, uint flags)
Parameters
Type |
Name |
Description |
System.IntPtr |
cudaGraphicsResource |
Pointer to the returned object handle
|
System.UInt32 |
image |
name of texture or renderbuffer object to be registered
|
System.UInt32 |
target |
Identifies the type of object specified by image
|
System.UInt32 |
flags |
Register flags
|
Returns
Type |
Description |
cudaError_t |
cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
|
GraphicsMapResources(Int32, IntPtr[], cudaStream_t)
Map graphics resources for access by CUDA.
Declaration
cudaError_t GraphicsMapResources(int count, IntPtr[] resources, cudaStream_t stream)
Parameters
Type |
Name |
Description |
System.Int32 |
count |
Number of resources to map
|
System.IntPtr[] |
resources |
Resources to map for CUDA
|
cudaStream_t |
stream |
Stream for synchronization
|
Returns
GraphicsResourceGetMappedPointer(out IntPtr, out size_t, IntPtr)
Get an device pointer through which to access a mapped graphics resource.
Declaration
cudaError_t GraphicsResourceGetMappedPointer(out IntPtr devPtr, out size_t size, IntPtr resource)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
Returned pointer through which resource may be accessed
|
size_t |
size |
Returned size of the buffer accessible starting at *devPtr
|
System.IntPtr |
resource |
Mapped resource to access
|
Returns
GraphicsResourceSetMapFlags(IntPtr, UInt32)
Set usage flags for mapping a graphics resource.
Declaration
cudaError_t GraphicsResourceSetMapFlags(IntPtr resource, uint flags)
Parameters
Type |
Name |
Description |
System.IntPtr |
resource |
Registered resource to set flags for
|
System.UInt32 |
flags |
Parameters for resource mapping
|
Returns
GraphicsSubResourceGetMappedArray(out cudaArray_t, IntPtr, UInt32, UInt32)
Get an array through which to access a subresource of a mapped graphics resource.
Declaration
cudaError_t GraphicsSubResourceGetMappedArray(out cudaArray_t array, IntPtr resource, uint arrayIndex, uint mipLevel)
Parameters
Type |
Name |
Description |
cudaArray_t |
array |
Returned array through which a subresource of resource may be accessed
|
System.IntPtr |
resource |
Mapped resource to access
|
System.UInt32 |
arrayIndex |
Array index for array textures or cubemap face index as defined by cudaGraphicsCubeFace for cubemap textures for the subresource to access
|
System.UInt32 |
mipLevel |
Mipmap level for the subresource to access
|
Returns
Type |
Description |
cudaError_t |
cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown
|
GraphicsUnmapResources(Int32, IntPtr[], cudaStream_t)
Unmap graphics resources.
Declaration
cudaError_t GraphicsUnmapResources(int count, IntPtr[] resources, cudaStream_t stream)
Parameters
Type |
Name |
Description |
System.Int32 |
count |
Number of resources to map
|
System.IntPtr[] |
resources |
Resources to map for CUDA
|
cudaStream_t |
stream |
Stream for synchronization
|
Returns
GraphicsUnregisterResource(IntPtr)
Unregisters a graphics resource for access by CUDA.
Declaration
cudaError_t GraphicsUnregisterResource(IntPtr resource)
Parameters
Type |
Name |
Description |
System.IntPtr |
resource |
Resource to unregister
|
Returns
HostGetDevicePointer(out IntPtr, IntPtr, cudaGetDevicePointerFlags)
Passes back device pointer of mapped host memory allocated by cudaHostAlloc or registered by cudaHostRegister
Declaration
cudaError_t HostGetDevicePointer(out IntPtr pdev, IntPtr phost, cudaGetDevicePointerFlags flags)
Parameters
Returns
HostGetFlags(out cudaHostAllocFlags, IntPtr)
Passes back flags used to allocate pinned host memory allocated by cudaHostAlloc
Declaration
cudaError_t HostGetFlags(out cudaHostAllocFlags flags, IntPtr phost)
Parameters
Returns
IpcCloseMemHandle(IntPtr)
Close memory mapped with cudaIpcOpenMemHandle.
Declaration
cudaError_t IpcCloseMemHandle(IntPtr devPtr)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
|
Returns
IpcGetEventHandle(out cudaIpcEventHandle_t, cudaEvent_t)
Gets an interprocess handle for a previously allocated event.
Declaration
cudaError_t IpcGetEventHandle(out cudaIpcEventHandle_t handle, cudaEvent_t evt)
Parameters
Returns
IpcGetMemHandle(out cudaIpcMemHandle_t, IntPtr)
Gets an interprocess memory handle for an existing device memory allocation
Declaration
cudaError_t IpcGetMemHandle(out cudaIpcMemHandle_t handle, IntPtr devPtr)
Parameters
Returns
IpcOpenEventHandle(out cudaEvent_t, cudaIpcEventHandle_t)
Opens an interprocess event handle for use in the current process.
Declaration
cudaError_t IpcOpenEventHandle(out cudaEvent_t evt, cudaIpcEventHandle_t handle)
Parameters
Returns
IpcOpenMemHandle(out IntPtr, cudaIpcMemHandle_t, UInt32)
Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.
Declaration
cudaError_t IpcOpenMemHandle(out IntPtr devPtr, cudaIpcMemHandle_t handle, uint flags)
Parameters
Returns
Launch(String)
Launches a device function.
Declaration
cudaError_t Launch(string func)
Parameters
Type |
Name |
Description |
System.String |
func |
|
Returns
LaunchKernel(IntPtr, dim3, dim3, IntPtr, size_t, cudaStream_t)
Launches a device function.
Declaration
cudaError_t LaunchKernel(IntPtr func, dim3 gridDim, dim3 blockDim, IntPtr args, size_t sharedMem, cudaStream_t stream)
Parameters
Returns
Malloc3D(ref cudaPitchedPtr, cudaExtent)
Allocates logical 1D, 2D, or 3D memory objects on the device
Declaration
cudaError_t Malloc3D(ref cudaPitchedPtr ptr, cudaExtent extent)
Parameters
Returns
Allocate an array on the device
Declaration
cudaError_t Malloc3DArray(out cudaArray_t arr, ref cudaChannelFormatDesc chan, cudaExtent extent, cudaMallocArrayFlags flags)
Parameters
Returns
Allocate an array on the device
Declaration
cudaError_t MallocArray(out cudaArray_t arr, ref cudaChannelFormatDesc chan, size_t width, size_t height, cudaMallocArrayFlags flags)
Parameters
Returns
MallocHost(out IntPtr, size_t)
Allocates page-locked memory on the host
Declaration
cudaError_t MallocHost(out IntPtr ptr, size_t size)
Parameters
Type |
Name |
Description |
System.IntPtr |
ptr |
|
size_t |
size |
|
Returns
MallocManaged(out IntPtr, size_t, UInt32)
Allocates memory that will be automatically managed by the Unified Memory system
Declaration
cudaError_t MallocManaged(out IntPtr devPtr, size_t size, uint flags)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
|
size_t |
size |
|
System.UInt32 |
flags |
|
Returns
Allocate a mipmapped array on the device
Declaration
cudaError_t MallocMipmappedArray(out cudaMipmappedArray_t mipmappedArray, ref cudaChannelFormatDesc desc, cudaExtent extent, uint numLevels, uint flags)
Parameters
Returns
MallocPitch(out IntPtr, out size_t, size_t, size_t)
Allocates pitched memory on the device
Declaration
cudaError_t MallocPitch(out IntPtr dptr, out size_t pitch, size_t width, size_t height)
Parameters
Returns
MemAdvise(IntPtr, size_t, cudaMemmoryAdvise, Int32)
Advise about the usage of a given memory range
Declaration
cudaError_t MemAdvise(IntPtr devptr, size_t count, cudaMemmoryAdvise advice, int device)
Parameters
Returns
Memcpy2D(IntPtr, size_t, IntPtr, size_t, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t Memcpy2D(IntPtr dest, size_t dpitch, IntPtr src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind)
Parameters
Returns
Memcpy2DArrayToArray(cudaArray_t, size_t, size_t, cudaArray_t, size_t, size_t, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t Memcpy2DArrayToArray(cudaArray_t dest, size_t wOffsetDest, size_t hOffsetDest, cudaArray_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, cudaMemcpyKind kind)
Parameters
Returns
Memcpy2DAsync(IntPtr, size_t, IntPtr, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t Memcpy2DAsync(IntPtr dest, size_t dpitch, IntPtr src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
Memcpy2DFromArray(IntPtr, size_t, cudaArray_t, size_t, size_t, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t Memcpy2DFromArray(IntPtr dest, size_t dpitch, cudaArray_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind)
Parameters
Returns
Memcpy2DFromArrayAsync(IntPtr, size_t, cudaArray_t, size_t, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t Memcpy2DFromArrayAsync(IntPtr dest, size_t dpitch, cudaArray_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
Memcpy2DToArray(cudaArray_t, size_t, size_t, IntPtr, size_t, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t Memcpy2DToArray(cudaArray_t dest, size_t wOffsetDest, size_t hOffsetDest, IntPtr src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind)
Parameters
Returns
Memcpy2DToArrayAsync(cudaArray_t, size_t, size_t, IntPtr, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t Memcpy2DToArrayAsync(cudaArray_t dest, size_t wOffsetDest, size_t hOffsetDest, IntPtr src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
Memcpy3D(ref cudaMemcpy3DParms)
Copies data between host and device
Declaration
cudaError_t Memcpy3D(ref cudaMemcpy3DParms par)
Parameters
Returns
Memcpy3DAsync(ref cudaMemcpy3DParms, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t Memcpy3DAsync(ref cudaMemcpy3DParms par, cudaStream_t stream)
Parameters
Returns
Memcpy3DPeer(ref cudaMemcpy3DPeerParms)
Copies memory between devices
Declaration
cudaError_t Memcpy3DPeer(ref cudaMemcpy3DPeerParms par)
Parameters
Returns
Memcpy3DPeerAsync(ref cudaMemcpy3DPeerParms, cudaStream_t)
Copies memory between devices
Declaration
cudaError_t Memcpy3DPeerAsync(ref cudaMemcpy3DPeerParms par, cudaStream_t stream)
Parameters
Returns
MemcpyArrayToArray(cudaArray_t, size_t, size_t, cudaArray_t, size_t, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t MemcpyArrayToArray(cudaArray_t dest, size_t wOffsetDst, size_t hOffsetDst, cudaArray_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind)
Parameters
Returns
MemcpyFromArray(IntPtr, cudaArray_t, size_t, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t MemcpyFromArray(IntPtr dest, cudaArray_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind)
Parameters
Returns
MemcpyFromArrayAsync(IntPtr, cudaArray_t, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t MemcpyFromArrayAsync(IntPtr dest, cudaArray_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
MemcpyFromSymbol(IntPtr, String, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t MemcpyFromSymbol(IntPtr dest, string symbol, size_t count, size_t offset, cudaMemcpyKind kind)
Parameters
Returns
MemcpyFromSymbolAsync(IntPtr, String, size_t, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t MemcpyFromSymbolAsync(IntPtr dest, string symbol, size_t count, size_t offset, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
MemcpyPeer(IntPtr, Int32, IntPtr, Int32, size_t)
Copies memory between devices
Declaration
cudaError_t MemcpyPeer(IntPtr dest, int dstDevice, IntPtr src, int srcDevice, size_t count)
Parameters
Type |
Name |
Description |
System.IntPtr |
dest |
|
System.Int32 |
dstDevice |
|
System.IntPtr |
src |
|
System.Int32 |
srcDevice |
|
size_t |
count |
|
Returns
MemcpyPeerAsync(IntPtr, Int32, IntPtr, Int32, size_t, cudaStream_t)
Copies memory between devices
Declaration
cudaError_t MemcpyPeerAsync(IntPtr dest, int dstDevice, IntPtr src, int srcDevice, size_t count, cudaStream_t stream)
Parameters
Type |
Name |
Description |
System.IntPtr |
dest |
|
System.Int32 |
dstDevice |
|
System.IntPtr |
src |
|
System.Int32 |
srcDevice |
|
size_t |
count |
|
cudaStream_t |
stream |
|
Returns
MemcpyToArray(cudaArray_t, size_t, size_t, IntPtr, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t MemcpyToArray(cudaArray_t dest, size_t wOffset, size_t hOffset, IntPtr src, size_t count, cudaMemcpyKind kind)
Parameters
Returns
MemcpyToArrayAsync(cudaArray_t, size_t, size_t, IntPtr, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t MemcpyToArrayAsync(cudaArray_t dest, size_t wOffset, size_t hOffset, IntPtr src, size_t count, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
MemcpyToSymbol(String, IntPtr, size_t, size_t, cudaMemcpyKind)
Copies data between host and device
Declaration
cudaError_t MemcpyToSymbol(string symbol, IntPtr src, size_t count, size_t offset, cudaMemcpyKind kind)
Parameters
Returns
MemcpyToSymbolAsync(String, IntPtr, size_t, size_t, cudaMemcpyKind, cudaStream_t)
Copies data between host and device
Declaration
cudaError_t MemcpyToSymbolAsync(string symbol, IntPtr src, size_t count, size_t offset, cudaMemcpyKind kind, cudaStream_t stream)
Parameters
Returns
MemGetInfo(out size_t, out size_t)
Gets free and total device memory
Declaration
cudaError_t MemGetInfo(out size_t free, out size_t total)
Parameters
Returns
MemPrefetchAsync(IntPtr, size_t, Int32)
Prefetches memory to the specified destination device
Declaration
cudaError_t MemPrefetchAsync(IntPtr devptr, size_t count, int dstDevice)
Parameters
Type |
Name |
Description |
System.IntPtr |
devptr |
|
size_t |
count |
|
System.Int32 |
dstDevice |
|
Returns
MemPrefetchAsync(IntPtr, size_t, Int32, cudaStream_t)
Prefetches memory to the specified destination device
Declaration
cudaError_t MemPrefetchAsync(IntPtr devptr, size_t count, int dstDevice, cudaStream_t stream)
Parameters
Type |
Name |
Description |
System.IntPtr |
devptr |
|
size_t |
count |
|
System.Int32 |
dstDevice |
|
cudaStream_t |
stream |
|
Returns
Memset(IntPtr, Int32, size_t)
Initializes or sets device memory to a value
Declaration
cudaError_t Memset(IntPtr devPtr, int value, size_t count)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
|
System.Int32 |
value |
|
size_t |
count |
|
Returns
Memset2D(IntPtr, size_t, Int32, size_t, size_t)
Initializes or sets device memory to a value
Declaration
cudaError_t Memset2D(IntPtr devPtr, size_t pitch, int value, size_t width, size_t height)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
|
size_t |
pitch |
|
System.Int32 |
value |
|
size_t |
width |
|
size_t |
height |
|
Returns
Memset2DAsync(IntPtr, size_t, Int32, size_t, size_t, cudaStream_t)
Copies memory between devices
Declaration
cudaError_t Memset2DAsync(IntPtr devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream)
Parameters
Returns
Memset3D(cudaPitchedPtr, Int32, cudaExtent)
Initializes or sets device memory to a value
Declaration
cudaError_t Memset3D(cudaPitchedPtr devPtr, int value, cudaExtent extent)
Parameters
Returns
Memset3DAsync(cudaPitchedPtr, Int32, cudaExtent, cudaStream_t)
Copies memory between devices
Declaration
cudaError_t Memset3DAsync(cudaPitchedPtr devPtr, int value, cudaExtent extent, cudaStream_t stream)
Parameters
Returns
MemsetAsync(IntPtr, Int32, size_t, cudaStream_t)
Copies memory between devices
Declaration
cudaError_t MemsetAsync(IntPtr devPtr, int value, size_t count, cudaStream_t stream)
Parameters
Type |
Name |
Description |
System.IntPtr |
devPtr |
|
System.Int32 |
value |
|
size_t |
count |
|
cudaStream_t |
stream |
|
Returns
SetDevice(Int32)
Set device to be used for GPU executions.
Declaration
cudaError_t SetDevice(int device)
Parameters
Type |
Name |
Description |
System.Int32 |
device |
|
Returns
SetDeviceFlags(deviceFlags)
Sets flags to be used for device executions.
Declaration
cudaError_t SetDeviceFlags(deviceFlags flags)
Parameters
Returns
SetDoubleForDevice(ref Double)
Converts a double argument to be executed on a device.
Declaration
[Obsolete]
cudaError_t SetDoubleForDevice(ref double d)
Parameters
Type |
Name |
Description |
System.Double |
d |
|
Returns
SetDoubleForHost(ref Double)
Converts a double argument after execution on a device.
Declaration
[Obsolete]
cudaError_t SetDoubleForHost(ref double d)
Parameters
Type |
Name |
Description |
System.Double |
d |
|
Returns
SetupArgument(IntPtr, size_t, size_t)
Configure a device launch.
Declaration
[Obsolete]
cudaError_t SetupArgument(IntPtr arg, size_t size, size_t offset)
Parameters
Type |
Name |
Description |
System.IntPtr |
arg |
|
size_t |
size |
|
size_t |
offset |
|
Returns
SetValidDevices(Int32[])
Set a list of devices that can be used for CUDA
Declaration
cudaError_t SetValidDevices(int[] devs)
Parameters
Type |
Name |
Description |
System.Int32[] |
devs |
|
Returns
StreamAttachMemAsync(cudaStream_t, IntPtr, size_t, UInt32)
Attach memory to a stream asynchronously
Declaration
cudaError_t StreamAttachMemAsync(cudaStream_t stream, IntPtr devPtr, size_t length, uint flags)
Parameters
Type |
Name |
Description |
cudaStream_t |
stream |
|
System.IntPtr |
devPtr |
|
size_t |
length |
|
System.UInt32 |
flags |
|
Returns
StreamCreateWithFlags(out cudaStream_t, UInt32)
Create an asynchronous stream
Declaration
cudaError_t StreamCreateWithFlags(out cudaStream_t pStream, uint flags)
Parameters
Type |
Name |
Description |
cudaStream_t |
pStream |
|
System.UInt32 |
flags |
|
Returns
StreamCreateWithPriority(out cudaStream_t, UInt32, Int32)
Create an asynchronous stream with the specified priority
Declaration
cudaError_t StreamCreateWithPriority(out cudaStream_t pStream, uint flags, int priority)
Parameters
Type |
Name |
Description |
cudaStream_t |
pStream |
|
System.UInt32 |
flags |
|
System.Int32 |
priority |
|
Returns
StreamGetFlags(cudaStream_t, out UInt32)
Query the flags of a stream
Declaration
cudaError_t StreamGetFlags(cudaStream_t hStream, out uint flags)
Parameters
Type |
Name |
Description |
cudaStream_t |
hStream |
|
System.UInt32 |
flags |
|
Returns
StreamGetPriority(cudaStream_t, out Int32)
Query the priority of a stream
Declaration
cudaError_t StreamGetPriority(cudaStream_t hStream, out int priority)
Parameters
Type |
Name |
Description |
cudaStream_t |
hStream |
|
System.Int32 |
priority |
|
Returns
StreamQuery(cudaStream_t)
Queries an asynchronous stream for completion status
Declaration
cudaError_t StreamQuery(cudaStream_t stream)
Parameters
Returns
StreamWaitEvent(cudaStream_t, cudaEvent_t, UInt32)
Make a compute stream wait on an event
Declaration
cudaError_t StreamWaitEvent(cudaStream_t stream, cudaEvent_t evt, uint flags)
Parameters
Returns
ThreadExit()
Exit and clean up from CUDA launches
Declaration
[Obsolete]
cudaError_t ThreadExit()
Returns
ThreadGetLimit(out size_t, cudaLimit)
Returns the preferred cache configuration for the current device.
Declaration
[Obsolete]
cudaError_t ThreadGetLimit(out size_t value, cudaLimit limit)
Parameters
Returns
ThreadSetLimit(cudaLimit, size_t)
Declaration
[Obsolete]
cudaError_t ThreadSetLimit(cudaLimit limit, size_t value)
Parameters
Returns
ThreadSynchronize()
Wait for compute device to finish
Declaration
[Obsolete]
cudaError_t ThreadSynchronize()
Returns