Class CUmemAccessDesc

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

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

Layout


 struct CUmemAccessDesc {
     CUmemLocation location;
     CUmemAccess_flags flags;
 }
  • Field Details

    • SIZEOF

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

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

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

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

    • CUmemAccessDesc

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

      public CUmemLocation location()
      Returns:
      a CUmemLocation view of the location field.
    • flags

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

      public CUmemAccessDesc location(CUmemLocation value)
      Copies the specified CUmemLocation to the location field.
    • location

      public CUmemAccessDesc location(Consumer<CUmemLocation> consumer)
      Passes the location field to the specified Consumer.
    • flags

      public CUmemAccessDesc flags(int value)
      Sets the specified value to the flags field.
    • set

      public CUmemAccessDesc set(CUmemLocation location, int flags)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static CUmemLocation nlocation(long struct)
      Unsafe version of location().
    • nflags

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

      public static void nlocation(long struct, CUmemLocation value)
      Unsafe version of location.
    • nflags

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