Class CUstreamAttrValue

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

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

Layout


 union CUstreamAttrValue {
     CUaccessPolicyWindow accessPolicyWindow;
     CUsynchronizationPolicy syncPolicy;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ACCESSPOLICYWINDOW
      The struct member offsets.
    • SYNCPOLICY

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

    • CUstreamAttrValue

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

      public CUaccessPolicyWindow accessPolicyWindow()
      Returns:
      a CUaccessPolicyWindow view of the accessPolicyWindow field.
    • syncPolicy

      public int syncPolicy()
      Returns:
      the value of the syncPolicy field.
    • accessPolicyWindow

      public CUstreamAttrValue accessPolicyWindow(CUaccessPolicyWindow value)
      Copies the specified CUaccessPolicyWindow to the accessPolicyWindow field.
    • accessPolicyWindow

      public CUstreamAttrValue accessPolicyWindow(Consumer<CUaccessPolicyWindow> consumer)
      Passes the accessPolicyWindow field to the specified Consumer.
    • syncPolicy

      public CUstreamAttrValue syncPolicy(int value)
      Sets the specified value to the syncPolicy field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static CUaccessPolicyWindow naccessPolicyWindow(long struct)
      Unsafe version of accessPolicyWindow().
    • nsyncPolicy

      public static int nsyncPolicy(long struct)
      Unsafe version of syncPolicy().
    • naccessPolicyWindow

      public static void naccessPolicyWindow(long struct, CUaccessPolicyWindow value)
      Unsafe version of accessPolicyWindow.
    • nsyncPolicy

      public static void nsyncPolicy(long struct, int value)
      Unsafe version of syncPolicy.