Class CUDA_MEMSET_NODE_PARAMS

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

    public class CUDA_MEMSET_NODE_PARAMS
    extends Struct
    implements NativeResource
    Memset node parameters.

    Member documentation

    • dst – Destination device pointer
    • pitch – Pitch of destination device pointer. Unused if height is 1
    • value – Value to be set
    • elementSize – Size of each element in bytes. Must be 1, 2, or 4.
    • width – Width in bytes, of the row
    • height – Number of rows

    Layout

    
     struct CUDA_MEMSET_NODE_PARAMS {
         CUdeviceptr dst;
         size_t pitch;
         unsigned int value;
         unsigned int elementSize;
         size_t width;
         size_t height;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DST, PITCH, VALUE, ELEMENTSIZE, WIDTH, HEIGHT

        The struct member offsets.
    • Constructor Detail

      • CUDA_MEMSET_NODE_PARAMS

        public CUDA_MEMSET_NODE_PARAMS​(java.nio.ByteBuffer container)
        Creates a CUDA_MEMSET_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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • dst

        public long dst()
        Returns the value of the dst field.
      • pitch

        public long pitch()
        Returns the value of the pitch field.
      • value

        public int value()
        Returns the value of the value field.
      • elementSize

        public int elementSize()
        Returns the value of the elementSize field.
      • width

        public long width()
        Returns the value of the width field.
      • height

        public long height()
        Returns the value of the height field.
      • elementSize

        public CUDA_MEMSET_NODE_PARAMS elementSize​(int value)
        Sets the specified value to the elementSize field.
      • set

        public CUDA_MEMSET_NODE_PARAMS set​(long dst,
                                           long pitch,
                                           int value,
                                           int elementSize,
                                           long width,
                                           long height)
        Initializes this struct with the specified values.
      • malloc

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

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

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

        public static CUDA_MEMSET_NODE_PARAMS callocStack()
        Returns a new CUDA_MEMSET_NODE_PARAMS instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static CUDA_MEMSET_NODE_PARAMS mallocStack​(MemoryStack stack)
        Returns a new CUDA_MEMSET_NODE_PARAMS instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static CUDA_MEMSET_NODE_PARAMS callocStack​(MemoryStack stack)
        Returns a new CUDA_MEMSET_NODE_PARAMS instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • ndst

        public static long ndst​(long struct)
        Unsafe version of dst().
      • npitch

        public static long npitch​(long struct)
        Unsafe version of pitch().
      • nvalue

        public static int nvalue​(long struct)
        Unsafe version of value().
      • nelementSize

        public static int nelementSize​(long struct)
        Unsafe version of elementSize().
      • nwidth

        public static long nwidth​(long struct)
        Unsafe version of width().
      • nheight

        public static long nheight​(long struct)
        Unsafe version of height().
      • ndst

        public static void ndst​(long struct,
                                long value)
        Unsafe version of dst.
      • npitch

        public static void npitch​(long struct,
                                  long value)
        Unsafe version of pitch.
      • nvalue

        public static void nvalue​(long struct,
                                  int value)
        Unsafe version of value.
      • nelementSize

        public static void nelementSize​(long struct,
                                        int value)
        Unsafe version of elementSize.
      • nwidth

        public static void nwidth​(long struct,
                                  long value)
        Unsafe version of width.
      • nheight

        public static void nheight​(long struct,
                                   long value)
        Unsafe version of height.
      • validate

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

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array