Class CUlaunchAttribute

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

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

Layout


 struct CUlaunchAttribute {
     CUlaunchAttributeID id;
     char pad[4];
     CUlaunchAttributeValue value;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ID
      The struct member offsets.
    • PAD

      public static final int PAD
      The struct member offsets.
    • VALUE

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

    • CUlaunchAttribute

      public CUlaunchAttribute(ByteBuffer container)
      Creates a CUlaunchAttribute 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<CUlaunchAttribute>
    • id

      public int id()
      Returns:
      the value of the id field.
    • pad

      public ByteBuffer pad()
      Returns:
      a ByteBuffer view of the pad field.
    • pad

      public byte pad(int index)
      Returns:
      the value at the specified index of the pad field.
    • value

      public CUlaunchAttributeValue value()
      Returns:
      a CUlaunchAttributeValue view of the value field.
    • id

      public CUlaunchAttribute id(int value)
      Sets the specified value to the id field.
    • pad

      public CUlaunchAttribute pad(ByteBuffer value)
      Copies the specified ByteBuffer to the pad field.
    • pad

      public CUlaunchAttribute pad(int index, byte value)
      Sets the specified value at the specified index of the pad field.
    • value

      Copies the specified CUlaunchAttributeValue to the value field.
    • value

      Passes the value field to the specified Consumer.
    • set

      public CUlaunchAttribute set(int id, ByteBuffer pad, CUlaunchAttributeValue value)
      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 CUlaunchAttribute malloc()
      Returns a new CUlaunchAttribute instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nid(long struct)
      Unsafe version of id().
    • npad

      public static ByteBuffer npad(long struct)
      Unsafe version of pad().
    • npad

      public static byte npad(long struct, int index)
      Unsafe version of pad.
    • nvalue

      public static CUlaunchAttributeValue nvalue(long struct)
      Unsafe version of value().
    • nid

      public static void nid(long struct, int value)
      Unsafe version of id.
    • npad

      public static void npad(long struct, ByteBuffer value)
      Unsafe version of pad.
    • npad

      public static void npad(long struct, int index, byte value)
      Unsafe version of pad.
    • nvalue

      public static void nvalue(long struct, CUlaunchAttributeValue value)
      Unsafe version of value.