Class CudaPageLockedHostMemory_float3
A variable located in page locked (pinned) host memory. Use this type of variabe for asynchronous memcpy.
Type: float3
Inheritance
Implements
Inherited Members
Namespace: ManagedCuda
Assembly: ManagedCuda.dll
Syntax
public class CudaPageLockedHostMemory_float3 : IDisposable, IEnumerable<float3>, IEnumerable
Constructors
| Improve this Doc View SourceCudaPageLockedHostMemory_float3(SizeT)
Creates a new CudaPageLockedHostMemory and allocates the memory on host. Using cuMemAllocHost
Declaration
public CudaPageLockedHostMemory_float3(SizeT size)
Parameters
Type | Name | Description |
---|---|---|
SizeT | size | In elements |
CudaPageLockedHostMemory_float3(SizeT, CUMemHostAllocFlags)
Creates a new CudaPageLockedHostMemory and allocates the memory on host. Using cuMemHostAlloc
Declaration
public CudaPageLockedHostMemory_float3(SizeT size, CUMemHostAllocFlags allocFlags)
Parameters
Type | Name | Description |
---|---|---|
SizeT | size | In elements |
CUMemHostAllocFlags | allocFlags |
CudaPageLockedHostMemory_float3(IntPtr, SizeT)
Creates a new CudaPageLockedHostMemory from an existing IntPtr. IntPtr must point to page locked memory! hostPointer won't be freed while disposing.
Declaration
public CudaPageLockedHostMemory_float3(IntPtr hostPointer, SizeT size)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | hostPointer | |
SizeT | size | In elements |
Properties
| Improve this Doc View SourceIsOwner
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 |
Item[SizeT]
Access array per element.
Declaration
public float3 this[SizeT index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
SizeT | index | index in elements |
Property Value
Type | Description |
---|---|
float3 |
PinnedHostPointer
Pointer to pinned host memory.
Declaration
public IntPtr PinnedHostPointer { get; }
Property Value
Type | Description |
---|---|
System.IntPtr |
Size
Size in elements
Declaration
public SizeT Size { get; }
Property Value
Type | Description |
---|---|
SizeT |
SizeInBytes
Size in bytes
Declaration
public SizeT SizeInBytes { get; }
Property Value
Type | Description |
---|---|
SizeT |
Methods
| Improve this Doc View SourceAsyncCopyFromArray1D(CUarray, CUstream)
Asynchron copy 1D Array to host
Declaration
public void AsyncCopyFromArray1D(CUarray deviceArray, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
CUstream | stream |
AsyncCopyFromArray1D(CUarray, CUstream, SizeT)
Asynchron copy 1D Array to host
Declaration
public void AsyncCopyFromArray1D(CUarray deviceArray, CUstream stream, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
CUstream | stream | |
SizeT | offset | bytes |
AsyncCopyFromArray1D(CudaArray1D, CUstream)
Asynchron copy 1D Array to host
Declaration
public void AsyncCopyFromArray1D(CudaArray1D array, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array | |
CUstream | stream |
AsyncCopyFromArray1D(CudaArray1D, CUstream, SizeT)
Asynchron copy 1D Array to host
Declaration
public void AsyncCopyFromArray1D(CudaArray1D array, CUstream stream, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array | |
CUstream | stream | |
SizeT | offset | bytes |
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, SizeT, SizeT, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CUdeviceptr devicePtr, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | Pointer to device memory |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
CUstream | stream |
AsyncCopyFromDevice(CudaDeviceVariable<float3>, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CudaDeviceVariable<float3> deviceVar, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | deviceVar | |
CUstream | stream |
AsyncCopyFromDevice(CudaDeviceVariable<float3>, SizeT, SizeT, SizeT, CUstream)
Asynchron copy device to host
Declaration
public void AsyncCopyFromDevice(CudaDeviceVariable<float3> deviceVar, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | deviceVar | |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
CUstream | stream |
AsyncCopyToArray1D(CUarray, CUstream)
Asynchron copy host to 1D Array
Declaration
public void AsyncCopyToArray1D(CUarray deviceArray, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
CUstream | stream |
AsyncCopyToArray1D(CUarray, CUstream, SizeT)
Asynchron copy host to 1D Array
Declaration
public void AsyncCopyToArray1D(CUarray deviceArray, CUstream stream, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
CUstream | stream | |
SizeT | offset | in bytes |
AsyncCopyToArray1D(CudaArray1D, CUstream)
Asynchron copy host to 1D Array
Declaration
public void AsyncCopyToArray1D(CudaArray1D array, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array | |
CUstream | stream |
AsyncCopyToArray1D(CudaArray1D, CUstream, SizeT)
Asynchron copy host to 1D Array
Declaration
public void AsyncCopyToArray1D(CudaArray1D array, CUstream stream, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array | |
CUstream | stream | |
SizeT | offset | in bytes |
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, SizeT, SizeT, CUstream)
Asynchron Copy host to device
Declaration
public void AsyncCopyToDevice(CUdeviceptr devicePtr, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | Pointer to device memory |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
CUstream | stream |
AsyncCopyToDevice(CudaDeviceVariable<float3>, CUstream)
Asynchron Copy host to device
Declaration
public void AsyncCopyToDevice(CudaDeviceVariable<float3> deviceVar, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | deviceVar | |
CUstream | stream |
AsyncCopyToDevice(CudaDeviceVariable<float3>, SizeT, SizeT, SizeT, CUstream)
Asynchron Copy host to device
Declaration
public void AsyncCopyToDevice(CudaDeviceVariable<float3> deviceVar, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes, CUstream stream)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | deviceVar | |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
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 |
SynchronCopyFromArray1D(CUarray)
Synchron copy 1D Array to host
Declaration
public void SynchronCopyFromArray1D(CUarray deviceArray)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray |
SynchronCopyFromArray1D(CUarray, SizeT)
Synchron copy 1D Array to host
Declaration
public void SynchronCopyFromArray1D(CUarray deviceArray, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
SizeT | offset |
SynchronCopyFromArray1D(CudaArray1D)
Synchron copy 1D Array to host
Declaration
public void SynchronCopyFromArray1D(CudaArray1D array)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array |
SynchronCopyFromArray1D(CudaArray1D, SizeT)
Synchron copy 1D Array to host
Declaration
public void SynchronCopyFromArray1D(CudaArray1D array, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array | |
SizeT | offset |
SynchronCopyToArray1D(CUarray)
Synchron copy host to 1D Array
Declaration
public void SynchronCopyToArray1D(CUarray deviceArray)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray |
SynchronCopyToArray1D(CUarray, SizeT)
Synchron copy host to 1D Array
Declaration
public void SynchronCopyToArray1D(CUarray deviceArray, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CUarray | deviceArray | |
SizeT | offset |
SynchronCopyToArray1D(CudaArray1D)
Synchron copy host to 1D Array
Declaration
public void SynchronCopyToArray1D(CudaArray1D array)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array |
SynchronCopyToArray1D(CudaArray1D, SizeT)
Synchron copy host to 1D Array
Declaration
public void SynchronCopyToArray1D(CudaArray1D array, SizeT offset)
Parameters
Type | Name | Description |
---|---|---|
CudaArray1D | array | |
SizeT | offset |
SynchronCopyToDevice(CUdeviceptr)
Synchron copy host to device
Declaration
public void SynchronCopyToDevice(CUdeviceptr devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr |
SynchronCopyToDevice(CUdeviceptr, SizeT, SizeT, SizeT)
Synchron copy host to device
Declaration
public void SynchronCopyToDevice(CUdeviceptr devicePtr, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | Pointer to device memory |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
SynchronCopyToDevice(CudaDeviceVariable<float3>)
Synchron copy host to device
Declaration
public void SynchronCopyToDevice(CudaDeviceVariable<float3> devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | devicePtr |
SynchronCopyToDevice(CudaDeviceVariable<float3>, SizeT, SizeT, SizeT)
Synchron copy host to device
Declaration
public void SynchronCopyToDevice(CudaDeviceVariable<float3> devicePtr, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | devicePtr | Pointer to device memory |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
SynchronCopyToHost(CUdeviceptr)
Synchron copy device to host
Declaration
public void SynchronCopyToHost(CUdeviceptr devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr |
SynchronCopyToHost(CUdeviceptr, SizeT, SizeT, SizeT)
Synchron copy device to host
Declaration
public void SynchronCopyToHost(CUdeviceptr devicePtr, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CUdeviceptr | devicePtr | Pointer to device memory |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
SynchronCopyToHost(CudaDeviceVariable<float3>)
Synchron copy device to host
Declaration
public void SynchronCopyToHost(CudaDeviceVariable<float3> devicePtr)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | devicePtr |
SynchronCopyToHost(CudaDeviceVariable<float3>, SizeT, SizeT, SizeT)
Synchron copy device to host
Declaration
public void SynchronCopyToHost(CudaDeviceVariable<float3> devicePtr, SizeT offsetSrc, SizeT offsetDest, SizeT aSizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
CudaDeviceVariable<float3> | devicePtr | Pointer to device memory |
SizeT | offsetSrc | Offset to source pointer in bytes |
SizeT | offsetDest | Offset to destination pointer in bytes |
SizeT | aSizeInBytes | Bytes to copy |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable<float3>.GetEnumerator()
Declaration
IEnumerator<float3> IEnumerable<float3>.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<float3> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |