Class CUDA_RESOURCE_VIEW_DESC

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

    public class CUDA_RESOURCE_VIEW_DESC
    extends Struct
    implements NativeResource
    Resource view descriptor.

    Member documentation

    • format – Resource view format
    • width – Width of the resource view
    • height – Height of the resource view
    • depth – Depth of the resource view
    • firstMipmapLevel – First defined mipmap level
    • lastMipmapLevel – Last defined mipmap level
    • firstLayer – First layer index
    • lastLayer – Last layer index

    Layout

    
     struct CUDA_RESOURCE_VIEW_DESC {
         CUresourceViewFormat format;
         size_t width;
         size_t height;
         size_t depth;
         unsigned int firstMipmapLevel;
         unsigned int lastMipmapLevel;
         unsigned int firstLayer;
         unsigned int lastLayer;
         unsigned int reserved[16];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FORMAT, WIDTH, HEIGHT, DEPTH, FIRSTMIPMAPLEVEL, LASTMIPMAPLEVEL, FIRSTLAYER, LASTLAYER, RESERVED

        The struct member offsets.
    • Constructor Detail

      • CUDA_RESOURCE_VIEW_DESC

        public CUDA_RESOURCE_VIEW_DESC​(java.nio.ByteBuffer container)
        Creates a CUDA_RESOURCE_VIEW_DESC 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
      • format

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

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

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

        public long depth()
        Returns the value of the depth field.
      • firstMipmapLevel

        public int firstMipmapLevel()
        Returns the value of the firstMipmapLevel field.
      • lastMipmapLevel

        public int lastMipmapLevel()
        Returns the value of the lastMipmapLevel field.
      • firstLayer

        public int firstLayer()
        Returns the value of the firstLayer field.
      • lastLayer

        public int lastLayer()
        Returns the value of the lastLayer field.
      • reserved

        public java.nio.IntBuffer reserved()
        Returns a IntBuffer view of the reserved field.
      • reserved

        public int reserved​(int index)
        Returns the value at the specified index of the reserved field.
      • firstMipmapLevel

        public CUDA_RESOURCE_VIEW_DESC firstMipmapLevel​(int value)
        Sets the specified value to the firstMipmapLevel field.
      • lastMipmapLevel

        public CUDA_RESOURCE_VIEW_DESC lastMipmapLevel​(int value)
        Sets the specified value to the lastMipmapLevel field.
      • firstLayer

        public CUDA_RESOURCE_VIEW_DESC firstLayer​(int value)
        Sets the specified value to the firstLayer field.
      • lastLayer

        public CUDA_RESOURCE_VIEW_DESC lastLayer​(int value)
        Sets the specified value to the lastLayer field.
      • reserved

        public CUDA_RESOURCE_VIEW_DESC reserved​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the reserved field.
      • reserved

        public CUDA_RESOURCE_VIEW_DESC reserved​(int index,
                                                int value)
        Sets the specified value at the specified index of the reserved field.
      • set

        public CUDA_RESOURCE_VIEW_DESC set​(int format,
                                           long width,
                                           long height,
                                           long depth,
                                           int firstMipmapLevel,
                                           int lastMipmapLevel,
                                           int firstLayer,
                                           int lastLayer,
                                           java.nio.IntBuffer reserved)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

        public static int nformat​(long struct)
        Unsafe version of format().
      • nwidth

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

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

        public static long ndepth​(long struct)
        Unsafe version of depth().
      • nfirstMipmapLevel

        public static int nfirstMipmapLevel​(long struct)
        Unsafe version of firstMipmapLevel().
      • nlastMipmapLevel

        public static int nlastMipmapLevel​(long struct)
        Unsafe version of lastMipmapLevel().
      • nfirstLayer

        public static int nfirstLayer​(long struct)
        Unsafe version of firstLayer().
      • nlastLayer

        public static int nlastLayer​(long struct)
        Unsafe version of lastLayer().
      • nreserved

        public static java.nio.IntBuffer nreserved​(long struct)
        Unsafe version of reserved().
      • nreserved

        public static int nreserved​(long struct,
                                    int index)
        Unsafe version of reserved.
      • nformat

        public static void nformat​(long struct,
                                   int value)
        Unsafe version of format.
      • 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.
      • ndepth

        public static void ndepth​(long struct,
                                  long value)
        Unsafe version of depth.
      • nfirstMipmapLevel

        public static void nfirstMipmapLevel​(long struct,
                                             int value)
        Unsafe version of firstMipmapLevel.
      • nlastMipmapLevel

        public static void nlastMipmapLevel​(long struct,
                                            int value)
        Unsafe version of lastMipmapLevel.
      • nfirstLayer

        public static void nfirstLayer​(long struct,
                                       int value)
        Unsafe version of firstLayer.
      • nlastLayer

        public static void nlastLayer​(long struct,
                                      int value)
        Unsafe version of lastLayer.
      • nreserved

        public static void nreserved​(long struct,
                                     java.nio.IntBuffer value)
        Unsafe version of reserved.
      • nreserved

        public static void nreserved​(long struct,
                                     int index,
                                     int value)
        Unsafe version of reserved.