ILGPU  0.9.0
ILGPU.Runtime.Cuda.API.CudaAPIUnix Class Reference

Represents the Cuda-driver API for Unix. More...

Inheritance diagram for ILGPU.Runtime.Cuda.API.CudaAPIUnix:
ILGPU.Runtime.Cuda.API.CudaAPI

Public Member Functions

static CudaError cuOccupancyMaxPotentialBlockSize ([Out] out int minGridSize, [Out] out int blockSize, [In] IntPtr func, [In][MarshalAs(UnmanagedType.FunctionPtr)] ComputeDynamicMemorySizeForBlockSize blockSizeToDynamicSMemSize, [In] IntPtr dynamicSMemSize, [In] int blockSizeLimit)
 
 CudaAPIUnix ()
 Initializes a new driver API for Unix. More...
 
override CudaError GetDriverVersion (out CudaDriverVersion driverVersion)
 
override CudaError GetDevice (out int device, int ordinal)
 
override CudaError GetDeviceCount (out int count)
 
override CudaError GetTotalDeviceMemory (out IntPtr bytes, int device)
 
override CudaError GetDeviceComputeCapability (out int major, out int minor, int device)
 
override CudaError CreateContext (out IntPtr context, CudaAcceleratorFlags flags, int device)
 
override CudaError CreateContextD3D11 (out IntPtr context, out int device, CudaAcceleratorFlags flags, IntPtr d3dDevice)
 
override CudaError DestroyContext (IntPtr context)
 
override CudaError SetCurrentContext (IntPtr context)
 
override CudaError SynchronizeContext ()
 
override CudaError GetCacheConfig (out CudaCacheConfiguration config)
 
override CudaError SetCacheConfig (CudaCacheConfiguration config)
 
override CudaError GetSharedMemoryConfig (out CudaSharedMemoryConfiguration config)
 
override CudaError SetSharedMemoryConfig (CudaSharedMemoryConfiguration config)
 
override CudaError CanAccessPeer (out int canAccess, int device, int peerDevice)
 
override CudaError EnablePeerAccess (IntPtr peerContext, int flags)
 
override CudaError DisablePeerAccess (IntPtr peerContext)
 
override CudaError GetMemoryInfo (out IntPtr free, out IntPtr total)
 
override CudaError AllocateMemory (out IntPtr devicePtr, IntPtr bytesize)
 
override CudaError FreeMemory (IntPtr devicePtr)
 
override CudaError AllocateHostMemory (out IntPtr devicePtr, IntPtr bytesize)
 
override CudaError FreeHostMemory (IntPtr devicePtr)
 
override CudaError Memcpy (IntPtr destination, IntPtr source, IntPtr length)
 
override CudaError MemcpyHostToDevice (IntPtr destinationDevice, IntPtr sourceHost, IntPtr length, IntPtr stream)
 
override CudaError MemcpyDeviceToHost (IntPtr destinationHost, IntPtr sourceDevice, IntPtr length, IntPtr stream)
 
override CudaError MemcpyDeviceToDevice (IntPtr destinationDevice, IntPtr sourceDevice, IntPtr length, IntPtr stream)
 
override CudaError Memset (IntPtr destinationDevice, byte value, IntPtr length, IntPtr stream)
 
override CudaError DestroyStream (IntPtr stream)
 
override CudaError SynchronizeStream (IntPtr stream)
 Synchronizes with the given stream. More...
 
override CudaError LoadModule (out IntPtr module, string moduleData)
 
override CudaError LoadModule (out IntPtr kernelModule, string moduleData, int numOptions, IntPtr jitOptions, IntPtr jitOptionValues)
 
override CudaError DestroyModule (IntPtr module)
 
override CudaError GetModuleFunction (out IntPtr function, IntPtr module, string functionName)
 
override CudaError LaunchKernel (IntPtr function, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemSizeInBytes, IntPtr stream, IntPtr args, IntPtr kernelArgs)
 
