Show / Hide Table of Contents

    Class CudaRegisteredHostMemory_short3

    A variable located in page locked (pinned) host memory. Use this type of variabe for asynchronous memcpy.

    cuMemHostRegister doesn't work with managed memory (e.g. normal C# arrays). But you can use cuMemHostRegister for natively allocated memory (Marshal.AllocHGlobal, or a native dll).

    Type: short3

    Inheritance
    System.Object
    CudaRegisteredHostMemory_short3
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ManagedCuda
    Assembly: ManagedCuda.dll
    Syntax
    public class CudaRegisteredHostMemory_short3 : IDisposable

    Constructors

    | Improve this Doc View Source

    CudaRegisteredHostMemory_short3(IntPtr, SizeT)

    Creates a new CudaRegisteredHostMemory_short3 from an existing IntPtr. IntPtr must be page size aligned (4KBytes)!

    Declaration
    public CudaRegisteredHostMemory_short3(IntPtr hostPointer, SizeT size)
    Parameters
    Type Name Description
    System.IntPtr hostPointer

    must be page size aligned (4KBytes)

    SizeT size

    In elements

    Properties

    | Improve this Doc View Source

    IsRegisterd

    Returns register status

    Declaration
    public bool IsRegisterd { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Item[SizeT]

    Access array per element.

    Declaration
    public short3 this[SizeT index] { get; set; }
    Parameters
    Type Name Description
    SizeT index

    index in elements

    Property Value
    Type Description
    short3
    | Improve this Doc View Source

    PinnedHostPointer

    Pointer to pinned host memory.

    Declaration
    public IntPtr PinnedHostPointer { get; }
    Property Value
    Type Description
    System.IntPtr
    | Improve this Doc View Source

    Size

    Size in elements

    Declaration
    public SizeT Size { get; }
    Property Value
    Type Description
    SizeT
    | Improve this Doc View Source

    SizeInBytes

    Size in bytes

    Declaration
    public SizeT SizeInBytes { get; }
    Property Value
    Type Description
    SizeT

    Methods

    | Improve this Doc View Source

    AsyncCopyFromArray1D(CUarray, CUstream)

    Asynchron copy 1D Array to host

    Declaration
    public void AsyncCopyFromArray1D(CUarray deviceArray, CUstream stream)
    Parameters
    Type Name Description
    CUarray deviceArray
    CUstream stream
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    AsyncCopyFromDevice(CUdeviceptr, CUstream)

    Asynchron copy device to host

    Declaration
    public void AsyncCopyFromDevice(CUdeviceptr devicePtr, CUstream stream)
    Parameters
    Type Name Description
    CUdeviceptr devicePtr
    CUstream stream
    | Improve this Doc View Source

    AsyncCopyFromDevice(CudaDeviceVariable<short3>, CUstream)

    Asynchron copy device to host

    Declaration
    public void AsyncCopyFromDevice(CudaDeviceVariable<short3> deviceVar, CUstream stream)
    Parameters
    Type Name Description
    CudaDeviceVariable<short3> deviceVar
    CUstream stream
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    AsyncCopyToDevice(CUdeviceptr, CUstream)

    Asynchron Copy host to device

    Declaration
    public void AsyncCopyToDevice(CUdeviceptr devicePtr, CUstream stream)
    Parameters
    Type Name Description
    CUdeviceptr devicePtr
    CUstream stream
    | Improve this Doc View Source

    AsyncCopyToDevice(CudaDeviceVariable<short3>, CUstream)

    Asynchron Copy host to device

    Declaration
    public void AsyncCopyToDevice(CudaDeviceVariable<short3> deviceVar, CUstream stream)
    Parameters
    Type Name Description
    CudaDeviceVariable<short3> deviceVar
    CUstream stream
    | Improve this Doc View Source

    Dispose()

    Dispose

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    For IDisposable

    Declaration
    protected virtual void Dispose(bool fDisposing)
    Parameters
    Type Name Description
    System.Boolean fDisposing
    | Improve this Doc View Source

    Finalize()

    For dispose

    Declaration
    protected void Finalize()
    | Improve this Doc View Source

    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

    | Improve this Doc View Source

    Register(CUMemHostRegisterFlags)

    Page-locks the memory range specified by p and bytesize and maps it for the device(s) as specified by Flags. This memory range also is added to the same tracking mechanism as ::cuMemHostAlloc to automatically accelerate calls to functions such as cuMemcpyHtoD_v2(CUdeviceptr, dim3[], SizeT). Since the memory can be accessed directly by the device, it can be read or written with much higher bandwidth than pageable memory that has not been registered. Page-locking excessive amounts of memory may degrade system performance, since it reduces the amount of memory available to the system for paging. As a result, this function is best used sparingly to register staging areas for data exchange between host and device.

    The pointer p and size bytesize must be aligned to the host page size (4 KB).

    The memory page-locked by this function must be unregistered with Unregister()

    Declaration
    public void Register(CUMemHostRegisterFlags flags)
    Parameters
    Type Name Description
    CUMemHostRegisterFlags flags
    | Improve this Doc View Source

    SynchronCopyFromArray1D(CUarray)

    Synchron copy 1D Array to host

    Declaration
    public void SynchronCopyFromArray1D(CUarray deviceArray)
    Parameters
    Type Name Description
    CUarray deviceArray
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    SynchronCopyFromArray1D(CudaArray1D)

    Synchron copy 1D Array to host

    Declaration
    public void SynchronCopyFromArray1D(CudaArray1D array)
    Parameters
    Type Name Description
    CudaArray1D array
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    SynchronCopyToArray1D(CUarray)

    Synchron copy host to 1D Array

    Declaration
    public void SynchronCopyToArray1D(CUarray deviceArray)
    Parameters
    Type Name Description
    CUarray deviceArray
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    SynchronCopyToArray1D(CudaArray1D)

    Synchron copy host to 1D Array

    Declaration
    public void SynchronCopyToArray1D(CudaArray1D array)
    Parameters
    Type Name Description
    CudaArray1D array
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    SynchronCopyToDevice(CUdeviceptr)

    Synchron copy host to device

    Declaration
    public void SynchronCopyToDevice(CUdeviceptr devicePtr)
    Parameters
    Type Name Description
    CUdeviceptr devicePtr
    | Improve this Doc View Source

    SynchronCopyToDevice(CudaDeviceVariable<short3>)

    Synchron copy host to device

    Declaration
    public void SynchronCopyToDevice(CudaDeviceVariable<short3> devicePtr)
    Parameters
    Type Name Description
    CudaDeviceVariable<short3> devicePtr
    | Improve this Doc View Source

    SynchronCopyToHost(CUdeviceptr)

    Synchron copy device to host

    Declaration
    public void SynchronCopyToHost(CUdeviceptr devicePtr)
    Parameters
    Type Name Description
    CUdeviceptr devicePtr
    | Improve this Doc View Source

    SynchronCopyToHost(CudaDeviceVariable<short3>)

    Synchron copy device to host

    Declaration
    public void SynchronCopyToHost(CudaDeviceVariable<short3> devicePtr)
    Parameters
    Type Name Description
    CudaDeviceVariable<short3> devicePtr
    | Improve this Doc View Source

    Unregister()

    Unmaps the memory range whose base address is specified by p, and makes it pageable again.

    The base address must be the same one specified to Register(CUMemHostRegisterFlags).

    Declaration
    public void Unregister()

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX