Class CUDA_HOST_NODE_PARAMS

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class CUDA_HOST_NODE_PARAMS
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Host node parameters.

    Layout

    
     struct CUDA_HOST_NODE_PARAMS {
         void (*fn) (void *userData);
         void * userData();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FN, USERDATA

        The struct member offsets.
    • Constructor Detail

      • CUDA_HOST_NODE_PARAMS

        public CUDA_HOST_NODE_PARAMS​(java.nio.ByteBuffer container)
        Creates a CUDA_HOST_NODE_PARAMS 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • fn

        public CUhostFn fn()
        The function to call when the node executes
      • userData

        public long userData()
        Argument to pass to the function
      • malloc

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

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

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

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

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

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

        public static CUDA_HOST_NODE_PARAMS calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new CUDA_HOST_NODE_PARAMS 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.Buffer malloc​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new CUDA_HOST_NODE_PARAMS.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static CUDA_HOST_NODE_PARAMS.Buffer calloc​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new CUDA_HOST_NODE_PARAMS.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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