Class CUmemAllocationProp

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

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

Layout


 struct CUmemAllocationProp {
     CUmemAllocationType type;
     CUmemAllocationHandleType requestedHandleTypes;
     CUmemLocation location;
     void * win32HandleMetaData;
     struct {
         unsigned char compressionType;
         unsigned char gpuDirectRDMACapable;
         unsigned short usage;
         unsigned char reserved[4];
     } allocFlags;
 }
  • Field Details

    • SIZEOF

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

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

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

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

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

      public static final int WIN32HANDLEMETADATA
      The struct member offsets.
    • ALLOCFLAGS

      public static final int ALLOCFLAGS
      The struct member offsets.
    • ALLOCFLAGS_COMPRESSIONTYPE

      public static final int ALLOCFLAGS_COMPRESSIONTYPE
      The struct member offsets.
    • ALLOCFLAGS_GPUDIRECTRDMACAPABLE

      public static final int ALLOCFLAGS_GPUDIRECTRDMACAPABLE
      The struct member offsets.
    • ALLOCFLAGS_USAGE

      public static final int ALLOCFLAGS_USAGE
      The struct member offsets.
    • ALLOCFLAGS_RESERVED

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

    • CUmemAllocationProp

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

      public int type()
      Returns:
      the value of the type field.
    • requestedHandleTypes

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

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

      public long win32HandleMetaData()
      Returns:
      the value of the win32HandleMetaData field.
    • allocFlags_compressionType

      public byte allocFlags_compressionType()
      Returns:
      the value of the allocFlags.compressionType field.
    • allocFlags_gpuDirectRDMACapable

      public byte allocFlags_gpuDirectRDMACapable()
      Returns:
      the value of the allocFlags.gpuDirectRDMACapable field.
    • allocFlags_usage

      public short allocFlags_usage()
      Returns:
      the value of the allocFlags.usage field.
    • allocFlags_reserved

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

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

      public CUmemAllocationProp type(int value)
      Sets the specified value to the type field.
    • requestedHandleTypes

      public CUmemAllocationProp requestedHandleTypes(int value)
      Sets the specified value to the requestedHandleTypes field.
    • location

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

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

      public CUmemAllocationProp win32HandleMetaData(long value)
      Sets the specified value to the win32HandleMetaData field.
    • allocFlags_compressionType

      public CUmemAllocationProp allocFlags_compressionType(byte value)
      Sets the specified value to the compressionType field.
    • allocFlags_gpuDirectRDMACapable

      public CUmemAllocationProp allocFlags_gpuDirectRDMACapable(byte value)
      Sets the specified value to the gpuDirectRDMACapable field.
    • allocFlags_usage

      public CUmemAllocationProp allocFlags_usage(short value)
      Sets the specified value to the usage field.
    • allocFlags_reserved

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

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

      public CUmemAllocationProp set(int type, int requestedHandleTypes, CUmemLocation location, long win32HandleMetaData, byte allocFlags_compressionType, byte allocFlags_gpuDirectRDMACapable, short allocFlags_usage, ByteBuffer allocFlags_reserved)
      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 CUmemAllocationProp malloc()
      Returns a new CUmemAllocationProp instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int ntype(long struct)
      Unsafe version of type().
    • nrequestedHandleTypes

      public static int nrequestedHandleTypes(long struct)
      Unsafe version of requestedHandleTypes().
    • nlocation

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

      public static long nwin32HandleMetaData(long struct)
      Unsafe version of win32HandleMetaData().
    • nallocFlags_compressionType

      public static byte nallocFlags_compressionType(long struct)
      Unsafe version of allocFlags_compressionType().
    • nallocFlags_gpuDirectRDMACapable

      public static byte nallocFlags_gpuDirectRDMACapable(long struct)
    • nallocFlags_usage

      public static short nallocFlags_usage(long struct)
      Unsafe version of allocFlags_usage().
    • nallocFlags_reserved

      public static ByteBuffer nallocFlags_reserved(long struct)
      Unsafe version of allocFlags_reserved().
    • nallocFlags_reserved

      public static byte nallocFlags_reserved(long struct, int index)
      Unsafe version of allocFlags_reserved.
    • ntype

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

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

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

      public static void nwin32HandleMetaData(long struct, long value)
      Unsafe version of win32HandleMetaData.
    • nallocFlags_compressionType

      public static void nallocFlags_compressionType(long struct, byte value)
      Unsafe version of allocFlags_compressionType.
    • nallocFlags_gpuDirectRDMACapable

      public static void nallocFlags_gpuDirectRDMACapable(long struct, byte value)
    • nallocFlags_usage

      public static void nallocFlags_usage(long struct, short value)
      Unsafe version of allocFlags_usage.
    • nallocFlags_reserved

      public static void nallocFlags_reserved(long struct, ByteBuffer value)
      Unsafe version of allocFlags_reserved.
    • nallocFlags_reserved

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