Class CUDA_MEMCPY3D_PEER

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class CUDA_MEMCPY3D_PEER
    extends Struct
    implements NativeResource
    3D memory cross-context copy parameters.

    Member documentation

    • srcXInBytes – Source X in bytes
    • srcY – Source Y
    • srcZ – Source Z
    • srcLOD – Source LOD
    • srcMemoryType – Source memory type (host, device, array)
    • srcHost – Source host pointer
    • srcDevice – Source device pointer
    • srcArray – Source array reference
    • srcContext – Source context (ignored with srcMemoryType is ::CU_MEMORYTYPE_ARRAY)
    • srcPitch – Source pitch (ignored when src is array)
    • srcHeight – Source height (ignored when src is array; may be 0 if Depth==1)
    • dstXInBytes – Destination X in bytes
    • dstY – Destination Y
    • dstZ – Destination Z
    • dstLOD – Destination LOD
    • dstMemoryType – Destination memory type (host, device, array)
    • dstHost – Destination host pointer
    • dstDevice – Destination device pointer
    • dstArray – Destination array reference
    • dstContext – Destination context (ignored with dstMemoryType is ::CU_MEMORYTYPE_ARRAY)
    • dstPitch – Destination pitch (ignored when dst is array)
    • dstHeight – Destination height (ignored when dst is array; may be 0 if Depth==1)
    • WidthInBytes – Width of 3D memory copy in bytes
    • Height – Height of 3D memory copy
    • Depth – Depth of 3D memory copy

    Layout

    
     struct CUDA_MEMCPY3D_PEER {
         size_t srcXInBytes;
         size_t srcY;
         size_t srcZ;
         size_t srcLOD;
         CUmemorytype srcMemoryType;
         void const * srcHost;
         CUdeviceptr srcDevice;
         CUarray srcArray;
         CUcontext srcContext;
         size_t srcPitch;
         size_t srcHeight;
         size_t dstXInBytes;
         size_t dstY;
         size_t dstZ;
         size_t dstLOD;
         CUmemorytype dstMemoryType;
         void * dstHost;
         CUdeviceptr dstDevice;
         CUarray dstArray;
         CUcontext dstContext;
         size_t dstPitch;
         size_t dstHeight;
         size_t WidthInBytes;
         size_t Height;
         size_t Depth;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SRCXINBYTES, SRCY, SRCZ, SRCLOD, SRCMEMORYTYPE, SRCHOST, SRCDEVICE, SRCARRAY, SRCCONTEXT, SRCPITCH, SRCHEIGHT, DSTXINBYTES, DSTY, DSTZ, DSTLOD, DSTMEMORYTYPE, DSTHOST, DSTDEVICE, DSTARRAY, DSTCONTEXT, DSTPITCH, DSTHEIGHT, WIDTHINBYTES, HEIGHT, DEPTH

        The struct member offsets.
    • Constructor Detail

      • CUDA_MEMCPY3D_PEER

        public CUDA_MEMCPY3D_PEER​(java.nio.ByteBuffer container)
        Creates a CUDA_MEMCPY3D_PEER instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • srcXInBytes

        public long srcXInBytes()
        Returns the value of the srcXInBytes field.
      • srcY

        public long srcY()
        Returns the value of the srcY field.
      • srcZ

        public long srcZ()
        Returns the value of the srcZ field.
      • srcLOD

        public long srcLOD()
        Returns the value of the srcLOD field.
      • srcMemoryType

        public int srcMemoryType()
        Returns the value of the srcMemoryType field.
      • srcHost

        public java.nio.ByteBuffer srcHost​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the srcHost field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • srcDevice

        public long srcDevice()
        Returns the value of the srcDevice field.
      • srcArray

        public long srcArray()
        Returns the value of the srcArray field.
      • srcContext

        public long srcContext()
        Returns the value of the srcContext field.
      • srcPitch

        public long srcPitch()
        Returns the value of the srcPitch field.
      • srcHeight

        public long srcHeight()
        Returns the value of the srcHeight field.
      • dstXInBytes

        public long dstXInBytes()
        Returns the value of the dstXInBytes field.
      • dstY

        public long dstY()
        Returns the value of the dstY field.
      • dstZ

        public long dstZ()
        Returns the value of the dstZ field.
      • dstLOD

        public long dstLOD()
        Returns the value of the dstLOD field.
      • dstMemoryType

        public int dstMemoryType()
        Returns the value of the dstMemoryType field.
      • dstHost

        public java.nio.ByteBuffer dstHost​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the dstHost field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • dstDevice

        public long dstDevice()
        Returns the value of the dstDevice field.
      • dstArray

        public long dstArray()
        Returns the value of the dstArray field.
      • dstContext

        public long dstContext()
        Returns the value of the dstContext field.
      • dstPitch

        public long dstPitch()
        Returns the value of the dstPitch field.
      • dstHeight

        public long dstHeight()
        Returns the value of the dstHeight field.
      • WidthInBytes

        public long WidthInBytes()
        Returns the value of the WidthInBytes field.
      • Height

        public long Height()
        Returns the value of the Height field.
      • Depth

        public long Depth()
        Returns the value of the Depth field.
      • srcXInBytes

        public CUDA_MEMCPY3D_PEER srcXInBytes​(long value)
        Sets the specified value to the srcXInBytes field.
      • srcY

        public CUDA_MEMCPY3D_PEER srcY​(long value)
        Sets the specified value to the srcY field.
      • srcZ

        public CUDA_MEMCPY3D_PEER srcZ​(long value)
        Sets the specified value to the srcZ field.
      • srcLOD

        public CUDA_MEMCPY3D_PEER srcLOD​(long value)
        Sets the specified value to the srcLOD field.
      • srcMemoryType

        public CUDA_MEMCPY3D_PEER srcMemoryType​(int value)
        Sets the specified value to the srcMemoryType field.
      • srcHost

        public CUDA_MEMCPY3D_PEER srcHost​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the srcHost field.
      • srcDevice

        public CUDA_MEMCPY3D_PEER srcDevice​(long value)
        Sets the specified value to the srcDevice field.
      • srcArray

        public CUDA_MEMCPY3D_PEER srcArray​(long value)
        Sets the specified value to the srcArray field.
      • srcContext

        public CUDA_MEMCPY3D_PEER srcContext​(long value)
        Sets the specified value to the srcContext field.
      • srcPitch

        public CUDA_MEMCPY3D_PEER srcPitch​(long value)
        Sets the specified value to the srcPitch field.
      • srcHeight

        public CUDA_MEMCPY3D_PEER srcHeight​(long value)
        Sets the specified value to the srcHeight field.
      • dstXInBytes

        public CUDA_MEMCPY3D_PEER dstXInBytes​(long value)
        Sets the specified value to the dstXInBytes field.
      • dstY

        public CUDA_MEMCPY3D_PEER dstY​(long value)
        Sets the specified value to the dstY field.
      • dstZ

        public CUDA_MEMCPY3D_PEER dstZ​(long value)
        Sets the specified value to the dstZ field.
      • dstLOD

        public CUDA_MEMCPY3D_PEER dstLOD​(long value)
        Sets the specified value to the dstLOD field.
      • dstMemoryType

        public CUDA_MEMCPY3D_PEER dstMemoryType​(int value)
        Sets the specified value to the dstMemoryType field.
      • dstHost

        public CUDA_MEMCPY3D_PEER dstHost​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the dstHost field.
      • dstDevice

        public CUDA_MEMCPY3D_PEER dstDevice​(long value)
        Sets the specified value to the dstDevice field.
      • dstArray

        public CUDA_MEMCPY3D_PEER dstArray​(long value)
        Sets the specified value to the dstArray field.
      • dstContext

        public CUDA_MEMCPY3D_PEER dstContext​(long value)
        Sets the specified value to the dstContext field.
      • dstPitch

        public CUDA_MEMCPY3D_PEER dstPitch​(long value)
        Sets the specified value to the dstPitch field.
      • dstHeight

        public CUDA_MEMCPY3D_PEER dstHeight​(long value)
        Sets the specified value to the dstHeight field.
      • WidthInBytes

        public CUDA_MEMCPY3D_PEER WidthInBytes​(long value)
        Sets the specified value to the WidthInBytes field.
      • Height

        public CUDA_MEMCPY3D_PEER Height​(long value)
        Sets the specified value to the Height field.
      • Depth

        public CUDA_MEMCPY3D_PEER Depth​(long value)
        Sets the specified value to the Depth field.
      • set

        public CUDA_MEMCPY3D_PEER set​(long srcXInBytes,
                                      long srcY,
                                      long srcZ,
                                      long srcLOD,
                                      int srcMemoryType,
                                      java.nio.ByteBuffer srcHost,
                                      long srcDevice,
                                      long srcArray,
                                      long srcContext,
                                      long srcPitch,
                                      long srcHeight,
                                      long dstXInBytes,
                                      long dstY,
                                      long dstZ,
                                      long dstLOD,
                                      int dstMemoryType,
                                      java.nio.ByteBuffer dstHost,
                                      long dstDevice,
                                      long dstArray,
                                      long dstContext,
                                      long dstPitch,
                                      long dstHeight,
                                      long WidthInBytes,
                                      long Height,
                                      long Depth)
        Initializes this struct with the specified values.
      • malloc

        public static CUDA_MEMCPY3D_PEER malloc()
        Returns a new CUDA_MEMCPY3D_PEER instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static CUDA_MEMCPY3D_PEER calloc()
        Returns a new CUDA_MEMCPY3D_PEER instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static CUDA_MEMCPY3D_PEER create​(long address)
        Returns a new CUDA_MEMCPY3D_PEER instance for the specified memory address.
      • createSafe

        @Nullable
        public static CUDA_MEMCPY3D_PEER createSafe​(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static CUDA_MEMCPY3D_PEER.Buffer createSafe​(long address,
                                                           int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static CUDA_MEMCPY3D_PEER mallocStack()
        Returns a new CUDA_MEMCPY3D_PEER instance allocated on the thread-local MemoryStack.
      • callocStack

        public static CUDA_MEMCPY3D_PEER callocStack()
        Returns a new CUDA_MEMCPY3D_PEER instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static CUDA_MEMCPY3D_PEER mallocStack​(MemoryStack stack)
        Returns a new CUDA_MEMCPY3D_PEER instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static CUDA_MEMCPY3D_PEER callocStack​(MemoryStack stack)
        Returns a new CUDA_MEMCPY3D_PEER instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nsrcXInBytes

        public static long nsrcXInBytes​(long struct)
        Unsafe version of srcXInBytes().
      • nsrcY

        public static long nsrcY​(long struct)
        Unsafe version of srcY().
      • nsrcZ

        public static long nsrcZ​(long struct)
        Unsafe version of srcZ().
      • nsrcLOD

        public static long nsrcLOD​(long struct)
        Unsafe version of srcLOD().
      • nsrcMemoryType

        public static int nsrcMemoryType​(long struct)
        Unsafe version of srcMemoryType().
      • nsrcHost

        public static java.nio.ByteBuffer nsrcHost​(long struct,
                                                   int capacity)
        Unsafe version of srcHost.
      • nsrcDevice

        public static long nsrcDevice​(long struct)
        Unsafe version of srcDevice().
      • nsrcArray

        public static long nsrcArray​(long struct)
        Unsafe version of srcArray().
      • nsrcContext

        public static long nsrcContext​(long struct)
        Unsafe version of srcContext().
      • nsrcPitch

        public static long nsrcPitch​(long struct)
        Unsafe version of srcPitch().
      • nsrcHeight

        public static long nsrcHeight​(long struct)
        Unsafe version of srcHeight().
      • ndstXInBytes

        public static long ndstXInBytes​(long struct)
        Unsafe version of dstXInBytes().
      • ndstY

        public static long ndstY​(long struct)
        Unsafe version of dstY().
      • ndstZ

        public static long ndstZ​(long struct)
        Unsafe version of dstZ().
      • ndstLOD

        public static long ndstLOD​(long struct)
        Unsafe version of dstLOD().
      • ndstMemoryType

        public static int ndstMemoryType​(long struct)
        Unsafe version of dstMemoryType().
      • ndstHost

        public static java.nio.ByteBuffer ndstHost​(long struct,
                                                   int capacity)
        Unsafe version of dstHost.
      • ndstDevice

        public static long ndstDevice​(long struct)
        Unsafe version of dstDevice().
      • ndstArray

        public static long ndstArray​(long struct)
        Unsafe version of dstArray().
      • ndstContext

        public static long ndstContext​(long struct)
        Unsafe version of dstContext().
      • ndstPitch

        public static long ndstPitch​(long struct)
        Unsafe version of dstPitch().
      • ndstHeight

        public static long ndstHeight​(long struct)
        Unsafe version of dstHeight().
      • nWidthInBytes

        public static long nWidthInBytes​(long struct)
        Unsafe version of WidthInBytes().
      • nHeight

        public static long nHeight​(long struct)
        Unsafe version of Height().
      • nDepth

        public static long nDepth​(long struct)
        Unsafe version of Depth().
      • nsrcXInBytes

        public static void nsrcXInBytes​(long struct,
                                        long value)
        Unsafe version of srcXInBytes.
      • nsrcY

        public static void nsrcY​(long struct,
                                 long value)
        Unsafe version of srcY.
      • nsrcZ

        public static void nsrcZ​(long struct,
                                 long value)
        Unsafe version of srcZ.
      • nsrcLOD

        public static void nsrcLOD​(long struct,
                                   long value)
        Unsafe version of srcLOD.
      • nsrcMemoryType

        public static void nsrcMemoryType​(long struct,
                                          int value)
        Unsafe version of srcMemoryType.
      • nsrcHost

        public static void nsrcHost​(long struct,
                                    java.nio.ByteBuffer value)
        Unsafe version of srcHost.
      • nsrcDevice

        public static void nsrcDevice​(long struct,
                                      long value)
        Unsafe version of srcDevice.
      • nsrcArray

        public static void nsrcArray​(long struct,
                                     long value)
        Unsafe version of srcArray.
      • nsrcContext

        public static void nsrcContext​(long struct,
                                       long value)
        Unsafe version of srcContext.
      • nsrcPitch

        public static void nsrcPitch​(long struct,
                                     long value)
        Unsafe version of srcPitch.
      • nsrcHeight

        public static void nsrcHeight​(long struct,
                                      long value)
        Unsafe version of srcHeight.
      • ndstXInBytes

        public static void ndstXInBytes​(long struct,
                                        long value)
        Unsafe version of dstXInBytes.
      • ndstY

        public static void ndstY​(long struct,
                                 long value)
        Unsafe version of dstY.
      • ndstZ

        public static void ndstZ​(long struct,
                                 long value)
        Unsafe version of dstZ.
      • ndstLOD

        public static void ndstLOD​(long struct,
                                   long value)
        Unsafe version of dstLOD.
      • ndstMemoryType

        public static void ndstMemoryType​(long struct,
                                          int value)
        Unsafe version of dstMemoryType.
      • ndstHost

        public static void ndstHost​(long struct,
                                    java.nio.ByteBuffer value)
        Unsafe version of dstHost.
      • ndstDevice

        public static void ndstDevice​(long struct,
                                      long value)
        Unsafe version of dstDevice.
      • ndstArray

        public static void ndstArray​(long struct,
                                     long value)
        Unsafe version of dstArray.
      • ndstContext

        public static void ndstContext​(long struct,
                                       long value)
        Unsafe version of dstContext.
      • ndstPitch

        public static void ndstPitch​(long struct,
                                     long value)
        Unsafe version of dstPitch.
      • ndstHeight

        public static void ndstHeight​(long struct,
                                      long value)
        Unsafe version of dstHeight.
      • nWidthInBytes

        public static void nWidthInBytes​(long struct,
                                         long value)
        Unsafe version of WidthInBytes.
      • nHeight

        public static void nHeight​(long struct,
                                   long value)
        Unsafe version of Height.
      • nDepth

        public static void nDepth​(long struct,
                                  long value)
        Unsafe version of Depth.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array