Class CUgraphEdgeData

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

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

Layout


 struct CUgraphEdgeData {
     unsigned char from_port;
     unsigned char to_port;
     unsigned char type;
     unsigned char reserved[5];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int FROM_PORT
      The struct member offsets.
    • TO_PORT

      public static final int TO_PORT
      The struct member offsets.
    • TYPE

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

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

    • CUgraphEdgeData

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

      public byte from_port()
      Returns:
      the value of the from_port field.
    • to_port

      public byte to_port()
      Returns:
      the value of the to_port field.
    • type

      public byte type()
      Returns:
      the value of the type field.
    • from_port

      public CUgraphEdgeData from_port(byte value)
      Sets the specified value to the from_port field.
    • to_port

      public CUgraphEdgeData to_port(byte value)
      Sets the specified value to the to_port field.
    • type

      public CUgraphEdgeData type(byte value)
      Sets the specified value to the type field.
    • set

      public CUgraphEdgeData set(byte from_port, byte to_port, byte type)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static byte nfrom_port(long struct)
      Unsafe version of from_port().
    • nto_port

      public static byte nto_port(long struct)
      Unsafe version of to_port().
    • ntype

      public static byte ntype(long struct)
      Unsafe version of type().
    • nreserved

      public static ByteBuffer nreserved(long struct)
    • nreserved

      public static byte nreserved(long struct, int index)
    • nfrom_port

      public static void nfrom_port(long struct, byte value)
      Unsafe version of from_port.
    • nto_port

      public static void nto_port(long struct, byte value)
      Unsafe version of to_port.
    • ntype

      public static void ntype(long struct, byte value)
      Unsafe version of type.
    • nreserved

      public static void nreserved(long struct, ByteBuffer value)
    • nreserved

      public static void nreserved(long struct, int index, byte value)