Class CudaContext
An abstraction layer for the CUDA driver API
Implements
Inherited Members
Namespace: ManagedCuda
Assembly: ManagedCuda.dll
Syntax
public class CudaContext : IDisposable
Constructors
| Improve this Doc View SourceCudaContext()
Create a new instace of managed Cuda. Creates a new cuda context. Using device with ID 0 and SchedAuto
Declaration
public CudaContext()
CudaContext(CUdevice, IntPtr, CUCtxFlags, CudaContext.DirectXVersion)
Create a new instance of managed CUDA for a given Direct3DX-device.
Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.
Use GetDirectXDevices(IntPtr, CUd3dXDeviceList, CudaContext.DirectXVersion) to obtain a list of possible values for cudaDevice.
Declaration
public CudaContext(CUdevice cudaDevice, IntPtr aD3DDevice, CUCtxFlags flags, CudaContext.DirectXVersion dXVersion)
Parameters
Type | Name | Description |
---|---|---|
CUdevice | cudaDevice | CUdevice to map this context to. Use GetDirectXDevices(IntPtr, CUd3dXDeviceList, CudaContext.DirectXVersion) to obtain a list of possible values |
System.IntPtr | aD3DDevice | Direct3D device. |
CUCtxFlags | flags | Context creation flags |
CudaContext.DirectXVersion | dXVersion | DirectX (9, 10, 11) Version to bind this context to |
CudaContext(Boolean)
Create a new instace of managed Cuda.
If createNew
is true, a new cuda context will be created.
If createNew
is false, the CudaContext is bound to an existing cuda context. Creates a new context if no context exists.
Using device with ID 0 and SchedAuto
Declaration
public CudaContext(bool createNew)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | createNew |
CudaContext(Int32)
Create a new instace of managed Cuda. Creates a new cuda context. Using SchedAuto
Declaration
public CudaContext(int deviceId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | DeviceID |
CudaContext(Int32, CUCtxFlags)
Create a new instace of managed Cuda. Creates a new cuda context.
Declaration
public CudaContext(int deviceId, CUCtxFlags flags)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | DeviceID. |
CUCtxFlags | flags | Context creation flags. |
CudaContext(Int32, CUCtxFlags, Boolean)
Create a new instace of managed Cuda
Declaration
public CudaContext(int deviceId, CUCtxFlags flags, bool createNew)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | DeviceID. |
CUCtxFlags | flags | Context creation flags. |
System.Boolean | createNew | Create a new CUDA context or use an exiting context for the calling thread. Creates a new context if no context exists. |
CudaContext(Int32, Boolean)
Create a new instace of managed Cuda.
If createNew
is true, a new cuda context will be created.
If createNew
is false, the CudaContext bounds to an existing cuda context. Creates a new context if no context exists.
Declaration
public CudaContext(int deviceId, bool createNew)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | DeviceID |
System.Boolean | createNew |
CudaContext(IntPtr, CUCtxFlags, CudaContext.DirectXVersion)
Create a new instance of managed CUDA for a given Direct3DX-device.
Direct3D resources from this device may be registered and mapped through the lifetime of this CUDA context.
Declaration
public CudaContext(IntPtr aD3DDevice, CUCtxFlags flags, CudaContext.DirectXVersion dXVersion)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | aD3DDevice | Direct3D device |
CUCtxFlags | flags | Context creation flags |
CudaContext.DirectXVersion | dXVersion | DirectX Version to bind this context to (9, 10, 11) |
Fields
| Improve this Doc View Source_context
Declaration
protected CUcontext _context
Field Value
Type | Description |
---|---|
CUcontext |
_device
Declaration
protected CUdevice _device
Field Value
Type | Description |
---|---|
CUdevice |
_deviceID
Declaration
protected int _deviceID
Field Value
Type | Description |
---|---|
System.Int32 |
disposed
Declaration
protected bool disposed
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
| Improve this Doc View SourceContext
Gets the Cuda context bound to this managed Cuda object
Declaration
public CUcontext Context { get; }
Property Value
Type | Description |
---|---|
CUcontext |
Device
Gets the Cuda device allocated to the Cuda Context
Declaration
public CUdevice Device { get; }
Property Value
Type | Description |
---|---|
CUdevice |
DeviceId
Gets the Id of the Cuda device.
Declaration
public int DeviceId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Flags
Gets the Id of the Cuda device.
Declaration
public CUCtxFlags Flags { get; }
Property Value
Type | Description |
---|---|
CUCtxFlags |
IsContextOwner
Indicates if the CudaContext instance created the wrapped cuda context (return = true) or if the CudaContext instance was bound to an existing cuda context.
Declaration
public bool IsContextOwner { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View Source_ConvertSMVer2Cores(Int32, Int32)
GPU Architecture definitions
Declaration
protected static int _ConvertSMVer2Cores(int major, int minor)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | major | |
System.Int32 | minor |
Returns
Type | Description |
---|---|
System.Int32 |
AddZeroToArray(Byte[])
Make sure the kernel image arrays are zero terminated by appending a zero
Declaration
protected byte[] AddZeroToArray(byte[] image)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | image |
Returns
Type | Description |
---|---|
System.Byte[] |
AllocateMemory(SizeT)
Allocate memory on the device
Declaration
public CUdeviceptr AllocateMemory(SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
SizeT | aSizeInBytes |
Returns
Type | Description |
---|---|
CUdeviceptr |
ClearMemory(CUdeviceptr, Byte, SizeT)
SetMemory (cuMemsetD8)
Declaration
public void ClearMemory(CUdeviceptr aPtr, byte aValue, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.Byte | aValue | |
SizeT | aSizeInBytes |
ClearMemory(CUdeviceptr, Byte, SizeT, SizeT, SizeT)
SetMemory (cuMemset2DD8)
Declaration
public void ClearMemory(CUdeviceptr aPtr, byte aValue, SizeT aPitch, SizeT aWidth, SizeT aHeight)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.Byte | aValue | |
SizeT | aPitch | |
SizeT | aWidth | |
SizeT | aHeight |
ClearMemory(CUdeviceptr, UInt16, SizeT)
SetMemory (cuMemsetD16)
Declaration
public void ClearMemory(CUdeviceptr aPtr, ushort aValue, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt16 | aValue | |
SizeT | aSizeInBytes |
ClearMemory(CUdeviceptr, UInt16, SizeT, SizeT, SizeT)
SetMemory (cuMemset2DD16)
Declaration
public void ClearMemory(CUdeviceptr aPtr, ushort aValue, SizeT aPitch, SizeT aWidth, SizeT aHeight)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt16 | aValue | |
SizeT | aPitch | |
SizeT | aWidth | |
SizeT | aHeight |
ClearMemory(CUdeviceptr, UInt32, SizeT)
SetMemory (cuMemsetD32)
Declaration
public void ClearMemory(CUdeviceptr aPtr, uint aValue, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt32 | aValue | |
SizeT | aSizeInBytes |
ClearMemory(CUdeviceptr, UInt32, SizeT, SizeT, SizeT)
SetMemory (cuMemset2DD32)
Declaration
public void ClearMemory(CUdeviceptr aPtr, uint aValue, SizeT aPitch, SizeT aWidth, SizeT aHeight)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt32 | aValue | |
SizeT | aPitch | |
SizeT | aWidth | |
SizeT | aHeight |
ClearMemoryAsync(CUdeviceptr, Byte, SizeT, CUstream)
SetMemory (cuMemsetD8)
Declaration
public void ClearMemoryAsync(CUdeviceptr aPtr, byte aValue, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.Byte | aValue | |
SizeT | aSizeInBytes | |
CUstream | stream |
ClearMemoryAsync(CUdeviceptr, Byte, SizeT, SizeT, SizeT, CUstream)
SetMemory (cuMemset2DD8)
Declaration
public void ClearMemoryAsync(CUdeviceptr aPtr, byte aValue, SizeT aPitch, SizeT aWidth, SizeT aHeight, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.Byte | aValue | |
SizeT | aPitch | |
SizeT | aWidth | |
SizeT | aHeight | |
CUstream | stream |
ClearMemoryAsync(CUdeviceptr, UInt16, SizeT, CUstream)
SetMemory (cuMemsetD16)
Declaration
public void ClearMemoryAsync(CUdeviceptr aPtr, ushort aValue, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt16 | aValue | |
SizeT | aSizeInBytes | |
CUstream | stream |
ClearMemoryAsync(CUdeviceptr, UInt16, SizeT, SizeT, SizeT, CUstream)
SetMemory (cuMemset2DD16)
Declaration
public void ClearMemoryAsync(CUdeviceptr aPtr, ushort aValue, SizeT aPitch, SizeT aWidth, SizeT aHeight, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt16 | aValue | |
SizeT | aPitch | |
SizeT | aWidth | |
SizeT | aHeight | |
CUstream | stream |
ClearMemoryAsync(CUdeviceptr, UInt32, SizeT, CUstream)
SetMemory (cuMemsetD32)
Declaration
public void ClearMemoryAsync(CUdeviceptr aPtr, uint aValue, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt32 | aValue | |
SizeT | aSizeInBytes | |
CUstream | stream |
ClearMemoryAsync(CUdeviceptr, UInt32, SizeT, SizeT, SizeT, CUstream)
SetMemory (cuMemset2DD32)
Declaration
public void ClearMemoryAsync(CUdeviceptr aPtr, uint aValue, SizeT aPitch, SizeT aWidth, SizeT aHeight, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aPtr | |
System.UInt32 | aValue | |
SizeT | aPitch | |
SizeT | aWidth | |
SizeT | aHeight | |
CUstream | stream |
CopyToDevice(CUdeviceptr, char1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char1 | aSource | Source value |
CopyToDevice(CUdeviceptr, char1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, char2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char2 | aSource | Source value |
CopyToDevice(CUdeviceptr, char2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, char3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char3 | aSource | Source value |
CopyToDevice(CUdeviceptr, char3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, char4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char4 | aSource | Source value |
CopyToDevice(CUdeviceptr, char4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, char4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
char4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, cuDoubleComplex)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuDoubleComplex aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuDoubleComplex | aSource | Source value |
CopyToDevice(CUdeviceptr, cuDoubleComplex[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuDoubleComplex[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuDoubleComplex[] | aSource | Source array |
CopyToDevice(CUdeviceptr, cuDoubleReal)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuDoubleReal aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuDoubleReal | aSource | Source value |
CopyToDevice(CUdeviceptr, cuDoubleReal[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuDoubleReal[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuDoubleReal[] | aSource | Source array |
CopyToDevice(CUdeviceptr, cuFloatComplex)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuFloatComplex aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuFloatComplex | aSource | Source value |
CopyToDevice(CUdeviceptr, cuFloatComplex[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuFloatComplex[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuFloatComplex[] | aSource | Source array |
CopyToDevice(CUdeviceptr, cuFloatReal)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuFloatReal aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuFloatReal | aSource | Source value |
CopyToDevice(CUdeviceptr, cuFloatReal[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, cuFloatReal[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
cuFloatReal[] | aSource | Source array |
CopyToDevice(CUdeviceptr, dim3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, dim3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
dim3 | aSource | Source value |
CopyToDevice(CUdeviceptr, dim3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, dim3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
dim3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, double1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, double1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
double1 | aSource | Source value |
CopyToDevice(CUdeviceptr, double1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, double1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
double1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, double2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, double2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
double2 | aSource | Source value |
CopyToDevice(CUdeviceptr, double2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, double2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
double2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, float1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float1 | aSource | Source value |
CopyToDevice(CUdeviceptr, float1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, float2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float2 | aSource | Source value |
CopyToDevice(CUdeviceptr, float2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, float3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float3 | aSource | Source value |
CopyToDevice(CUdeviceptr, float3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, float4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float4 | aSource | Source value |
CopyToDevice(CUdeviceptr, float4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
float4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, int1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int1 | aSource | Source value |
CopyToDevice(CUdeviceptr, int1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, int2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int2 | aSource | Source value |
CopyToDevice(CUdeviceptr, int2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, int3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int3 | aSource | Source value |
CopyToDevice(CUdeviceptr, int3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, int4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int4 | aSource | Source value |
CopyToDevice(CUdeviceptr, int4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
int4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, long1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long1 | aSource | Source value |
CopyToDevice(CUdeviceptr, long1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, long2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long2 | aSource | Source value |
CopyToDevice(CUdeviceptr, long2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, long3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long3 | aSource | Source value |
CopyToDevice(CUdeviceptr, long3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, long4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long4 | aSource | Source value |
CopyToDevice(CUdeviceptr, long4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
long4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, short1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short1 | aSource | Source value |
CopyToDevice(CUdeviceptr, short1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, short2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short2 | aSource | Source value |
CopyToDevice(CUdeviceptr, short2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, short3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short3 | aSource | Source value |
CopyToDevice(CUdeviceptr, short3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, short4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short4 | aSource | Source value |
CopyToDevice(CUdeviceptr, short4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
short4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uchar1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar1 | aSource | Source value |
CopyToDevice(CUdeviceptr, uchar1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uchar2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar2 | aSource | Source value |
CopyToDevice(CUdeviceptr, uchar2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uchar3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar3 | aSource | Source value |
CopyToDevice(CUdeviceptr, uchar3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uchar4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar4 | aSource | Source value |
CopyToDevice(CUdeviceptr, uchar4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uchar4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uchar4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uint1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint1 | aSource | Source value |
CopyToDevice(CUdeviceptr, uint1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uint2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint2 | aSource | Source value |
CopyToDevice(CUdeviceptr, uint2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uint3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint3 | aSource | Source value |
CopyToDevice(CUdeviceptr, uint3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, uint4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint4 | aSource | Source value |
CopyToDevice(CUdeviceptr, uint4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
uint4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ulong1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong1 | aSource | Source value |
CopyToDevice(CUdeviceptr, ulong1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ulong2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong2 | aSource | Source value |
CopyToDevice(CUdeviceptr, ulong2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ulong3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong3 | aSource | Source value |
CopyToDevice(CUdeviceptr, ulong3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ulong4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong4 | aSource | Source value |
CopyToDevice(CUdeviceptr, ulong4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ulong4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ushort1)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort1 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort1 | aSource | Source value |
CopyToDevice(CUdeviceptr, ushort1[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort1[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort1[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ushort2)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort2 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort2 | aSource | Source value |
CopyToDevice(CUdeviceptr, ushort2[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort2[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort2[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ushort3)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort3 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort3 | aSource | Source value |
CopyToDevice(CUdeviceptr, ushort3[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort3[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort3[] | aSource | Source array |
CopyToDevice(CUdeviceptr, ushort4)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort4 aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort4 | aSource | Source value |
CopyToDevice(CUdeviceptr, ushort4[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort4[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
ushort4[] | aSource | Source array |
CopyToDevice(CUdeviceptr, Byte)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, byte aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Byte | aSource | Source value |
CopyToDevice(CUdeviceptr, Byte[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, byte[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Byte[] | aSource | Source array |
CopyToDevice(CUdeviceptr, Double)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, double aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Double | aSource | Source value |
CopyToDevice(CUdeviceptr, Double[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, double[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Double[] | aSource | Source array |
CopyToDevice(CUdeviceptr, Int16)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Int16 | aSource | Source value |
CopyToDevice(CUdeviceptr, Int16[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, short[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Int16[] | aSource | Source array |
CopyToDevice(CUdeviceptr, Int32)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Int32 | aSource | Source value |
CopyToDevice(CUdeviceptr, Int32[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, int[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Int32[] | aSource | Source array |
CopyToDevice(CUdeviceptr, Int64)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Int64 | aSource | Source value |
CopyToDevice(CUdeviceptr, Int64[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, long[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Int64[] | aSource | Source array |
CopyToDevice(CUdeviceptr, IntPtr, SizeT)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, IntPtr aSource, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.IntPtr | aSource | Source array |
SizeT | aSizeInBytes | Number of bytes to copy |
CopyToDevice(CUdeviceptr, SByte)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, sbyte aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.SByte | aSource | Source value |
CopyToDevice(CUdeviceptr, SByte[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, sbyte[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.SByte[] | aSource | Source array |
CopyToDevice(CUdeviceptr, Single)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Single | aSource | Source value |
CopyToDevice(CUdeviceptr, Single[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, float[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.Single[] | aSource | Source array |
CopyToDevice(CUdeviceptr, UInt16)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.UInt16 | aSource | Source value |
CopyToDevice(CUdeviceptr, UInt16[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ushort[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.UInt16[] | aSource | Source array |
CopyToDevice(CUdeviceptr, UInt32)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.UInt32 | aSource | Source value |
CopyToDevice(CUdeviceptr, UInt32[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, uint[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.UInt32[] | aSource | Source array |
CopyToDevice(CUdeviceptr, UInt64)
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.UInt64 | aSource | Source value |
CopyToDevice(CUdeviceptr, UInt64[])
Copy data from host to device memory
Declaration
public void CopyToDevice(CUdeviceptr aDest, ulong[] aSource)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
System.UInt64[] | aSource | Source array |
CopyToDevice<T>(CUdeviceptr, T)
Copy data from host to device memory
Declaration
public void CopyToDevice<T>(CUdeviceptr aDest, T aSource)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
T | aSource | Source pointer to host memory |
Type Parameters
Name | Description |
---|---|
T | T must be of value type, i.e. a struct |
CopyToDevice<T>(CUdeviceptr, T[])
Copy data from host to device memory
Declaration
public void CopyToDevice<T>(CUdeviceptr aDest, T[] aSource)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDest | Destination CUdeviceptr (Pointer to device memory) |
T[] | aSource | Source pointer to host memory |
Type Parameters
Name | Description |
---|---|
T | T must be of value type, i.e. a struct |
CopyToHost(char1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(char4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(char4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
char4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuDoubleComplex, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuDoubleComplex aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuDoubleComplex | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuDoubleComplex[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuDoubleComplex[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuDoubleComplex[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuDoubleReal, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuDoubleReal aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuDoubleReal | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuDoubleReal[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuDoubleReal[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuDoubleReal[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuFloatComplex, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuFloatComplex aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuFloatComplex | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuFloatComplex[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuFloatComplex[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuFloatComplex[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuFloatReal, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuFloatReal aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuFloatReal | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(cuFloatReal[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(cuFloatReal[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
cuFloatReal[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(dim3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(dim3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
dim3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(dim3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(dim3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
dim3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(double1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(double1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
double1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(double1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(double1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
double1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(double2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(double2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
double2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(double2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(double2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
double2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(float4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
float4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(int4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
int4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(long4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
long4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(short4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
short4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uchar4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uchar4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uchar4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(uint4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
uint4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ulong4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ulong4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort1, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort1 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort1 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort1[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort1[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort1[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort2, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort2 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort2 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort2[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort2[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort2[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort3, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort3 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort3 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort3[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort3[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort3[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort4, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort4 aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort4 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(ushort4[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort4[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
ushort4[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Byte, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(byte aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Byte[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(byte[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Double, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(double aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Double | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Double[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(double[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Int16, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Int16[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(short[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int16[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Int32, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Int32[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(int[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Int64, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Int64[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(long[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Int64[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(IntPtr, CUdeviceptr, UInt32)
Copy data from device to host memory
Declaration
public void CopyToHost(IntPtr aDest, CUdeviceptr aSource, uint aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | aDest | Destination pointer to host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
System.UInt32 | aSizeInBytes | Number of bytes to copy |
CopyToHost(SByte, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(sbyte aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.SByte | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(SByte[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(sbyte[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.SByte[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Single, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Single | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(Single[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(float[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(UInt16, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(UInt16[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ushort[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(UInt32, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(UInt32[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(uint[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(UInt64, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | aDest | Destination value in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost(UInt64[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost(ulong[] aDest, CUdeviceptr aSource)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64[] | aDest | Destination array in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
CopyToHost<T>(T, CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost<T>(T aDest, CUdeviceptr aSource)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | aDest | Destination data in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
Type Parameters
Name | Description |
---|---|
T | T must be of value type, i.e. a struct |
CopyToHost<T>(T[], CUdeviceptr)
Copy data from device to host memory
Declaration
public void CopyToHost<T>(T[] aDest, CUdeviceptr aSource)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | aDest | Destination data in host memory |
CUdeviceptr | aSource | Source CUdeviceptr (Pointer to device memory) |
Type Parameters
Name | Description |
---|---|
T | T must be of value type, i.e. a struct |
CreateOpenGLContext(Int32, CUCtxFlags)
As the normal context constructor has the same arguments, the OpenGL-constructor is private with inverse arguement order. It has to be called from a static method. Create a new instance of managed CUDA for a OpenGL-device.
OpenGL resources from this device may be registered and mapped through the lifetime of this CUDA context.
Declaration
public static CudaContext CreateOpenGLContext(int deviceId, CUCtxFlags flags)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | CUdevice to map this context to. |
CUCtxFlags | flags | Context creation flags |
Returns
Type | Description |
---|---|
CudaContext |
DeviceCanAccessPeer(CudaContext)
Queries if a device may directly access a peer device's memory
Declaration
public bool DeviceCanAccessPeer(CudaContext peerContext)
Parameters
Type | Name | Description |
---|---|---|
CudaContext | peerContext |
Returns
Type | Description |
---|---|
System.Boolean |
DisablePeerAccess(CudaContext)
Disables direct access to memory allocations in a peer context and unregisters any registered allocations.
Declaration
public static void DisablePeerAccess(CudaContext peerContext)
Parameters
Type | Name | Description |
---|---|---|
CudaContext | peerContext | Peer context to disable direct access to |
Dispose()
Dispose
Declaration
public void Dispose()
Dispose(Boolean)
For IDisposable.
Note: If this instance created the wrapped CUcontext, it will be destroyed and can't be accessed by other threads anymore.
If this instance only was bound to an existing CUcontext, the wrapped CUcontext won't be destroyed.
Declaration
protected virtual void Dispose(bool fDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fDisposing |
EnablePeerAccess(CudaContext)
If both the current context (current to the calling thread) and peerContext
are on devices which support unified
addressing (as may be queried using GetDeviceInfo), then
on success all allocations from peerContext
will immediately be accessible
by the current context. See \ref CUDA_UNIFIED for additional
details.
Note that access granted by this call is unidirectional and that in order to access
memory from the current context in peerContext
, a separate symmetric call
to ::cuCtxEnablePeerAccess() is required.
Returns ErrorInvalidDevice if DeviceCanAccessPeer(CudaContext) indicates
that the CUdevice of the current context cannot directly access memory
from the CUdevice of peerContext
.
Throws ErrorPeerAccessAlreadyEnabled if direct access of
peerContext
from the current context has already been enabled.
Throws ErrorInvalidContext if there is no current context, peerContext
is not a valid context, or if the current context is peerContext
.
Declaration
public static void EnablePeerAccess(CudaContext peerContext)
Parameters
Type | Name | Description |
---|---|---|
CudaContext | peerContext | Peer context to enable direct access to from the current context |
Finalize()
For dispose
Declaration
protected void Finalize()
FreeMemory(CUdeviceptr)
Free device memory
Declaration
public void FreeMemory(CUdeviceptr dBuffer)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | dBuffer |
GetAPIVersionOfCurrentContext()
Gets the context's API version
Declaration
public Version GetAPIVersionOfCurrentContext()
Returns
Type | Description |
---|---|
System.Version | Version |
GetCacheConfig()
On devices where the L1 cache and shared memory use the same hardware resources, this returns the preferred cache configuration for the current context. This is only a preference. The driver will use the requested configuration if possible, but it is free to choose a different configuration if required to execute functions.
This will return PreferNone on devices where the size of the L1 cache and shared memory are fixed.
Declaration
public CUFuncCache GetCacheConfig()
Returns
Type | Description |
---|---|
CUFuncCache |
GetCUdevice(Int32)
Gets the CUdevice for a given device ordinal number
Declaration
public static CUdevice GetCUdevice(int deviceId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId |
Returns
Type | Description |
---|---|
CUdevice |
GetDeviceComputeCapability()
Returns the device's compute capability of the device bound to the actual context
Declaration
public Version GetDeviceComputeCapability()
Returns
Type | Description |
---|---|
System.Version | Device compute capability |
GetDeviceComputeCapability(Int32)
Returns the device's compute capability of the device with ID deviceID
Declaration
public static Version GetDeviceComputeCapability(int deviceID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceID |
Returns
Type | Description |
---|---|
System.Version | Device compute capability |
GetDeviceCount()
Get the number of CUDA capable devices
Declaration
public static int GetDeviceCount()
Returns
Type | Description |
---|---|
System.Int32 |
GetDeviceInfo()
Retrieve device properties
Declaration
public CudaDeviceProperties GetDeviceInfo()
Returns
Type | Description |
---|---|
CudaDeviceProperties | DeviceProperties |
GetDeviceInfo(CUdevice)
Fills the CudaDeviceProperties structure
Declaration
protected static CudaDeviceProperties GetDeviceInfo(CUdevice device)
Parameters
Type | Name | Description |
---|---|---|
CUdevice | device |
Returns
Type | Description |
---|---|
CudaDeviceProperties |
GetDeviceInfo(Int32)
Retrieve device properties
Declaration
public static CudaDeviceProperties GetDeviceInfo(int deviceId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceId | Device ID |
Returns
Type | Description |
---|---|
CudaDeviceProperties | DeviceProperties |
GetDeviceName()
Returns the device name of the device bound to the actual context
Declaration
public string GetDeviceName()
Returns
Type | Description |
---|---|
System.String | Device Name |
GetDeviceName(Int32)
Returns the device name of the device with ID deviceID
Declaration
public static string GetDeviceName(int deviceID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | deviceID |
Returns
Type | Description |
---|---|
System.String | Device Name |
GetDirect3DDevice(CudaContext.DirectXVersion)
Returns the Direct3D device against which the CUDA context, bound to the calling thread, was created.
Declaration
public static IntPtr GetDirect3DDevice(CudaContext.DirectXVersion dXVersion)
Parameters
Type | Name | Description |
---|---|---|
CudaContext.DirectXVersion | dXVersion |
Returns
Type | Description |
---|---|
System.IntPtr |
GetDirectXDevices(IntPtr, CUd3dXDeviceList, CudaContext.DirectXVersion)
Returns a list of possible CUDA devices to use for a given DirectX device
Declaration
public static CUdevice[] GetDirectXDevices(IntPtr pD3DXDevice, CUd3dXDeviceList deviceList, CudaContext.DirectXVersion dXVersion)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | pD3DXDevice | DirectX device |
CUd3dXDeviceList | deviceList | SLI parameter |
CudaContext.DirectXVersion | dXVersion | DirectX version of the directX device |
Returns
Type | Description |
---|---|
CUdevice[] |
GetDriverVersion()
Returns the version number of the installed cuda driver
Declaration
public static Version GetDriverVersion()
Returns
Type | Description |
---|---|
System.Version | CUDA driver version |
GetFreeDeviceMemorySize()
Returns the free available device memory in bytes
Declaration
public SizeT GetFreeDeviceMemorySize()
Returns
Type | Description |
---|---|
SizeT |
GetLimit(CULimit)
Returns the current size of limit. See CULimit
Declaration
public SizeT GetLimit(CULimit limit)
Parameters
Type | Name | Description |
---|---|---|
CULimit | limit | Limit to query |
Returns
Type | Description |
---|---|
SizeT | Returned size in bytes of limit |
GetMaxGflopsDevice()
returns the best GPU (with maximum GFLOPS)
Declaration
public static CUdevice GetMaxGflopsDevice()
Returns
Type | Description |
---|---|
CUdevice | best GPU |
GetMaxGflopsDeviceId()
returns the best GPU (with maximum GFLOPS).
Declaration
public static int GetMaxGflopsDeviceId()
Returns
Type | Description |
---|---|
System.Int32 | Id of the best GPU |
GetOpenGLDevices(CUGLDeviceList)
Gets the CUDA devices associated with the current OpenGL context
Declaration
public static CUdevice[] GetOpenGLDevices(CUGLDeviceList deviceList)
Parameters
Type | Name | Description |
---|---|---|
CUGLDeviceList | deviceList | SLI parameter |
Returns
Type | Description |
---|---|
CUdevice[] |
GetSharedMemConfig()
Returns the current shared memory configuration for the current context.
Declaration
public CUsharedconfig GetSharedMemConfig()
Returns
Type | Description |
---|---|
CUsharedconfig |
GetStreamPriorityRange(ref Int32, ref Int32)
Returns numerical values that correspond to the least and greatest stream priorities.
Returns in leastPriority
and greatestPriority
the numerical values that correspond
to the least and greatest stream priorities respectively. Stream priorities
follow a convention where lower numbers imply greater priorities. The range of
meaningful stream priorities is given by [greatestPriority
, leastPriority
].
If the user attempts to create a stream with a priority value that is
outside the meaningful range as specified by this API, the priority is
automatically clamped down or up to either leastPriority
or greatestPriority
respectively. See ::cuStreamCreateWithPriority for details on creating a
priority stream.
A NULL may be passed in for leastPriority
or greatestPriority
if the value
is not desired.
This function will return '0' in both leastPriority
and greatestPriority
if
the current context's device does not support stream priorities
(see ::cuDeviceGetAttribute).
Declaration
public void GetStreamPriorityRange(ref int leastPriority, ref int greatestPriority)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | leastPriority | Pointer to an int in which the numerical value for least stream priority is returned |
System.Int32 | greatestPriority | Pointer to an int in which the numerical value for greatest stream priority is returned |
GetTotalDeviceMemorySize()
Returns the total device memory in bytes
Declaration
public SizeT GetTotalDeviceMemorySize()
Returns
Type | Description |
---|---|
SizeT |
LoadKernel(String, String)
Load a CUBIN-module from file and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernel(string modulePath, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath | Path and name of the module file |
System.String | kernelName | The kernel name as defined in the *.cu file |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelFatBin(Byte[], String)
Load a FatBinary module from image as byte[] and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelFatBin(byte[] moduleImage, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage | Module image (fat binary) as byte[] |
System.String | kernelName | The kernel name as defined in the *.cu file |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelFatBin(Stream, String)
Load a FatBinary module from image as stream and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelFatBin(Stream moduleImage, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage | Module image (fat binary) as stream |
System.String | kernelName | The kernel name as defined in the *.cu file |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(Byte[], String)
Load a ptx module from image as byte[] and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(byte[] moduleImage, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage | Module image (cubin or PTX) as byte[] |
System.String | kernelName | The kernel name as defined in the *.cu file |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(Byte[], String, CUJITOption[], Object[])
Load a ptx module from image as byte[] and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(byte[] moduleImage, string kernelName, CUJITOption[] options, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage | Module image (cubin or PTX) as byte[] |
System.String | kernelName | The kernel name as defined in the *.cu file |
CUJITOption[] | options | JIT-compile options. Only if module image is a ptx module |
System.Object[] | values | JIT-compilt options values. Only if module image is a ptx module |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(Byte[], String, CudaJitOptionCollection)
Load a ptx module from image as byte[] and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(byte[] moduleImage, string kernelName, CudaJitOptionCollection options)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage | Module image (cubin or PTX) as byte[] |
System.String | kernelName | The kernel name as defined in the *.cu file |
CudaJitOptionCollection | options | Collection of linker and compiler options. Only if module image is a ptx module |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(Stream, String)
Load a ptx module from image as stream and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(Stream moduleImage, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage | Module image (cubin or PTX) as stream |
System.String | kernelName | The kernel name as defined in the *.cu file |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(Stream, String, CUJITOption[], Object[])
Load a ptx module from image as stream and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(Stream moduleImage, string kernelName, CUJITOption[] options, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage | Module image (cubin or PTX) as stream |
System.String | kernelName | The kernel name as defined in the *.cu file |
CUJITOption[] | options | JIT-compile options. Only if module image is a ptx module |
System.Object[] | values | JIT-compilt options values. Only if module image is a ptx module |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(Stream, String, CudaJitOptionCollection)
Load a ptx module from image as stream and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(Stream moduleImage, string kernelName, CudaJitOptionCollection options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage | Module image (cubin or PTX) as stream |
System.String | kernelName | The kernel name as defined in the *.cu file |
CudaJitOptionCollection | options | Collection of linker and compiler options. Only if module image is a ptx module |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(String, String)
Load a PTX module from file and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(string modulePath, string kernelName)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath | Path and name of the ptx-module file |
System.String | kernelName | The kernel name as defined in the *.cu file |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(String, String, CUJITOption[], Object[])
Load a PTX module from file and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(string modulePath, string kernelName, CUJITOption[] options, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath | Path and name of the ptx-module file |
System.String | kernelName | The kernel name as defined in the *.cu file |
CUJITOption[] | options | JIT-compile options. Only if module image is a ptx module |
System.Object[] | values | JIT-compile options values. Only if module image is a ptx module |
Returns
Type | Description |
---|---|
CudaKernel |
LoadKernelPTX(String, String, CudaJitOptionCollection)
Load a PTX module from file and return directly a wrapped CudaKernel
Declaration
public CudaKernel LoadKernelPTX(string modulePath, string kernelName, CudaJitOptionCollection options)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath | Path and name of the ptx-module file |
System.String | kernelName | The kernel name as defined in the *.cu file |
CudaJitOptionCollection | options | Collection of linker and compiler options. Only if module image is a ptx module |
Returns
Type | Description |
---|---|
CudaKernel |
LoadModule(String)
Load a CUBIN-module from file
Declaration
public CUmodule LoadModule(string modulePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath |
Returns
Type | Description |
---|---|
CUmodule |
LoadModuleFatBin(Byte[])
Load a FatBinary module from image as byte[]
Declaration
public CUmodule LoadModuleFatBin(byte[] moduleImage)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage |
Returns
Type | Description |
---|---|
CUmodule |
LoadModuleFatBin(Stream)
Load a FatBinary module from image as stream
Declaration
public CUmodule LoadModuleFatBin(Stream moduleImage)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(Byte[])
Load a ptx module from image as byte[]
Declaration
public CUmodule LoadModulePTX(byte[] moduleImage)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(Byte[], CUJITOption[], Object[])
Load a ptx module from image as byte[]
Declaration
public CUmodule LoadModulePTX(byte[] moduleImage, CUJITOption[] options, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage | |
CUJITOption[] | options | |
System.Object[] | values |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(Byte[], CudaJitOptionCollection)
Load a ptx module from image as byte[]
Declaration
public CUmodule LoadModulePTX(byte[] moduleImage, CudaJitOptionCollection options)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | moduleImage | |
CudaJitOptionCollection | options | Collection of linker and compiler options |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(Stream)
Load a ptx module from image as stream
Declaration
public CUmodule LoadModulePTX(Stream moduleImage)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(Stream, CUJITOption[], Object[])
Load a ptx module from image as stream
Declaration
public CUmodule LoadModulePTX(Stream moduleImage, CUJITOption[] options, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage | |
CUJITOption[] | options | |
System.Object[] | values |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(Stream, CudaJitOptionCollection)
Load a ptx module from image as stream
Declaration
public CUmodule LoadModulePTX(Stream moduleImage, CudaJitOptionCollection options)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | moduleImage | |
CudaJitOptionCollection | options | Collection of linker and compiler options |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(String)
Load a PTX module from file
Declaration
public CUmodule LoadModulePTX(string modulePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(String, CUJITOption[], Object[])
Load a PTX module from file
Declaration
public CUmodule LoadModulePTX(string modulePath, CUJITOption[] options, object[] values)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath | |
CUJITOption[] | options | |
System.Object[] | values |
Returns
Type | Description |
---|---|
CUmodule |
LoadModulePTX(String, CudaJitOptionCollection)
Load a PTX module from file
Declaration
public CUmodule LoadModulePTX(string modulePath, CudaJitOptionCollection options)
Parameters
Type | Name | Description |
---|---|---|
System.String | modulePath | |
CudaJitOptionCollection | options | Collection of linker and compiler options |
Returns
Type | Description |
---|---|
CUmodule |
PopContext()
Pop the CUDA context
Declaration
public void PopContext()
ProfilerInitialize(String, String, CUoutputMode)
Initialize the profiling.
Using this API user can initialize the CUDA profiler by specifying
the configuration file, output file and output file format. This
API is generally used to profile different set of counters by
looping the kernel launch. The configFile
parameter can be used
to select profiling options including profiler counters. Refer to
the "Compute Command Line Profiler User Guide" for supported
profiler options and counters.
Limitation: The CUDA profiler cannot be initialized with this API if another profiling tool is already active, as indicated by the exception ErrorProfilerDisabled.
Declaration
public static void ProfilerInitialize(string configFile, string outputFile, CUoutputMode outputMode)
Parameters
Type | Name | Description |
---|---|---|
System.String | configFile | Name of the config file that lists the counters/options for profiling. |
System.String | outputFile | Name of the outputFile where the profiling results will be stored. |
CUoutputMode | outputMode | outputMode |
ProfilerStart()
Enable profiling.
Enables profile collection by the active profiling tool for the current context. If profiling is already enabled, then cuProfilerStart() has no effect.
cuProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only on selective pieces of code.
Declaration
public static void ProfilerStart()
ProfilerStop()
Disables profile collection by the active profiling tool for the current context. If profiling is already disabled, then cuProfilerStop() has no effect.
cuProfilerStart and cuProfilerStop APIs are used to programmatically control the profiling granularity by allowing profiling to be done only on selective pieces of code.
Declaration
public static void ProfilerStop()
PushContext()
Push the CUDA context
Declaration
public void PushContext()
SetCacheConfig(CUFuncCache)
On devices where the L1 cache and shared memory use the same hardware
resources, this sets through cacheConfig
the preferred cache configuration for
the current context. This is only a preference. The driver will use
the requested configuration if possible, but it is free to choose a different
configuration if required to execute the function. Any function preference
set via SetCacheConfig(CUFuncCache) will be preferred over this context-wide
setting. Setting the context-wide cache configuration to
PreferNone will cause subsequent kernel launches to prefer
to not change the cache configuration unless required to launch the kernel.
This setting does nothing on devices where the size of the L1 cache and shared memory are fixed.
Launching a kernel with a different preference than the most recent preference setting may insert a device-side synchronization point.
Declaration
public void SetCacheConfig(CUFuncCache cacheConfig)
Parameters
Type | Name | Description |
---|---|---|
CUFuncCache | cacheConfig |
SetCurrent()
Binds this CUDA context to the calling CPU thread
Declaration
public void SetCurrent()
SetLimit(CULimit, SizeT)
Setting limit
to value
is a request by the application to update the current limit maintained by the context. The
driver is free to modify the requested value to meet h/w requirements (this could be clamping to minimum or maximum
values, rounding up to nearest element size, etc). The application can use GetLimit(CULimit) to find out exactly what
the limit has been set to.
Setting each CULimit has its own specific restrictions, so each is discussed here:
Value | Restriction |
---|---|
StackSize | StackSize controls the stack size of each GPU thread. This limit is only applicable to devices of compute capability 2.0 and higher. Attempting to set this limit on devices of compute capability less than 2.0 will result in the error ErrorUnsupportedLimit being returned. |
PrintfFIFOSize |
PrintfFIFOSize controls the size of the FIFO used by the printf() device system call. Setting
PrintfFIFOSize must be performed before loading any module that uses the printf() device
system call, otherwise ErrorInvalidValue will be returned. This limit is only applicable to
devices of compute capability 2.0 and higher. Attempting to set this limit on devices of compute capability less
than 2.0 will result in the error ErrorUnsupportedLimit being returned.
|
MallocHeapSize | MallocHeapSize controls the size in bytes of the heap used by the ::malloc() and ::free() device system calls. Setting MallocHeapSize must be performed before launching any kernel that uses the ::malloc() or ::free() device system calls, otherwise ErrorInvalidValue will be returned. This limit is only applicable to devices of compute capability 2.0 and higher. Attempting to set this limit on devices of compute capability less than 2.0 will result in the error ErrorUnsupportedLimit being returned. |
DevRuntimeSyncDepth | DevRuntimeSyncDepth controls the maximum nesting depth of a grid at which a thread can safely call ::cudaDeviceSynchronize(). Setting this limit must be performed before any launch of a kernel that uses the device runtime and calls ::cudaDeviceSynchronize() above the default sync depth, two levels of grids. Calls to ::cudaDeviceSynchronize() will fail with error code ::cudaErrorSyncDepthExceeded if the limitation is violated. This limit can be set smaller than the default or up the maximum launch depth of 24. When setting this limit, keep in mind that additional levels of sync depth require the driver to reserve large amounts of device memory which can no longer be used for user allocations. If these reservations of device memory fail, ::cuCtxSetLimit will return ErrorOutOfMemory, and the limit can be reset to a lower value. This limit is only applicable to devices of compute capability 3.5 and higher. Attempting to set this limit on devices of compute capability less than 3.5 will result in the error ErrorUnsupportedLimit being returned. |
DevRuntimePendingLaunchCount | DevRuntimePendingLaunchCount controls the maximum number of outstanding device runtime launches that can be made from the current context. A grid is outstanding from the point of launch up until the grid is known to have been completed. Device runtime launches which violate this limitation fail and return ::cudaErrorLaunchPendingCountExceeded when ::cudaGetLastError() is called after launch. If more pending launches than the default (2048 launches) are needed for a module using the device runtime, this limit can be increased. Keep in mind that being able to sustain additional pending launches will require the driver to reserve larger amounts of device memory upfront which can no longer be used for allocations. If these reservations fail, ::cuCtxSetLimit will return ErrorOutOfMemory, and the limit can be reset to a lower value. This limit is only applicable to devices of compute capability 3.5 and higher. Attempting to set this limit on devices of compute capability less than 3.5 will result in the error ErrorUnsupportedLimit being returned. |
Declaration
public void SetLimit(CULimit limit, SizeT value)
Parameters
Type | Name | Description |
---|---|---|
CULimit | limit | Limit to set |
SizeT | value | Size in bytes of limit |
SetSharedMemConfig(CUsharedconfig)
Sets the shared memory configuration for the current context.
On devices with configurable shared memory banks, this function will set the context's shared memory bank size which is used for subsequent kernel launches.
Changed the shared memory configuration between launches may insert a device side synchronization point between those launches.
Changing the shared memory bank size will not increase shared memory usage or affect occupancy of kernels, but may have major effects on performance. Larger bank sizes will allow for greater potential bandwidth to shared memory, but will change what kinds of accesses to shared memory will result in bank conflicts.
This function will do nothing on devices with fixed shared memory bank size.
The supported bank configurations are: - DefaultBankSize: set bank width to the default initial setting (currently, four bytes). - FourByteBankSize: set shared memory bank width to be natively four bytes. - EightByteBankSize: set shared memory bank width to be natively eight bytes.
Declaration
public void SetSharedMemConfig(CUsharedconfig config)
Parameters
Type | Name | Description |
---|---|---|
CUsharedconfig | config |
Synchronize()
Blocks until the device has completed all preceding requested tasks. Throws a CudaException if one of the preceding tasks failed. If the context was created with the SchedAuto flag, the CPU thread will block until the GPU context has finished its work.
Declaration
public void Synchronize()
UnloadKernel(CudaKernel)
unload kernel
Declaration
public void UnloadKernel(CudaKernel aKernel)
Parameters
Type | Name | Description |
---|---|---|
CudaKernel | aKernel |
UnloadModule(CUmodule)
unload module
Declaration
public void UnloadModule(CUmodule aModule)
Parameters
Type | Name | Description |
---|---|---|
CUmodule | aModule |