Class CUDA_MEMCPY2D

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<CUDA_MEMCPY2D>
org.lwjgl.cuda.CUDA_MEMCPY2D
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class CUDA_MEMCPY2D extends org.lwjgl.system.Struct<CUDA_MEMCPY2D> implements org.lwjgl.system.NativeResource

Layout


 struct CUDA_MEMCPY2D {
     size_t srcXInBytes;
     size_t srcY;
     CUmemorytype srcMemoryType;
     void const * srcHost;
     CUdeviceptr srcDevice;
     CUarray srcArray;
     size_t srcPitch;
     size_t dstXInBytes;
     size_t dstY;
     CUmemorytype dstMemoryType;
     void * dstHost;
     CUdeviceptr dstDevice;
     CUarray dstArray;
     size_t dstPitch;
     size_t WidthInBytes;
     size_t Height;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • SRCXINBYTES

      public static final int SRCXINBYTES
      The struct member offsets.
    • SRCY

      public static final int SRCY
      The struct member offsets.
    • SRCMEMORYTYPE

      public static final int SRCMEMORYTYPE
      The struct member offsets.
    • SRCHOST

      public static final int SRCHOST
      The struct member offsets.
    • SRCDEVICE

      public static final int SRCDEVICE
      The struct member offsets.
    • SRCARRAY

      public static final int SRCARRAY
      The struct member offsets.
    • SRCPITCH

      public static final int SRCPITCH
      The struct member offsets.
    • DSTXINBYTES

      public static final int DSTXINBYTES
      The struct member offsets.
    • DSTY

      public static final int DSTY
      The struct member offsets.
    • DSTMEMORYTYPE

      public static final int DSTMEMORYTYPE
      The struct member offsets.
    • DSTHOST

      public static final int DSTHOST
      The struct member offsets.
    • DSTDEVICE

      public static final int DSTDEVICE
      The struct member offsets.
    • DSTARRAY

      public static final int DSTARRAY
      The struct member offsets.
    • DSTPITCH

      public static final int DSTPITCH
      The struct member offsets.
    • WIDTHINBYTES

      public static final int WIDTHINBYTES
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
  • Constructor Details

    • CUDA_MEMCPY2D

      public CUDA_MEMCPY2D(ByteBuffer container)
      Creates a CUDA_MEMCPY2D 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<CUDA_MEMCPY2D>
    • srcXInBytes

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public CUDA_MEMCPY2D srcY(long value)
      Sets the specified value to the srcY field.
    • srcMemoryType

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

      public CUDA_MEMCPY2D srcHost(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the srcHost field.
    • srcDevice

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

      public CUDA_MEMCPY2D srcArray(long value)
      Sets the specified value to the srcArray field.
    • srcPitch

      public CUDA_MEMCPY2D srcPitch(long value)
      Sets the specified value to the srcPitch field.
    • dstXInBytes

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

      public CUDA_MEMCPY2D dstY(long value)
      Sets the specified value to the dstY field.
    • dstMemoryType

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

      public CUDA_MEMCPY2D dstHost(@Nullable ByteBuffer value)
      Sets the address of the specified ByteBuffer to the dstHost field.
    • dstDevice

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

      public CUDA_MEMCPY2D dstArray(long value)
      Sets the specified value to the dstArray field.
    • dstPitch

      public CUDA_MEMCPY2D dstPitch(long value)
      Sets the specified value to the dstPitch field.
    • WidthInBytes

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

      public CUDA_MEMCPY2D Height(long value)
      Sets the specified value to the Height field.
    • set

      public CUDA_MEMCPY2D set(long srcXInBytes, long srcY, int srcMemoryType, @Nullable ByteBuffer srcHost, long srcDevice, long srcArray, long srcPitch, long dstXInBytes, long dstY, int dstMemoryType, @Nullable ByteBuffer dstHost, long dstDevice, long dstArray, long dstPitch, long WidthInBytes, long Height)
      Initializes this struct with the specified values.
    • set

      public CUDA_MEMCPY2D set(CUDA_MEMCPY2D src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

      public static CUDA_MEMCPY2D create()
      Returns a new CUDA_MEMCPY2D instance allocated with BufferUtils.
    • create

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

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

      public static CUDA_MEMCPY2D.Buffer malloc(int capacity)
      Returns a new CUDA_MEMCPY2D.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static CUDA_MEMCPY2D.Buffer calloc(int capacity)
      Returns a new CUDA_MEMCPY2D.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CUDA_MEMCPY2D.Buffer create(int capacity)
      Returns a new CUDA_MEMCPY2D.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static CUDA_MEMCPY2D.Buffer create(long address, int capacity)
      Create a CUDA_MEMCPY2D.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

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

      @Deprecated public static CUDA_MEMCPY2D mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_MEMCPY2D callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static CUDA_MEMCPY2D mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_MEMCPY2D callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static CUDA_MEMCPY2D.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_MEMCPY2D.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static CUDA_MEMCPY2D.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_MEMCPY2D.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static CUDA_MEMCPY2D malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY2D instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static CUDA_MEMCPY2D calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY2D instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static CUDA_MEMCPY2D.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY2D.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static CUDA_MEMCPY2D.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY2D.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      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().
    • nsrcMemoryType

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

      public static @Nullable 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().
    • nsrcPitch

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

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

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

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

      public static @Nullable 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().
    • ndstPitch

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

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

      public static long nHeight(long struct)
      Unsafe version of Height().
    • 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.
    • nsrcMemoryType

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

      public static void nsrcHost(long struct, @Nullable 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.
    • nsrcPitch

      public static void nsrcPitch(long struct, long value)
      Unsafe version of srcPitch.
    • 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.
    • ndstMemoryType

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

      public static void ndstHost(long struct, @Nullable 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.
    • ndstPitch

      public static void ndstPitch(long struct, long value)
      Unsafe version of dstPitch.
    • 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.