Class CUDA_ARRAY_DESCRIPTOR

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

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

Layout


 struct CUDA_ARRAY_DESCRIPTOR {
     size_t Width;
     size_t Height;
     CUarray_format Format;
     unsigned int NumChannels;
 }
  • Field Details

    • SIZEOF

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

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

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

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

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

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

    • CUDA_ARRAY_DESCRIPTOR

      public CUDA_ARRAY_DESCRIPTOR(ByteBuffer container)
      Creates a CUDA_ARRAY_DESCRIPTOR 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_ARRAY_DESCRIPTOR>
    • Width

      public long Width()
      Returns:
      the value of the Width field.
    • Height

      public long Height()
      Returns:
      the value of the Height field.
    • Format

      public int Format()
      Returns:
      the value of the Format field.
    • NumChannels

      public int NumChannels()
      Returns:
      the value of the NumChannels field.
    • Width

      public CUDA_ARRAY_DESCRIPTOR Width(long value)
      Sets the specified value to the Width field.
    • Height

      public CUDA_ARRAY_DESCRIPTOR Height(long value)
      Sets the specified value to the Height field.
    • Format

      public CUDA_ARRAY_DESCRIPTOR Format(int value)
      Sets the specified value to the Format field.
    • NumChannels

      public CUDA_ARRAY_DESCRIPTOR NumChannels(int value)
      Sets the specified value to the NumChannels field.
    • set

      public CUDA_ARRAY_DESCRIPTOR set(long Width, long Height, int Format, int NumChannels)
      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_ARRAY_DESCRIPTOR malloc()
      Returns a new CUDA_ARRAY_DESCRIPTOR instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static CUDA_ARRAY_DESCRIPTOR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new CUDA_ARRAY_DESCRIPTOR.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
    • nWidth

      public static long nWidth(long struct)
      Unsafe version of Width().
    • nHeight

      public static long nHeight(long struct)
      Unsafe version of Height().
    • nFormat

      public static int nFormat(long struct)
      Unsafe version of Format().
    • nNumChannels

      public static int nNumChannels(long struct)
      Unsafe version of NumChannels().
    • 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.
    • nFormat

      public static void nFormat(long struct, int value)
      Unsafe version of Format.
    • nNumChannels

      public static void nNumChannels(long struct, int value)
      Unsafe version of NumChannels.