Class CUDA_ARRAY_DESCRIPTOR

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

    public class CUDA_ARRAY_DESCRIPTOR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Array descriptor.

    Layout

    
     struct CUDA_ARRAY_DESCRIPTOR {
         size_t Width();
         size_t Height();
         CUarray_format Format();
         unsigned int NumChannels();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • WIDTH, HEIGHT, FORMAT, NUMCHANNELS

        The struct member offsets.
    • Constructor Detail

      • CUDA_ARRAY_DESCRIPTOR

        public CUDA_ARRAY_DESCRIPTOR​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • Width

        public long Width()
        Width of array
      • Height

        public long Height()
        Height of array
      • Format

        public int Format()
        Array format
      • NumChannels

        public int NumChannels()
        Channels per array element
      • set

        public CUDA_ARRAY_DESCRIPTOR set​(long Width,
                                         long Height,
                                         int Format,
                                         int NumChannels)
        Initializes this struct with the specified values.
      • 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

        @Nullable
        public static CUDA_ARRAY_DESCRIPTOR createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.