Class CUDA_RESOURCE_VIEW_DESC

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

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

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 Details

    • SIZEOF

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

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

      public static final int FORMAT
      The struct member offsets.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • DEPTH

      public static final int DEPTH
      The struct member offsets.
    • FIRSTMIPMAPLEVEL

      public static final int FIRSTMIPMAPLEVEL
      The struct member offsets.
    • LASTMIPMAPLEVEL

      public static final int LASTMIPMAPLEVEL
      The struct member offsets.
    • FIRSTLAYER

      public static final int FIRSTLAYER
      The struct member offsets.
    • LASTLAYER

      public static final int LASTLAYER
      The struct member offsets.
    • RESERVED

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

    • CUDA_RESOURCE_VIEW_DESC

      public CUDA_RESOURCE_VIEW_DESC(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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<CUDA_RESOURCE_VIEW_DESC>
    • 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 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.
    • format

      public CUDA_RESOURCE_VIEW_DESC format(int value)
      Sets the specified value to the format field.
    • width

      public CUDA_RESOURCE_VIEW_DESC width(long value)
      Sets the specified value to the width field.
    • height

      public CUDA_RESOURCE_VIEW_DESC height(long value)
      Sets the specified value to the height field.
    • depth

      public CUDA_RESOURCE_VIEW_DESC depth(long value)
      Sets the specified value to the depth 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(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, IntBuffer reserved)
      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_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()
      Returns a new CUDA_RESOURCE_VIEW_DESC instance allocated with BufferUtils.
    • create

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

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

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

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

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

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

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

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static CUDA_RESOURCE_VIEW_DESC.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

      public static CUDA_RESOURCE_VIEW_DESC calloc(org.lwjgl.system.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
    • malloc

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

      public static CUDA_RESOURCE_VIEW_DESC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_RESOURCE_VIEW_DESC.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
    • 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 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, IntBuffer value)
      Unsafe version of reserved.
    • nreserved

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