Module openj9.cuda
Package com.ibm.cuda

Class CudaDevice


  • public final class CudaDevice
    extends Object
    The CudaDevice class represents a CUDA-capable device.
    • Field Detail

      • ATTRIBUTE_ASYNC_ENGINE_COUNT

        public static final int ATTRIBUTE_ASYNC_ENGINE_COUNT
        Number of asynchronous engines.
        See Also:
        Constant Field Values
      • ATTRIBUTE_CAN_MAP_HOST_MEMORY

        public static final int ATTRIBUTE_CAN_MAP_HOST_MEMORY
        Device can map host memory into CUDA address space.
        See Also:
        Constant Field Values
      • ATTRIBUTE_CLOCK_RATE

        public static final int ATTRIBUTE_CLOCK_RATE
        Typical clock frequency in kilohertz.
        See Also:
        Constant Field Values
      • ATTRIBUTE_COMPUTE_CAPABILITY

        public static final int ATTRIBUTE_COMPUTE_CAPABILITY
        Compute capability version number. This value is the major compute capability version * 10 + the minor compute capability version, so a compute capability version 3.5 function would return the value 35.
        See Also:
        Constant Field Values
      • ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR

        public static final int ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR
        Major compute capability version number.
        See Also:
        Constant Field Values
      • ATTRIBUTE_COMPUTE_CAPABILITY_MINOR

        public static final int ATTRIBUTE_COMPUTE_CAPABILITY_MINOR
        Minor compute capability version number.
        See Also:
        Constant Field Values
      • ATTRIBUTE_COMPUTE_MODE

        public static final int ATTRIBUTE_COMPUTE_MODE
        Compute mode (see COMPUTE_MODE_XXX for details).
        See Also:
        Constant Field Values
      • ATTRIBUTE_CONCURRENT_KERNELS

        public static final int ATTRIBUTE_CONCURRENT_KERNELS
        Device can possibly execute multiple kernels concurrently.
        See Also:
        Constant Field Values
      • ATTRIBUTE_ECC_ENABLED

        public static final int ATTRIBUTE_ECC_ENABLED
        Device has ECC support enabled.
        See Also:
        Constant Field Values
      • ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH

        public static final int ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH
        Global memory bus width in bits.
        See Also:
        Constant Field Values
      • ATTRIBUTE_INTEGRATED

        public static final int ATTRIBUTE_INTEGRATED
        Device is integrated with host memory.
        See Also:
        Constant Field Values
      • ATTRIBUTE_KERNEL_EXEC_TIMEOUT

        public static final int ATTRIBUTE_KERNEL_EXEC_TIMEOUT
        Specifies whether there is a run time limit on kernels.
        See Also:
        Constant Field Values
      • ATTRIBUTE_L2_CACHE_SIZE

        public static final int ATTRIBUTE_L2_CACHE_SIZE
        Size of L2 cache in bytes.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_BLOCK_DIM_X

        public static final int ATTRIBUTE_MAX_BLOCK_DIM_X
        Maximum block dimension X.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_BLOCK_DIM_Y

        public static final int ATTRIBUTE_MAX_BLOCK_DIM_Y
        Maximum block dimension Y.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_BLOCK_DIM_Z

        public static final int ATTRIBUTE_MAX_BLOCK_DIM_Z
        Maximum block dimension Z.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_GRID_DIM_X

        public static final int ATTRIBUTE_MAX_GRID_DIM_X
        Maximum grid dimension X.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_GRID_DIM_Y

        public static final int ATTRIBUTE_MAX_GRID_DIM_Y
        Maximum grid dimension Y.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_GRID_DIM_Z

        public static final int ATTRIBUTE_MAX_GRID_DIM_Z
        Maximum grid dimension Z.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_PITCH

        public static final int ATTRIBUTE_MAX_PITCH
        Maximum pitch in bytes allowed by memory copies.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_REGISTERS_PER_BLOCK

        public static final int ATTRIBUTE_MAX_REGISTERS_PER_BLOCK
        Maximum number of 32-bit registers available per block.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK

        public static final int ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK
        Maximum shared memory available per block in bytes.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_THREADS_PER_BLOCK

        public static final int ATTRIBUTE_MAX_THREADS_PER_BLOCK
        Maximum number of threads per block.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR

        public static final int ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR
        Maximum resident threads per multiprocessor.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS

        public static final int ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS
        Maximum layers in a 1D layered surface.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH
        Maximum 1D layered surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH
        Maximum 1D surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT
        Maximum 2D surface height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT
        Maximum 2D layered surface height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS

        public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS
        Maximum layers in a 2D layered surface.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH
        Maximum 2D layered surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH
        Maximum 2D surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH
        Maximum 3D surface depth.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT
        Maximum 3D surface height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH
        Maximum 3D surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS

        public static final int ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS
        Maximum layers in a cubemap layered surface.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH
        Maximum cubemap layered surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH
        Maximum cubemap surface width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS
        Maximum layers in a 1D layered texture.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH
        Maximum 1D layered texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH
        Maximum 1D linear texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH
        Maximum mipmapped 1D texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH
        Maximum 1D texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT
        Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH
        Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT
        Maximum 2D texture height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT
        Maximum 2D layered texture height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS
        Maximum layers in a 2D layered texture.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH
        Maximum 2D layered texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT
        Maximum 2D linear texture height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH
        Maximum 2D linear texture pitch in bytes.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH
        Maximum 2D linear texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT
        Maximum mipmapped 2D texture height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH
        Maximum mipmapped 2D texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH
        Maximum 2D texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH
        Maximum 3D texture depth.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE
        Alternate maximum 3D texture depth.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT
        Maximum 3D texture height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE
        Alternate maximum 3D texture height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH
        Maximum 3D texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE

        public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE
        Alternate maximum 3D texture width.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS

        public static final int ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS
        Maximum layers in a cubemap layered texture.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH
        Maximum cubemap layered texture width/height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH

        public static final int ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH
        Maximum cubemap texture width/height.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MEMORY_CLOCK_RATE

        public static final int ATTRIBUTE_MEMORY_CLOCK_RATE
        Peak memory clock frequency in kilohertz.
        See Also:
        Constant Field Values
      • ATTRIBUTE_MULTIPROCESSOR_COUNT

        public static final int ATTRIBUTE_MULTIPROCESSOR_COUNT
        Number of multiprocessors on device.
        See Also:
        Constant Field Values
      • ATTRIBUTE_PCI_BUS_ID

        public static final int ATTRIBUTE_PCI_BUS_ID
        PCI bus ID of the device.
        See Also:
        Constant Field Values
      • ATTRIBUTE_PCI_DEVICE_ID

        public static final int ATTRIBUTE_PCI_DEVICE_ID
        PCI device ID of the device.
        See Also:
        Constant Field Values
      • ATTRIBUTE_PCI_DOMAIN_ID

        public static final int ATTRIBUTE_PCI_DOMAIN_ID
        PCI domain ID of the device.
        See Also:
        Constant Field Values
      • ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED

        public static final int ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED
        Device supports stream priorities.
        See Also:
        Constant Field Values
      • ATTRIBUTE_SURFACE_ALIGNMENT

        public static final int ATTRIBUTE_SURFACE_ALIGNMENT
        Alignment requirement for surfaces.
        See Also:
        Constant Field Values
      • ATTRIBUTE_TCC_DRIVER

        public static final int ATTRIBUTE_TCC_DRIVER
        Device is using TCC driver model.
        See Also:
        Constant Field Values
      • ATTRIBUTE_TEXTURE_ALIGNMENT

        public static final int ATTRIBUTE_TEXTURE_ALIGNMENT
        Alignment requirement for textures.
        See Also:
        Constant Field Values
      • ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT

        public static final int ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT
        Pitch alignment requirement for textures.
        See Also:
        Constant Field Values
      • ATTRIBUTE_TOTAL_CONSTANT_MEMORY

        public static final int ATTRIBUTE_TOTAL_CONSTANT_MEMORY
        Memory available on device for __constant__ variables in a kernel in bytes.
        See Also:
        Constant Field Values
      • ATTRIBUTE_UNIFIED_ADDRESSING

        public static final int ATTRIBUTE_UNIFIED_ADDRESSING
        Device shares a unified address space with the host.
        See Also:
        Constant Field Values
      • ATTRIBUTE_WARP_SIZE

        public static final int ATTRIBUTE_WARP_SIZE
        Warp size in threads.
        See Also:
        Constant Field Values
      • COMPUTE_MODE_DEFAULT

        public static final int COMPUTE_MODE_DEFAULT
        Default compute mode (multiple contexts allowed per device).
        See Also:
        Constant Field Values
      • COMPUTE_MODE_PROCESS_EXCLUSIVE

        public static final int COMPUTE_MODE_PROCESS_EXCLUSIVE
        Compute exclusive process mode (at most one context used by a single process can be present on this device at a time).
        See Also:
        Constant Field Values
      • COMPUTE_MODE_PROHIBITED

        public static final int COMPUTE_MODE_PROHIBITED
        Compute prohibited mode (no contexts can be created on this device at this time).
        See Also:
        Constant Field Values
      • COMPUTE_MODE_THREAD_EXCLUSIVE

        public static final int COMPUTE_MODE_THREAD_EXCLUSIVE
        Exclusive thread mode (at most one context, used by a single thread, can be present on this device at a time).
        See Also:
        Constant Field Values
      • FLAG_LMEM_RESIZE_TO_MAX

        public static final int FLAG_LMEM_RESIZE_TO_MAX
        Keep local memory allocation after launch.
        See Also:
        Constant Field Values
      • FLAG_MAP_HOST

        public static final int FLAG_MAP_HOST
        Support mapped pinned allocations.
        See Also:
        Constant Field Values
      • FLAG_SCHED_AUTO

        public static final int FLAG_SCHED_AUTO
        Automatic scheduling.
        See Also:
        Constant Field Values
      • FLAG_SCHED_BLOCKING_SYNC

        public static final int FLAG_SCHED_BLOCKING_SYNC
        Set blocking synchronization as default scheduling.
        See Also:
        Constant Field Values
      • FLAG_SCHED_SPIN

        public static final int FLAG_SCHED_SPIN
        Set spin as default scheduling.
        See Also:
        Constant Field Values
      • FLAG_SCHED_YIELD

        public static final int FLAG_SCHED_YIELD
        Set yield as default scheduling.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CudaDevice

        public CudaDevice​(int deviceId)
        Creates a device handle corresponding to deviceId.

        No checking is done on deviceId, but it must be non-negative and less than the value returned getCount() to be useful.

        Parameters:
        deviceId - an integer identifying the device of interest
    • Method Detail

      • getCount

        public static int getCount()
                            throws CudaException
        Returns the number of CUDA-capable devices available to the Java host.
        Returns:
        the number of available CUDA-capable devices
        Throws:
        CudaException - if a CUDA exception occurs
      • getDriverVersion

        @Deprecated
        public static int getDriverVersion()
                                    throws CudaException
        Deprecated.
        Use Cuda.getDriverVersion() instead.
        Returns a number identifying the driver version.
        Returns:
        the driver version number
        Throws:
        CudaException - if a CUDA exception occurs
      • getRuntimeVersion

        @Deprecated
        public static int getRuntimeVersion()
                                     throws CudaException
        Deprecated.
        Use Cuda.getRuntimeVersion() instead.
        Returns a number identifying the runtime version.
        Returns:
        the runtime version number
        Throws:
        CudaException - if a CUDA exception occurs
      • addCallback

        public void addCallback​(Runnable callback)
                         throws CudaException
        Queues the given callback to be executed when the associated device has completed all previous actions in the default stream.
        Parameters:
        callback - code to run
        Throws:
        CudaException - if a CUDA exception occurs
      • canAccessPeer

        public boolean canAccessPeer​(CudaDevice peerDevice)
                              throws CudaException
        Returns whether this device can access memory of the specified peerDevice.
        Parameters:
        peerDevice - the peer device
        Returns:
        true if this device can access memory of peerDevice, false otherwise
        Throws:
        CudaException - if a CUDA exception occurs
      • disablePeerAccess

        public void disablePeerAccess​(CudaDevice peerDevice)
                               throws CudaException
        Disable access to memory of peerDevice by this device.
        Parameters:
        peerDevice - the peer device
        Throws:
        CudaException - if a CUDA exception occurs
        SecurityException - if a security manager exists and the calling thread does not have permission to disable peer access
      • enablePeerAccess

        public void enablePeerAccess​(CudaDevice peerDevice)
                              throws CudaException
        Enable access to memory of peerDevice by this device.
        Parameters:
        peerDevice - the peer device
        Throws:
        CudaException - if a CUDA exception occurs
        SecurityException - if a security manager exists and the calling thread does not have permission to enable peer access
      • equals

        public boolean equals​(Object other)
        Does the argument represent the same device as this?
        Overrides:
        equals in class Object
        Parameters:
        other - Object the object to compare with this object.
        Returns:
        boolean true if the object is the same as this object false if it is different from this object.
        See Also:
        Object.hashCode()
      • getAttribute

        public int getAttribute​(int attribute)
                         throws CudaException
        Returns the value of the specified attribute.
        Parameters:
        attribute - the attribute to be queried (see ATTRIBUTE_XXX)
        Returns:
        the attribute value
        Throws:
        CudaException - if a CUDA exception occurs
      • getDeviceId

        public int getDeviceId()
        Returns an integer identifying this device (the value provided when this object was constructed).
        Returns:
        an integer identifying this device
      • getFreeMemory

        public long getFreeMemory()
                           throws CudaException
        Returns the amount of free device memory in bytes.
        Returns:
        the number of bytes of free device memory
        Throws:
        CudaException - if a CUDA exception occurs
      • getGreatestStreamPriority

        public int getGreatestStreamPriority()
                                      throws CudaException
        Returns the greatest possible priority of a stream on this device. Note that stream priorities follow a convention where lower numbers imply greater priorities.
        Returns:
        the greatest possible priority of a stream on this device
        Throws:
        CudaException - if a CUDA exception occurs
      • getLeastStreamPriority

        public int getLeastStreamPriority()
                                   throws CudaException
        Returns the least possible priority of a stream on this device. Note that stream priorities follow a convention where lower numbers imply greater priorities.
        Returns:
        the greatest possible priority of a stream on this device
        Throws:
        CudaException - if a CUDA exception occurs
      • getLimit

        public long getLimit​(CudaDevice.Limit limit)
                      throws CudaException
        Returns the value of the specified limit.
        Parameters:
        limit - the limit to be queried
        Returns:
        the value of the specified limit
        Throws:
        CudaException - if a CUDA exception occurs
      • getName

        public String getName()
                       throws CudaException
        Returns the name of this device.
        Returns:
        the name of this device
        Throws:
        CudaException - if a CUDA exception occurs
      • getSharedMemConfig

        public CudaDevice.SharedMemConfig getSharedMemConfig()
                                                      throws CudaException
        Returns the current shared memory configuration of this device.
        Returns:
        the current shared memory configuration
        Throws:
        CudaException - if a CUDA exception occurs
      • getTotalMemory

        public long getTotalMemory()
                            throws CudaException
        Returns the total amount of memory on this device in bytes.
        Returns:
        the number of bytes of device memory
        Throws:
        CudaException - if a CUDA exception occurs
      • setCacheConfig

        public void setCacheConfig​(CudaDevice.CacheConfig config)
                            throws CudaException
        Configures the cache of this device.
        Parameters:
        config - the desired cache configuration
        Throws:
        CudaException - if a CUDA exception occurs
        SecurityException - if a security manager exists and the calling thread does not have permission to set device cache configurations
      • setLimit

        public void setLimit​(CudaDevice.Limit limit,
                             long value)
                      throws CudaException
        Configures the specified limit.
        Parameters:
        limit - the limit to be configured
        value - the desired limit value
        Throws:
        CudaException - if a CUDA exception occurs
        SecurityException - if a security manager exists and the calling thread does not have permission to set device limits
      • setSharedMemConfig

        public void setSharedMemConfig​(CudaDevice.SharedMemConfig config)
                                throws CudaException
        Configures the shared memory of this device.
        Parameters:
        config - the desired shared memory configuration
        Throws:
        CudaException - if a CUDA exception occurs
        SecurityException - if a security manager exists and the calling thread does not have permission to set device shared memory configurations
      • synchronize

        public void synchronize()
                         throws CudaException
        Synchronizes on this device. This method blocks until the associated device has completed all previous actions in the default stream.
        Throws:
        CudaException - if a CUDA exception occurs