Class CUexecAffinityParam

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

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

Layout


 struct CUexecAffinityParam {
     CUexecAffinityType type;
     union {
         CUexecAffinitySmCount smCount;
     } param;
 }
  • 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.
    • PARAM

      public static final int PARAM
      The struct member offsets.
    • PARAM_SMCOUNT

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

    • CUexecAffinityParam

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

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

      public CUexecAffinitySmCount param_smCount()
      Returns:
      a CUexecAffinitySmCount view of the param.smCount field.
    • type

      public CUexecAffinityParam type(int value)
      Sets the specified value to the type field.
    • param_smCount

      public CUexecAffinityParam param_smCount(CUexecAffinitySmCount value)
      Copies the specified CUexecAffinitySmCount to the smCount field.
    • param_smCount

      public CUexecAffinityParam param_smCount(Consumer<CUexecAffinitySmCount> consumer)
      Passes the smCount field to the specified Consumer.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static CUexecAffinitySmCount nparam_smCount(long struct)
      Unsafe version of param_smCount().
    • ntype

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

      public static void nparam_smCount(long struct, CUexecAffinitySmCount value)
      Unsafe version of param_smCount.