Class CUDA_HOST_NODE_PARAMS_v2

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

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

Layout


 struct CUDA_HOST_NODE_PARAMS_v2 {
     void (*fn) (void *userData);
     void * userData;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int FN
      The struct member offsets.
    • USERDATA

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

    • CUDA_HOST_NODE_PARAMS_v2

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

      public CUhostFn fn()
      Returns:
      the value of the fn field.
    • userData

      public long userData()
      Returns:
      the value of the userData field.
    • fn

      Sets the specified value to the fn field.
    • userData

      public CUDA_HOST_NODE_PARAMS_v2 userData(long value)
      Sets the specified value to the userData field.
    • set

      public CUDA_HOST_NODE_PARAMS_v2 set(CUhostFnI fn, long userData)
      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 CUDA_HOST_NODE_PARAMS_v2 malloc()
      Returns a new CUDA_HOST_NODE_PARAMS_v2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static CUhostFn nfn(long struct)
      Unsafe version of fn().
    • nuserData

      public static long nuserData(long struct)
      Unsafe version of userData().
    • nfn

      public static void nfn(long struct, CUhostFnI value)
      Unsafe version of fn.
    • nuserData

      public static void nuserData(long struct, long value)
      Unsafe version of userData.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate