Class CudaArray3D
A three dimensional CUDA array
Inheritance
Implements
Inherited Members
Namespace: ManagedCuda
Assembly: ManagedCuda.dll
Syntax
public class CudaArray3D : IDisposable
Constructors
| Improve this Doc View SourceCudaArray3D(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 CudaArray3D(CUarray cuArray)
Parameters
Type | Name | Description |
---|---|---|
CUarray | cuArray |
CudaArray3D(CUarray, Boolean)
Creates a new CUDA array from an existing CUarray. Array properties are obtained by cuArrayGetDescriptor
Declaration
public CudaArray3D(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 |
CudaArray3D(CUArrayFormat, SizeT, SizeT, SizeT, CudaArray3DNumChannels, CUDAArray3DFlags)
Creates a new CUDA array.
Declaration
public CudaArray3D(CUArrayFormat format, SizeT width, SizeT height, SizeT depth, CudaArray3DNumChannels numChannels, CUDAArray3DFlags flags)
Parameters
Type | Name | Description |
---|---|---|
CUArrayFormat | format | |
SizeT | width | In elements |
SizeT | height | In elements |
SizeT | depth | In elements |
CudaArray3DNumChannels | numChannels | |
CUDAArray3DFlags | flags |
Properties
| Improve this Doc View SourceArray3DDescriptor
Returns the wrapped CUDAArray3DDescriptor
Declaration
public CUDAArray3DDescriptor Array3DDescriptor { get; }
Property Value
Type | Description |
---|---|
CUDAArray3DDescriptor |
CUArray
Returns the wrapped CUarray
Declaration
public CUarray CUArray { get; }
Property Value
Type | Description |
---|---|
CUarray |
Depth
Returns the Depth of the array
Declaration
public SizeT Depth { get; }
Property Value
Type | Description |
---|---|
SizeT |
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(CUDAMemCpy3D)
A raw data copy method
Declaration
public void CopyData(CUDAMemCpy3D aCopyParameters)
Parameters
Type | Name | Description |
---|---|---|
CUDAMemCpy3D | aCopyParameters | 3D copy paramters |
CopyFromArrayToThis(CudaArray3D)
Copy array to array
Declaration
public void CopyFromArrayToThis(CudaArray3D aSourceArray)
Parameters
Type | Name | Description |
---|---|---|
CudaArray3D | aSourceArray |
CopyFromDeviceToThis(CUdeviceptr, SizeT)
Copy from a pitched device variable to this array
Declaration
public void CopyFromDeviceToThis(CUdeviceptr aDeviceVariable, SizeT aElementSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDeviceVariable | Source |
SizeT | aElementSizeInBytes |
CopyFromDeviceToThis(CUdeviceptr, SizeT, SizeT)
Copy from a pitched device variable to this array
Declaration
public void CopyFromDeviceToThis(CUdeviceptr aDeviceVariable, SizeT aElementSizeInBytes, SizeT pitch)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDeviceVariable | Source |
SizeT | aElementSizeInBytes | |
SizeT | pitch | Pitch in bytes |
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)
Parameters
Type | Name | Description |
---|---|---|
T[] | aHostSrc | Source |
Type Parameters
Name | Description |
---|---|
T | Host array base type |
CopyFromThisToArray(CudaArray3D)
Copy array to array
Declaration
public void CopyFromThisToArray(CudaArray3D aDestArray)
Parameters
Type | Name | Description |
---|---|---|
CudaArray3D | aDestArray |
CopyFromThisToDevice(CUdeviceptr, SizeT)
Copy from this array to a pitched device variable
Declaration
public void CopyFromThisToDevice(CUdeviceptr aDeviceVariable, SizeT aElementSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDeviceVariable | Destination |
SizeT | aElementSizeInBytes |
CopyFromThisToDevice(CUdeviceptr, SizeT, SizeT)
Copy from this array to a pitched device variable
Declaration
public void CopyFromThisToDevice(CUdeviceptr aDeviceVariable, SizeT aElementSizeInBytes, SizeT pitch)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | aDeviceVariable | Destination |
SizeT | aElementSizeInBytes | |
SizeT | pitch | Pitch in bytes |
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)
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()