Class CUdevprop

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

    public class CUdevprop
    extends Struct
    implements NativeResource
    Legacy device properties.

    Member documentation

    • maxThreadsPerBlock – Maximum number of threads per block
    • maxThreadsDim[3] – Maximum size of each dimension of a block
    • maxGridSize[3] – Maximum size of each dimension of a grid
    • sharedMemPerBlock – Shared memory available per block in bytes
    • totalConstantMemory – Constant memory available on device in bytes
    • SIMDWidth – Warp size in threads
    • memPitch – Maximum pitch in bytes allowed by memory copies
    • regsPerBlock – 32-bit registers available per block
    • clockRate – Clock frequency in kilohertz
    • textureAlign – Alignment requirement for textures

    Layout

    
     struct CUdevprop {
         int maxThreadsPerBlock;
         int maxThreadsDim[3];
         int maxGridSize[3];
         int sharedMemPerBlock;
         int totalConstantMemory;
         int SIMDWidth;
         int memPitch;
         int regsPerBlock;
         int clockRate;
         int textureAlign;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • MAXTHREADSPERBLOCK, MAXTHREADSDIM, MAXGRIDSIZE, SHAREDMEMPERBLOCK, TOTALCONSTANTMEMORY, SIMDWIDTH, MEMPITCH, REGSPERBLOCK, CLOCKRATE, TEXTUREALIGN

        The struct member offsets.
    • Constructor Detail

      • CUdevprop

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

        public int maxThreadsPerBlock()
        Returns the value of the maxThreadsPerBlock field.
      • maxThreadsDim

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

        public int maxThreadsDim​(int index)
        Returns the value at the specified index of the maxThreadsDim field.
      • maxGridSize

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

        public int maxGridSize​(int index)
        Returns the value at the specified index of the maxGridSize field.
      • sharedMemPerBlock

        public int sharedMemPerBlock()
        Returns the value of the sharedMemPerBlock field.
      • totalConstantMemory

        public int totalConstantMemory()
        Returns the value of the totalConstantMemory field.
      • SIMDWidth

        public int SIMDWidth()
        Returns the value of the SIMDWidth field.
      • memPitch

        public int memPitch()
        Returns the value of the memPitch field.
      • regsPerBlock

        public int regsPerBlock()
        Returns the value of the regsPerBlock field.
      • clockRate

        public int clockRate()
        Returns the value of the clockRate field.
      • textureAlign

        public int textureAlign()
        Returns the value of the textureAlign field.
      • maxThreadsPerBlock

        public CUdevprop maxThreadsPerBlock​(int value)
        Sets the specified value to the maxThreadsPerBlock field.
      • maxThreadsDim

        public CUdevprop maxThreadsDim​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the maxThreadsDim field.
      • maxThreadsDim

        public CUdevprop maxThreadsDim​(int index,
                                       int value)
        Sets the specified value at the specified index of the maxThreadsDim field.
      • maxGridSize

        public CUdevprop maxGridSize​(java.nio.IntBuffer value)
        Copies the specified IntBuffer to the maxGridSize field.
      • maxGridSize

        public CUdevprop maxGridSize​(int index,
                                     int value)
        Sets the specified value at the specified index of the maxGridSize field.
      • sharedMemPerBlock

        public CUdevprop sharedMemPerBlock​(int value)
        Sets the specified value to the sharedMemPerBlock field.
      • totalConstantMemory

        public CUdevprop totalConstantMemory​(int value)
        Sets the specified value to the totalConstantMemory field.
      • SIMDWidth

        public CUdevprop SIMDWidth​(int value)
        Sets the specified value to the SIMDWidth field.
      • memPitch

        public CUdevprop memPitch​(int value)
        Sets the specified value to the memPitch field.
      • regsPerBlock

        public CUdevprop regsPerBlock​(int value)
        Sets the specified value to the regsPerBlock field.
      • clockRate

        public CUdevprop clockRate​(int value)
        Sets the specified value to the clockRate field.
      • textureAlign

        public CUdevprop textureAlign​(int value)
        Sets the specified value to the textureAlign field.
      • set

        public CUdevprop set​(int maxThreadsPerBlock,
                             java.nio.IntBuffer maxThreadsDim,
                             java.nio.IntBuffer maxGridSize,
                             int sharedMemPerBlock,
                             int totalConstantMemory,
                             int SIMDWidth,
                             int memPitch,
                             int regsPerBlock,
                             int clockRate,
                             int textureAlign)
        Initializes this struct with the specified values.
      • set

        public CUdevprop set​(CUdevprop src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

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

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

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

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

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

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

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

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

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

        public static CUdevprop mallocStack()
        Returns a new CUdevprop instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static CUdevprop.Buffer callocStack​(int capacity)
        Returns a new CUdevprop.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static CUdevprop.Buffer callocStack​(int capacity,
                                                   MemoryStack stack)
        Returns a new CUdevprop.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
      • nmaxThreadsPerBlock

        public static int nmaxThreadsPerBlock​(long struct)
        Unsafe version of maxThreadsPerBlock().
      • nmaxThreadsDim

        public static java.nio.IntBuffer nmaxThreadsDim​(long struct)
        Unsafe version of maxThreadsDim().
      • nmaxThreadsDim

        public static int nmaxThreadsDim​(long struct,
                                         int index)
        Unsafe version of maxThreadsDim.
      • nmaxGridSize

        public static java.nio.IntBuffer nmaxGridSize​(long struct)
        Unsafe version of maxGridSize().
      • nmaxGridSize

        public static int nmaxGridSize​(long struct,
                                       int index)
        Unsafe version of maxGridSize.
      • nsharedMemPerBlock

        public static int nsharedMemPerBlock​(long struct)
        Unsafe version of sharedMemPerBlock().
      • ntotalConstantMemory

        public static int ntotalConstantMemory​(long struct)
        Unsafe version of totalConstantMemory().
      • nSIMDWidth

        public static int nSIMDWidth​(long struct)
        Unsafe version of SIMDWidth().
      • nmemPitch

        public static int nmemPitch​(long struct)
        Unsafe version of memPitch().
      • nregsPerBlock

        public static int nregsPerBlock​(long struct)
        Unsafe version of regsPerBlock().
      • nclockRate

        public static int nclockRate​(long struct)
        Unsafe version of clockRate().
      • ntextureAlign

        public static int ntextureAlign​(long struct)
        Unsafe version of textureAlign().
      • nmaxThreadsPerBlock

        public static void nmaxThreadsPerBlock​(long struct,
                                               int value)
        Unsafe version of maxThreadsPerBlock.
      • nmaxThreadsDim

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

        public static void nmaxThreadsDim​(long struct,
                                          int index,
                                          int value)
        Unsafe version of maxThreadsDim.
      • nmaxGridSize

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

        public static void nmaxGridSize​(long struct,
                                        int index,
                                        int value)
        Unsafe version of maxGridSize.
      • nsharedMemPerBlock

        public static void nsharedMemPerBlock​(long struct,
                                              int value)
        Unsafe version of sharedMemPerBlock.
      • ntotalConstantMemory

        public static void ntotalConstantMemory​(long struct,
                                                int value)
        Unsafe version of totalConstantMemory.
      • nSIMDWidth

        public static void nSIMDWidth​(long struct,
                                      int value)
        Unsafe version of SIMDWidth.
      • nmemPitch

        public static void nmemPitch​(long struct,
                                     int value)
        Unsafe version of memPitch.
      • nregsPerBlock

        public static void nregsPerBlock​(long struct,
                                         int value)
        Unsafe version of regsPerBlock.
      • nclockRate

        public static void nclockRate​(long struct,
                                      int value)
        Unsafe version of clockRate.
      • ntextureAlign

        public static void ntextureAlign​(long struct,
                                         int value)
        Unsafe version of textureAlign.