Class CUmemPoolProps

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

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

Layout


 struct CUmemPoolProps {
     CUmemAllocationType allocType;
     CUmemAllocationHandleType handleTypes;
     CUmemLocation location;
     void * win32SecurityAttributes;
     unsigned char reserved[64];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ALLOCTYPE
      The struct member offsets.
    • HANDLETYPES

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

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

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

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

    • CUmemPoolProps

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

      public int allocType()
      Returns:
      the value of the allocType field.
    • handleTypes

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

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

      public long win32SecurityAttributes()
      Returns:
      the value of the win32SecurityAttributes field.
    • reserved

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

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

      public CUmemPoolProps allocType(int value)
      Sets the specified value to the allocType field.
    • handleTypes

      public CUmemPoolProps handleTypes(int value)
      Sets the specified value to the handleTypes field.
    • location

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

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

      public CUmemPoolProps win32SecurityAttributes(long value)
      Sets the specified value to the win32SecurityAttributes field.
    • reserved

      public CUmemPoolProps reserved(ByteBuffer value)
      Copies the specified ByteBuffer to the reserved field.
    • reserved

      public CUmemPoolProps reserved(int index, byte value)
      Sets the specified value at the specified index of the reserved field.
    • set

      public CUmemPoolProps set(int allocType, int handleTypes, CUmemLocation location, long win32SecurityAttributes, ByteBuffer reserved)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nallocType(long struct)
      Unsafe version of allocType().
    • nhandleTypes

      public static int nhandleTypes(long struct)
      Unsafe version of handleTypes().
    • nlocation

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

      public static long nwin32SecurityAttributes(long struct)
      Unsafe version of win32SecurityAttributes().
    • nreserved

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

      public static byte nreserved(long struct, int index)
      Unsafe version of reserved.
    • nallocType

      public static void nallocType(long struct, int value)
      Unsafe version of allocType.
    • nhandleTypes

      public static void nhandleTypes(long struct, int value)
      Unsafe version of handleTypes.
    • nlocation

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

      public static void nwin32SecurityAttributes(long struct, long value)
      Unsafe version of win32SecurityAttributes.
    • nreserved

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

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