Class CUDA_RESOURCE_DESC

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

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

Layout


 struct CUDA_RESOURCE_DESC {
     CUresourcetype resType;
     union {
         struct {
             CUarray hArray;
         } array;
         struct {
             CUmipmappedArray hMipmappedArray;
         } mipmap;
         struct {
             CUdeviceptr devPtr;
             CUarray_format format;
             unsigned int numChannels;
             size_t sizeInBytes;
         } linear;
         struct {
             CUdeviceptr devPtr;
             CUarray_format format;
             unsigned int numChannels;
             size_t width;
             size_t height;
             size_t pitchInBytes;
         } pitch2D;
         struct {
             int reserved[32];
         } reserved;
     } res;
     unsigned int flags;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int RESTYPE
      The struct member offsets.
    • RES

      public static final int RES
      The struct member offsets.
    • RES_ARRAY

      public static final int RES_ARRAY
      The struct member offsets.
    • RES_ARRAY_HARRAY

      public static final int RES_ARRAY_HARRAY
      The struct member offsets.
    • RES_MIPMAP

      public static final int RES_MIPMAP
      The struct member offsets.
    • RES_MIPMAP_HMIPMAPPEDARRAY

      public static final int RES_MIPMAP_HMIPMAPPEDARRAY
      The struct member offsets.
    • RES_LINEAR

      public static final int RES_LINEAR
      The struct member offsets.
    • RES_LINEAR_DEVPTR

      public static final int RES_LINEAR_DEVPTR
      The struct member offsets.
    • RES_LINEAR_FORMAT

      public static final int RES_LINEAR_FORMAT
      The struct member offsets.
    • RES_LINEAR_NUMCHANNELS

      public static final int RES_LINEAR_NUMCHANNELS
      The struct member offsets.
    • RES_LINEAR_SIZEINBYTES

      public static final int RES_LINEAR_SIZEINBYTES
      The struct member offsets.
    • RES_PITCH2D

      public static final int RES_PITCH2D
      The struct member offsets.
    • RES_PITCH2D_DEVPTR

      public static final int RES_PITCH2D_DEVPTR
      The struct member offsets.
    • RES_PITCH2D_FORMAT

      public static final int RES_PITCH2D_FORMAT
      The struct member offsets.
    • RES_PITCH2D_NUMCHANNELS

      public static final int RES_PITCH2D_NUMCHANNELS
      The struct member offsets.
    • RES_PITCH2D_WIDTH

      public static final int RES_PITCH2D_WIDTH
      The struct member offsets.
    • RES_PITCH2D_HEIGHT

      public static final int RES_PITCH2D_HEIGHT
      The struct member offsets.
    • RES_PITCH2D_PITCHINBYTES

      public static final int RES_PITCH2D_PITCHINBYTES
      The struct member offsets.
    • RES_RESERVED

      public static final int RES_RESERVED
      The struct member offsets.
    • RES_RESERVED_RESERVED

      public static final int RES_RESERVED_RESERVED
      The struct member offsets.
    • FLAGS

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

    • CUDA_RESOURCE_DESC

      public CUDA_RESOURCE_DESC(ByteBuffer container)
      Creates a CUDA_RESOURCE_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_DESC>
    • resType

      public int resType()
      Returns:
      the value of the resType field.
    • res_array_hArray

      public long res_array_hArray()
      Returns:
      the value of the res.array.hArray field.
    • res_mipmap_hMipmappedArray

      public long res_mipmap_hMipmappedArray()
      Returns:
      the value of the res.mipmap.hMipmappedArray field.
    • res_linear_devPtr

      public long res_linear_devPtr()
      Returns:
      the value of the res.linear.devPtr field.
    • res_linear_format

      public int res_linear_format()
      Returns:
      the value of the res.linear.format field.
    • res_linear_numChannels

      public int res_linear_numChannels()
      Returns:
      the value of the res.linear.numChannels field.
    • res_linear_sizeInBytes

      public long res_linear_sizeInBytes()
      Returns:
      the value of the res.linear.sizeInBytes field.
    • res_pitch2D_devPtr

      public long res_pitch2D_devPtr()
      Returns:
      the value of the res.pitch2D.devPtr field.
    • res_pitch2D_format

      public int res_pitch2D_format()
      Returns:
      the value of the res.pitch2D.format field.
    • res_pitch2D_numChannels

      public int res_pitch2D_numChannels()
      Returns:
      the value of the res.pitch2D.numChannels field.
    • res_pitch2D_width

      public long res_pitch2D_width()
      Returns:
      the value of the res.pitch2D.width field.
    • res_pitch2D_height

      public long res_pitch2D_height()
      Returns:
      the value of the res.pitch2D.height field.
    • res_pitch2D_pitchInBytes

      public long res_pitch2D_pitchInBytes()
      Returns:
      the value of the res.pitch2D.pitchInBytes field.
    • res_reserved_reserved

      public IntBuffer res_reserved_reserved()
      Returns:
      a IntBuffer view of the res.reserved.reserved field.
    • res_reserved_reserved

      public int res_reserved_reserved(int index)
      Returns:
      the value at the specified index of the res.reserved.reserved field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • resType

      public CUDA_RESOURCE_DESC resType(int value)
      Sets the specified value to the resType field.
    • res_array_hArray

      public CUDA_RESOURCE_DESC res_array_hArray(long value)
      Sets the specified value to the hArray field.
    • res_mipmap_hMipmappedArray

      public CUDA_RESOURCE_DESC res_mipmap_hMipmappedArray(long value)
      Sets the specified value to the hMipmappedArray field.
    • res_linear_devPtr

      public CUDA_RESOURCE_DESC res_linear_devPtr(long value)
      Sets the specified value to the devPtr field.
    • res_linear_format

      public CUDA_RESOURCE_DESC res_linear_format(int value)
      Sets the specified value to the format field.
    • res_linear_numChannels

      public CUDA_RESOURCE_DESC res_linear_numChannels(int value)
      Sets the specified value to the numChannels field.
    • res_linear_sizeInBytes

      public CUDA_RESOURCE_DESC res_linear_sizeInBytes(long value)
      Sets the specified value to the sizeInBytes field.
    • res_pitch2D_devPtr

      public CUDA_RESOURCE_DESC res_pitch2D_devPtr(long value)
      Sets the specified value to the devPtr field.
    • res_pitch2D_format

      public CUDA_RESOURCE_DESC res_pitch2D_format(int value)
      Sets the specified value to the format field.
    • res_pitch2D_numChannels

      public CUDA_RESOURCE_DESC res_pitch2D_numChannels(int value)
      Sets the specified value to the numChannels field.
    • res_pitch2D_width

      public CUDA_RESOURCE_DESC res_pitch2D_width(long value)
      Sets the specified value to the width field.
    • res_pitch2D_height

      public CUDA_RESOURCE_DESC res_pitch2D_height(long value)
      Sets the specified value to the height field.
    • res_pitch2D_pitchInBytes

      public CUDA_RESOURCE_DESC res_pitch2D_pitchInBytes(long value)
      Sets the specified value to the pitchInBytes field.
    • res_reserved_reserved

      public CUDA_RESOURCE_DESC res_reserved_reserved(IntBuffer value)
      Copies the specified IntBuffer to the reserved field.
    • res_reserved_reserved

      public CUDA_RESOURCE_DESC res_reserved_reserved(int index, int value)
      Sets the specified value at the specified index of the reserved field.
    • flags

      public CUDA_RESOURCE_DESC flags(int value)
      Sets the specified value to the flags field.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static CUDA_RESOURCE_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_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_DESC.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

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

      @Deprecated public static CUDA_RESOURCE_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_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_DESC malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_RESOURCE_DESC instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static CUDA_RESOURCE_DESC calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_RESOURCE_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_DESC.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_RESOURCE_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_DESC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_RESOURCE_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
    • nresType

      public static int nresType(long struct)
      Unsafe version of resType().
    • nres_array_hArray

      public static long nres_array_hArray(long struct)
      Unsafe version of res_array_hArray().
    • nres_mipmap_hMipmappedArray

      public static long nres_mipmap_hMipmappedArray(long struct)
      Unsafe version of res_mipmap_hMipmappedArray().
    • nres_linear_devPtr

      public static long nres_linear_devPtr(long struct)
      Unsafe version of res_linear_devPtr().
    • nres_linear_format

      public static int nres_linear_format(long struct)
      Unsafe version of res_linear_format().
    • nres_linear_numChannels

      public static int nres_linear_numChannels(long struct)
      Unsafe version of res_linear_numChannels().
    • nres_linear_sizeInBytes

      public static long nres_linear_sizeInBytes(long struct)
      Unsafe version of res_linear_sizeInBytes().
    • nres_pitch2D_devPtr

      public static long nres_pitch2D_devPtr(long struct)
      Unsafe version of res_pitch2D_devPtr().
    • nres_pitch2D_format

      public static int nres_pitch2D_format(long struct)
      Unsafe version of res_pitch2D_format().
    • nres_pitch2D_numChannels

      public static int nres_pitch2D_numChannels(long struct)
      Unsafe version of res_pitch2D_numChannels().
    • nres_pitch2D_width

      public static long nres_pitch2D_width(long struct)
      Unsafe version of res_pitch2D_width().
    • nres_pitch2D_height

      public static long nres_pitch2D_height(long struct)
      Unsafe version of res_pitch2D_height().
    • nres_pitch2D_pitchInBytes

      public static long nres_pitch2D_pitchInBytes(long struct)
      Unsafe version of res_pitch2D_pitchInBytes().
    • nres_reserved_reserved

      public static IntBuffer nres_reserved_reserved(long struct)
      Unsafe version of res_reserved_reserved().
    • nres_reserved_reserved

      public static int nres_reserved_reserved(long struct, int index)
      Unsafe version of res_reserved_reserved.
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nresType

      public static void nresType(long struct, int value)
      Unsafe version of resType.
    • nres_array_hArray

      public static void nres_array_hArray(long struct, long value)
      Unsafe version of res_array_hArray.
    • nres_mipmap_hMipmappedArray

      public static void nres_mipmap_hMipmappedArray(long struct, long value)
      Unsafe version of res_mipmap_hMipmappedArray.
    • nres_linear_devPtr

      public static void nres_linear_devPtr(long struct, long value)
      Unsafe version of res_linear_devPtr.
    • nres_linear_format

      public static void nres_linear_format(long struct, int value)
      Unsafe version of res_linear_format.
    • nres_linear_numChannels

      public static void nres_linear_numChannels(long struct, int value)
      Unsafe version of res_linear_numChannels.
    • nres_linear_sizeInBytes

      public static void nres_linear_sizeInBytes(long struct, long value)
      Unsafe version of res_linear_sizeInBytes.
    • nres_pitch2D_devPtr

      public static void nres_pitch2D_devPtr(long struct, long value)
      Unsafe version of res_pitch2D_devPtr.
    • nres_pitch2D_format

      public static void nres_pitch2D_format(long struct, int value)
      Unsafe version of res_pitch2D_format.
    • nres_pitch2D_numChannels

      public static void nres_pitch2D_numChannels(long struct, int value)
      Unsafe version of res_pitch2D_numChannels.
    • nres_pitch2D_width

      public static void nres_pitch2D_width(long struct, long value)
      Unsafe version of res_pitch2D_width.
    • nres_pitch2D_height

      public static void nres_pitch2D_height(long struct, long value)
      Unsafe version of res_pitch2D_height.
    • nres_pitch2D_pitchInBytes

      public static void nres_pitch2D_pitchInBytes(long struct, long value)
      Unsafe version of res_pitch2D_pitchInBytes.
    • nres_reserved_reserved

      public static void nres_reserved_reserved(long struct, IntBuffer value)
      Unsafe version of res_reserved_reserved.
    • nres_reserved_reserved

      public static void nres_reserved_reserved(long struct, int index, int value)
      Unsafe version of res_reserved_reserved.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.