override CudaError ComputeOccupancyMaxActiveBlocksPerMultiprocessor (out int numBlocks, IntPtr func, int blockSize, IntPtr dynamicSMemSize)
 
override CudaError ComputeOccupancyMaxPotentialBlockSize (out int minGridSize, out int blockSize, IntPtr func, ComputeDynamicMemorySizeForBlockSize blockSizeToDynamicSMemSize, IntPtr dynamicSMemSize, int blockSizeLimit)
 
- Public Member Functions inherited from ILGPU.Runtime.Cuda.API.CudaAPI
string GetErrorString (CudaError error)
 Resolves the error string for the given error status. More...
 
unsafe CudaError GetDeviceName (out string name, int device)
 Resolves the name of a device. More...
 
CudaError GetTotalDeviceMemory (out long bytes, int device)
 Resolves total device memory. More...
 
CudaError GetMemoryInfo (out long free, out long total)
 Resolves memory information. More...
 
CudaError MemcpyHostToDevice (IntPtr destinationDevice, IntPtr sourceHost, IntPtr length, AcceleratorStream stream)
 Performs a memory-copy operation from host to device memory. More...
 
CudaError MemcpyDeviceToHost (IntPtr destinationHost, IntPtr sourceDevice, IntPtr length, AcceleratorStream stream)
 Performs a memory-copy operation from device to host memory. More...
 
CudaError MemcpyDeviceToDevice (IntPtr destinationDevice, IntPtr sourceDevice, IntPtr length, AcceleratorStream stream)
 Performs a memory-copy operation from device to device memory. More...
 
CudaError Memset (IntPtr destinationDevice, byte value, IntPtr length, AcceleratorStream stream)
 Performs a memory-set operation. More...
 
unsafe CudaError LoadModule (out IntPtr kernelModule, string moduleData, out string errorLog)
 Loads the given kernel module into driver memory. More...
 
unsafe CudaError LaunchKernelWithStruct< T > (IntPtr kernelFunction, int gridDimX, int gridDimY, int gridDimZ, int blockDimX, int blockDimY, int blockDimZ, int sharedMemSizeInBytes, IntPtr stream, ref T argument, int argumentLength)
 Launches the given kernel function using a bulk structure. More...
 
CudaError ComputeOccupancyMaxPotentialBlockSize (out int minGridSize, out int blockSize, IntPtr func, ComputeManagedDynamicMemorySizeForBlockSize blockSizeToDynamicSMemSize, int dynamicSMemSize, int blockSizeLimit)
 Computes the maximum potential block size to for maximum occupancy. More...
 

Public Attributes

const string LibName = "cuda"
 Represents the driver library name. More...
 

Protected Member Functions

override CudaError InitAPI ()
 
override CudaError GetDeviceName (byte[] bytes, int length, int device)
 

Additional Inherited Members

- Properties inherited from ILGPU.Runtime.Cuda.API.CudaAPI
static CudaAPI Current [get]
 Returns the driver API for the current platform. More...
 

Detailed Description

Represents the Cuda-driver API for Unix.

Constructor & Destructor Documentation

ILGPU.Runtime.Cuda.API.CudaAPIUnix.CudaAPIUnix ( )

Initializes a new driver API for Unix.

Member Function Documentation

