Class CudaPageLockedHostMemory2D_ushort3
A variable located in page locked (pinned) host memory. Use this type of variabe for asynchronous memcpy.
Type: ushort3
Inheritance
Implements
Inherited Members
Namespace: ManagedCuda
Assembly: ManagedCuda.dll
Syntax
public class CudaPageLockedHostMemory2D_ushort3 : IDisposable, IEnumerable<ushort3>, IEnumerable
Constructors
| Improve this Doc View SourceCudaPageLockedHostMemory2D_ushort3(SizeT, SizeT)
Creates a new CudaPageLockedHostMemory2D_ushort3 and allocates the memory on host. Using cuMemHostAlloc without flags.
Pitch is assumed to be width * sizeof(ushort3). Using cuMemHostAlloc without flags.
Declaration
public CudaPageLockedHostMemory2D_ushort3(SizeT width, SizeT height)
Parameters
Type | Name | Description |
---|---|---|
SizeT | width | In elements |
SizeT | height | In elements |
CudaPageLockedHostMemory2D_ushort3(SizeT, SizeT, CUMemHostAllocFlags)
Creates a new CudaPageLockedHostMemory2D_ushort3 and allocates the memory on host. Using cuMemHostAlloc without flags.
Pitch is assumed to be width * sizeof(ushort3). Using cuMemHostAlloc.
Declaration
public CudaPageLockedHostMemory2D_ushort3(SizeT width, SizeT height, CUMemHostAllocFlags allocFlags)
Parameters
Type | Name | Description |
---|---|---|
SizeT | width | In elements |
SizeT | height | In elements |
CUMemHostAllocFlags | allocFlags |
CudaPageLockedHostMemory2D_ushort3(SizeT, SizeT, SizeT)
Creates a new CudaPageLockedHostMemory2D_ushort3 and allocates the memory on host. Using cuMemHostAlloc without flags.
Declaration
public CudaPageLockedHostMemory2D_ushort3(SizeT width, SizeT pitchInBytes, SizeT height)
Parameters
Type | Name | Description |
---|---|---|
SizeT | width | In elements |
SizeT | pitchInBytes | Width including alignment in bytes |
SizeT | height | In elements |
CudaPageLockedHostMemory2D_ushort3(SizeT, SizeT, SizeT, CUMemHostAllocFlags)
Creates a new CudaPageLockedHostMemory2D_ushort3 and allocates the memory on host. Using cuMemHostAlloc
Declaration
public CudaPageLockedHostMemory2D_ushort3(SizeT width, SizeT pitchInBytes, SizeT height, CUMemHostAllocFlags allocFlags)
Parameters
Type | Name | Description |
---|---|---|
SizeT | width | In elements |
SizeT | pitchInBytes | Width including alignment in bytes |
SizeT | height | In elements |
CUMemHostAllocFlags | allocFlags |
Properties
| Improve this Doc View SourceHeight
Height in elements
Declaration
public SizeT Height { get; }
Property Value
Type | Description |
---|---|
SizeT |
Item[SizeT, SizeT]
Access array per element.
Declaration
public ushort3 this[SizeT x, SizeT y] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
SizeT | x | X-index in elements |
SizeT | y | Y-index in elements |
Property Value
Type | Description |
---|---|
ushort3 |
PinnedHostPointer
Pointer to pinned host memory.
Declaration
public IntPtr PinnedHostPointer { get; }
Property Value
Type | Description |
---|---|
System.IntPtr |
Pitch
Pitch in bytes
Declaration
public SizeT Pitch { get; }
Property Value
Type | Description |
---|---|
SizeT |
SizeInBytes
Size in bytes
Declaration
public SizeT SizeInBytes { get; }
Property Value
Type | Description |
---|---|
SizeT |
TypeSize
Type size in bytes
Declaration
public SizeT TypeSize { get; }
Property Value
Type | Description |
---|---|
SizeT |
Width
Width in elements
Declaration
public SizeT Width { get; }
Property Value
Type | Description |
---|---|
SizeT |
Methods
| Improve this Doc View SourceAsyncCopyFromArray2D(CUarray, CUstream)
Asynchron copy 2D Array to host
Declaration
public void AsyncCopyFromArray2D(CUarray deviceArray, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
CUstream | stream |
AsyncCopyFromArray2D(CudaArray2D, CUstream)
Asynchron copy 2D Array to host
Declaration
public void AsyncCopyFromArray2D(CudaArray2D array, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaArray2D | array | |
CUstream | stream |
AsyncCopyFromDevice(CUdeviceptr, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CUdeviceptr devicePtr, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | |
CUstream | stream |
AsyncCopyFromDevice(CUdeviceptr, SizeT, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CUdeviceptr devicePtr, SizeT pitchDevice, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | |
SizeT | pitchDevice | |
CUstream | stream |
AsyncCopyFromDevice(CudaDeviceVariable<ushort3>, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CudaDeviceVariable<ushort3> devicePtr, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<ushort3> | devicePtr | |
CUstream | stream |
AsyncCopyFromDevice(CudaPitchedDeviceVariable<ushort3>, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CudaPitchedDeviceVariable<ushort3> deviceVar, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<ushort3> | deviceVar | |
CUstream | stream |
AsyncCopyToArray2D(CUarray, CUstream)
Asynchron copy host to 2D Array
Declaration
public void AsyncCopyToArray2D(CUarray deviceArray, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
CUstream | stream |
AsyncCopyToArray2D(CudaArray2D, CUstream)
Asynchron copy host to 2D Array
Declaration
public void AsyncCopyToArray2D(CudaArray2D array, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaArray2D | array | |
CUstream | stream |
AsyncCopyToDevice(CUdeviceptr, CUstream)
Asynchron Copy host to device
Declaration
public void AsyncCopyToDevice(CUdeviceptr devicePtr, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | |
CUstream | stream |
AsyncCopyToDevice(CUdeviceptr, SizeT, CUstream)
Asynchron Copy host to pitched device
Declaration
public void AsyncCopyToDevice(CUdeviceptr devicePtr, SizeT pitchDevice, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | |
SizeT | pitchDevice | |
CUstream | stream |
AsyncCopyToDevice(CudaDeviceVariable<ushort3>, CUstream)
Asynchron Copy host to device
Declaration
public void AsyncCopyToDevice(CudaDeviceVariable<ushort3> devicePtr, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<ushort3> | devicePtr | |
CUstream | stream |
AsyncCopyToDevice(CudaPitchedDeviceVariable<ushort3>, CUstream)
Asynchron Copy host to pitched device
Declaration
public void AsyncCopyToDevice(CudaPitchedDeviceVariable<ushort3> deviceVar, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<ushort3> | deviceVar | |
CUstream | stream |
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()
GetAllocFlags()
Passes back the flags that were specified when allocating the pinned host buffer
Declaration
public CUMemHostAllocFlags GetAllocFlags()
Returns
Type | Description |
---|---|
CUMemHostAllocFlags |
GetDevicePointer()
Returns the CUdeviceptr for pinned host memory mapped to device memory space. Only valid if context is created with flag MapHost
Declaration
public CUdeviceptr GetDevicePointer()
Returns
Type | Description |
---|---|
CUdeviceptr | Device Pointer |
SynchronCopyFromArray2D(CUarray)
Synchron copy 2D Array to host
Declaration
public void SynchronCopyFromArray2D(CUarray deviceArray)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray |
SynchronCopyFromArray2D(CudaArray2D)
Synchron copy 2D Array to host
Declaration
public void SynchronCopyFromArray2D(CudaArray2D array)
Parameters
Type | Name | Description |
---|---|---|
CudaArray2D | array |
SynchronCopyFromDevice(CUdeviceptr, SizeT)
Synchron copy device to host
Declaration
public void SynchronCopyFromDevice(CUdeviceptr devicePtr, SizeT pitchDevice)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | |
SizeT | pitchDevice |
SynchronCopyFromDevice(CudaPitchedDeviceVariable<ushort3>)
Synchron copy device to host
Declaration
public void SynchronCopyFromDevice(CudaPitchedDeviceVariable<ushort3> deviceVar)
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<ushort3> | deviceVar |
SynchronCopyToArray2D(CUarray)
Synchron copy host to 2D Array
Declaration
public void SynchronCopyToArray2D(CUarray deviceArray)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray |
SynchronCopyToArray2D(CudaArray2D)
Synchron copy host to 2D Array
Declaration
public void SynchronCopyToArray2D(CudaArray2D array)
Parameters
Type | Name | Description |
---|---|---|
CudaArray2D | array |
SynchronCopyToDevice(CUdeviceptr)
Synchron copy host to device
Declaration
public void SynchronCopyToDevice(CUdeviceptr devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr |
SynchronCopyToDevice(CUdeviceptr, SizeT)
Synchron Copy host to pitched device
Declaration
public void SynchronCopyToDevice(CUdeviceptr devicePtr, SizeT pitchDevice)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | |
SizeT | pitchDevice |
SynchronCopyToDevice(CudaDeviceVariable<ushort3>)
Synchron copy host to device
Declaration
public void SynchronCopyToDevice(CudaDeviceVariable<ushort3> devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<ushort3> | devicePtr |
SynchronCopyToDevice(CudaPitchedDeviceVariable<ushort3>)
Synchron Copy host to pitched device
Declaration
public void SynchronCopyToDevice(CudaPitchedDeviceVariable<ushort3> deviceVar)
Parameters
Type | Name | Description |
---|---|---|
CudaPitchedDeviceVariable<ushort3> | deviceVar |
SynchronCopyToHost(CUdeviceptr)
Synchron copy device to host
Declaration
public void SynchronCopyToHost(CUdeviceptr devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr |
SynchronCopyToHost(CudaDeviceVariable<ushort3>)
Synchron copy device to host
Declaration
public void SynchronCopyToHost(CudaDeviceVariable<ushort3> devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<ushort3> | devicePtr |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable<ushort3>.GetEnumerator()
Declaration
IEnumerator<ushort3> IEnumerable<ushort3>.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<ushort3> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |