Class CUDA_MEMCPY_NODE_PARAMS

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

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

Layout


 struct CUDA_MEMCPY_NODE_PARAMS {
     int flags;
     int reserved;
     CUcontext copyCtx;
     CUDA_MEMCPY3D copyParams;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int FLAGS
      The struct member offsets.
    • RESERVED

      public static final int RESERVED
      The struct member offsets.
    • COPYCTX

      public static final int COPYCTX
      The struct member offsets.
    • COPYPARAMS

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

    • CUDA_MEMCPY_NODE_PARAMS

      public CUDA_MEMCPY_NODE_PARAMS(ByteBuffer container)
      Creates a CUDA_MEMCPY_NODE_PARAMS 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_MEMCPY_NODE_PARAMS>
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • reserved

      public int reserved()
      Returns:
      the value of the reserved field.
    • copyCtx

      public long copyCtx()
      Returns:
      the value of the copyCtx field.
    • copyParams

      public CUDA_MEMCPY3D copyParams()
      Returns:
      a CUDA_MEMCPY3D view of the copyParams field.
    • flags

      public CUDA_MEMCPY_NODE_PARAMS flags(int value)
      Sets the specified value to the flags field.
    • reserved

      public CUDA_MEMCPY_NODE_PARAMS reserved(int value)
      Sets the specified value to the reserved field.
    • copyCtx

      public CUDA_MEMCPY_NODE_PARAMS copyCtx(long value)
      Sets the specified value to the copyCtx field.
    • copyParams

      public CUDA_MEMCPY_NODE_PARAMS copyParams(CUDA_MEMCPY3D value)
      Copies the specified CUDA_MEMCPY3D to the copyParams field.
    • copyParams

      public CUDA_MEMCPY_NODE_PARAMS copyParams(Consumer<CUDA_MEMCPY3D> consumer)
      Passes the copyParams field to the specified Consumer.
    • set

      public CUDA_MEMCPY_NODE_PARAMS set(int flags, int reserved, long copyCtx, CUDA_MEMCPY3D copyParams)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

      public static CUDA_MEMCPY_NODE_PARAMS calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY_NODE_PARAMS 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_MEMCPY_NODE_PARAMS.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY_NODE_PARAMS.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static CUDA_MEMCPY_NODE_PARAMS.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_MEMCPY_NODE_PARAMS.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
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nreserved

      public static int nreserved(long struct)
      Unsafe version of reserved().
    • ncopyCtx

      public static long ncopyCtx(long struct)
      Unsafe version of copyCtx().
    • ncopyParams

      public static CUDA_MEMCPY3D ncopyParams(long struct)
      Unsafe version of copyParams().
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nreserved

      public static void nreserved(long struct, int value)
      Unsafe version of reserved.
    • ncopyCtx

      public static void ncopyCtx(long struct, long value)
      Unsafe version of copyCtx.
    • ncopyParams

      public static void ncopyParams(long struct, CUDA_MEMCPY3D value)
      Unsafe version of copyParams.
    • validate

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