override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.AllocateHostMemory ( out IntPtr  devicePtr,
IntPtr  bytesize 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.AllocateMemory ( out IntPtr  devicePtr,
IntPtr  bytesize 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.CanAccessPeer ( out int  canAccess,
int  device,
int  peerDevice 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.ComputeOccupancyMaxActiveBlocksPerMultiprocessor ( out int  numBlocks,
IntPtr  func,
int  blockSize,
IntPtr  dynamicSMemSize 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.ComputeOccupancyMaxPotentialBlockSize ( out int  minGridSize,
out int  blockSize,
IntPtr  func,
ComputeDynamicMemorySizeForBlockSize  blockSizeToDynamicSMemSize,
IntPtr  dynamicSMemSize,
int  blockSizeLimit 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.CreateContext ( out IntPtr  context,
CudaAcceleratorFlags  flags,
int  device 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.CreateContextD3D11 ( out IntPtr  context,
out int  device,
CudaAcceleratorFlags  flags,
IntPtr  d3dDevice 
)
virtual
static CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.cuOccupancyMaxPotentialBlockSize ( [Out] out int  minGridSize,
[Out] out int  blockSize,
[In] IntPtr  func,
[MarshalAs(UnmanagedType.FunctionPtr)] ComputeDynamicMemorySizeForBlockSize  blockSizeToDynamicSMemSize,
[In] IntPtr  dynamicSMemSize,
[In] int  blockSizeLimit 
)
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.DestroyContext ( IntPtr  context)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.DestroyModule ( IntPtr  module)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.DestroyStream ( IntPtr  stream)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.DisablePeerAccess ( IntPtr  peerContext)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.EnablePeerAccess ( IntPtr  peerContext,
int  flags 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.FreeHostMemory ( IntPtr  devicePtr)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.FreeMemory ( IntPtr  devicePtr)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetCacheConfig ( out CudaCacheConfiguration  config)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetDevice ( out int  device,
int  ordinal 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetDeviceComputeCapability ( out int  major,
out int  minor,
int  device 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetDeviceCount ( out int  count)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetDeviceName ( byte[]  bytes,
int  length,
int  device 
)
protectedvirtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetDriverVersion ( out CudaDriverVersion  driverVersion)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetMemoryInfo ( out IntPtr  free,
out IntPtr  total 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetModuleFunction ( out IntPtr  function,
IntPtr  module,
string  functionName 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetSharedMemoryConfig ( out CudaSharedMemoryConfiguration  config)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.GetTotalDeviceMemory ( out IntPtr  bytes,
int  device 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.InitAPI ( )
protectedvirtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.LaunchKernel ( IntPtr  function,
int  gridDimX,
int  gridDimY,
int  gridDimZ,
int  blockDimX,
int  blockDimY,
int  blockDimZ,
int  sharedMemSizeInBytes,
IntPtr  stream,
IntPtr  args,
IntPtr  kernelArgs 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.LoadModule ( out IntPtr  module,
string  moduleData 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.LoadModule ( out IntPtr  kernelModule,
string  moduleData,
int  numOptions,
IntPtr  jitOptions,
IntPtr  jitOptionValues 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.Memcpy ( IntPtr  destination,
IntPtr  source,
IntPtr  length 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.MemcpyDeviceToDevice ( IntPtr  destinationDevice,
IntPtr  sourceDevice,
IntPtr  length,
IntPtr  stream 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.MemcpyDeviceToHost ( IntPtr  destinationHost,
IntPtr  sourceDevice,
IntPtr  length,
IntPtr  stream 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.MemcpyHostToDevice ( IntPtr  destinationDevice,
IntPtr  sourceHost,
IntPtr  length,
IntPtr  stream 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.Memset ( IntPtr  destinationDevice,
byte  value,
IntPtr  length,
IntPtr  stream 
)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.SetCacheConfig ( CudaCacheConfiguration  config)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.SetCurrentContext ( IntPtr  context)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.SetSharedMemoryConfig ( CudaSharedMemoryConfiguration  config)
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.SynchronizeContext ( )
virtual
override CudaError ILGPU.Runtime.Cuda.API.CudaAPIUnix.SynchronizeStream ( IntPtr  stream)
virtual

Synchronizes with the given stream.

Parameters
streamThe stream to synchronize with.
Returns
The error status.

Implements ILGPU.Runtime.Cuda.API.CudaAPI.

Member Data Documentation

const string ILGPU.Runtime.Cuda.API.CudaAPIUnix.LibName = "cuda"

Represents the driver library name.


The documentation for this class was generated from the following file: