Class CudaArray2D
A two dimensional CUDA array
Inheritance
Implements
Inherited Members
Namespace: ManagedCuda
Assembly: ManagedCuda.dll
Syntax
public class CudaArray2D : IDisposable
Constructors
| Improve this Doc View SourceCudaArray2D(CUarray)
Creates a new CUDA array from an existing CUarray. The CUarray won't be destroyed when disposing. Array properties are obtained by cuArrayGetDescriptor
Declaration
public CudaArray2D(CUarray cuArray)
Parameters
Type | Name | Description |
---|---|---|
CUarray | cuArray |
CudaArray2D(CUarray, Boolean)
Creates a new CUDA array from an existing CUarray. Array properties are obtained by cuArrayGetDescriptor
Declaration
public CudaArray2D(CUarray cuArray, bool isOwner)
Parameters
Type | Name | Description |
---|---|---|
CUarray | cuArray | |
System.Boolean | isOwner | The cuArray will be destroyed while disposing if the CudaArray is the owner |
CudaArray2D(CUArrayFormat, SizeT, SizeT, CudaArray2DNumChannels)
Creates a new CUDA array.
Declaration
public CudaArray2D(CUArrayFormat format, SizeT width, SizeT height, CudaArray2DNumChannels numChannels)
Parameters
Type | Name | Description |
---|---|---|
CUArrayFormat | format | |
SizeT | width | In elements |
SizeT | height | In elements |
CudaArray2DNumChannels | numChannels |
Properties
| Improve this Doc View SourceArrayDescriptor
Returns the wrapped CUDAArrayDescriptor
Declaration
public CUDAArrayDescriptor ArrayDescriptor { get; }
Property Value
Type | Description |
---|---|
CUDAArrayDescriptor |
CUArray
Returns the wrapped CUarray
Declaration
public CUarray CUArray { get; }
Property Value
Type | Description |
---|---|
CUarray |
Height
Returns the Height of the array
Declaration
public SizeT Height { get; }
Property Value
Type | Description |
---|---|
SizeT |
IsOwner
If the wrapper class instance is the owner of a CUDA handle, it will be destroyed while disposing.
Declaration
public bool IsOwner { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Width
Returns the array width in elements
Declaration
public SizeT Width { get; }
Property Value
Type | Description |
---|---|
SizeT |
WidthInBytes
Returns the array width in bytes
Declaration
public SizeT WidthInBytes { get; }
Property Value
Type | Description |
---|---|
SizeT |
Methods
| Improve this Doc View SourceCopyData(CUDAMemCpy2D)
A raw data copy method
Declaration
public void CopyData(CUDAMemCpy2D aCopyParameters)
Parameters
Type | Name | Description |
---|---|---|
CUDAMemCpy2D | aCopyParameters | 2D copy paramters |
CopyDataUnaligned(CUDAMemCpy2D)
A raw unaligned copy method
Declaration
public void CopyDataUnaligned(CUDAMemCpy2D aCopyParameters)
Parameters
Type | Name | Description |
---|---|---|
CUDAMemCpy2D | aCopyParameters |
CopyFromArrayToThis(CudaArray2D)
Copy array to array
Declaration
public void CopyFromArrayToThis(CudaArray2D aSourceArray)
Parameters
Type | Name | Description |
---|---|---|
CudaArray2D | aSourceArray |
CopyFromDeviceToThis<T>(CudaPitchedDeviceVariable<T>)
Copy from a pitched device variable to this array
Declaration
public void CopyFromDeviceToThis<T>(CudaPitchedDeviceVariable<T> aDeviceVariable)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<T> | aDeviceVariable | Source |
Type Parameters
Name | Description |
---|---|
T | device variable base type |
CopyFromHostToThis(IntPtr, SizeT)
Copy from Host to this array
Declaration
public void CopyFromHostToThis(IntPtr aHostSrc, SizeT aElementSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | aHostSrc | Source |
SizeT | aElementSizeInBytes |
CopyFromHostToThis<T>(T[])
Copy from Host to this array
Declaration
public void CopyFromHostToThis<T>(T[] aHostSrc)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | aHostSrc | Source |
Type Parameters
Name | Description |
---|---|
T | Host array base type |
CopyFromThisToArray(CudaArray2D)
Copy array to array
Declaration
public void CopyFromThisToArray(CudaArray2D aDestArray)
Parameters
Type | Name | Description |
---|---|---|
CudaArray2D | aDestArray |
CopyFromThisToDevice<T>(CudaPitchedDeviceVariable<T>)
Copy from this array to a pitched device variable
Declaration
public void CopyFromThisToDevice<T>(CudaPitchedDeviceVariable<T> aDeviceVariable)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<T> | aDeviceVariable | Destination |
Type Parameters
Name | Description |
---|---|
T | device variable base type |
CopyFromThisToHost(IntPtr, SizeT)
Copy data from this array to host
Declaration
public void CopyFromThisToHost(IntPtr aHostDest, SizeT aElementSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | aHostDest | IntPtr to destination in host memory |
SizeT | aElementSizeInBytes |
CopyFromThisToHost<T>(T[])
Copy data from this array to host
Declaration
public void CopyFromThisToHost<T>(T[] aHostDest)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T[] | aHostDest | Destination |
Type Parameters
Name | Description |
---|---|
T | Host array base type |
Dispose()
Dispose
Declaration
public void Dispose()
Dispose(Boolean)
For IDisposable
Declaration
protected virtual void Dispose(bool fDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fDisposing |
Finalize()
For dispose
Declaration
protected void Finalize()