Class CudaDevice
java.lang.Object
com.ibm.cuda.CudaDevice
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
CacheConfig
identifies the cache configuration choices for a device.static enum
Limit
identifies device limits that may be queried or configured.static enum
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Number of asynchronous engines.static final int
Device can map host memory into CUDA address space.static final int
Typical clock frequency in kilohertz.static final int
Compute capability version number.static final int
Major compute capability version number.static final int
Minor compute capability version number.static final int
Compute mode (see COMPUTE_MODE_XXX for details).static final int
Device can possibly execute multiple kernels concurrently.static final int
Device has ECC support enabled.static final int
Global memory bus width in bits.static final int
Device is integrated with host memory.static final int
Specifies whether there is a run time limit on kernels.static final int
Size of L2 cache in bytes.static final int
Maximum block dimension X.static final int
Maximum block dimension Y.static final int
Maximum block dimension Z.static final int
Maximum grid dimension X.static final int
Maximum grid dimension Y.static final int
Maximum grid dimension Z.static final int
Maximum pitch in bytes allowed by memory copies.static final int
Maximum number of 32-bit registers available per block.static final int
Maximum shared memory available per block in bytes.static final int
Maximum number of threads per block.static final int
Maximum resident threads per multiprocessor.static final int
Maximum layers in a 1D layered surface.static final int
Maximum 1D layered surface width.static final int
Maximum 1D surface width.static final int
Maximum 2D surface height.static final int
Maximum 2D layered surface height.static final int
Maximum layers in a 2D layered surface.static final int
Maximum 2D layered surface width.static final int
Maximum 2D surface width.static final int
Maximum 3D surface depth.static final int
Maximum 3D surface height.static final int
Maximum 3D surface width.static final int
Maximum layers in a cubemap layered surface.static final int
Maximum cubemap layered surface width.static final int
Maximum cubemap surface width.static final int
Maximum layers in a 1D layered texture.static final int
Maximum 1D layered texture width.static final int
Maximum 1D linear texture width.static final int
Maximum mipmapped 1D texture width.static final int
Maximum 1D texture width.static final int
Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set.static final int
Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set.static final int
Maximum 2D texture height.static final int
Maximum 2D layered texture height.static final int
Maximum layers in a 2D layered texture.static final int
Maximum 2D layered texture width.static final int
Maximum 2D linear texture height.static final int
Maximum 2D linear texture pitch in bytes.static final int
Maximum 2D linear texture width.static final int
Maximum mipmapped 2D texture height.static final int
Maximum mipmapped 2D texture width.static final int
Maximum 2D texture width.static final int
Maximum 3D texture depth.static final int
Alternate maximum 3D texture depth.static final int
Maximum 3D texture height.static final int
Alternate maximum 3D texture height.static final int
Maximum 3D texture width.static final int
Alternate maximum 3D texture width.static final int
Maximum layers in a cubemap layered texture.static final int
Maximum cubemap layered texture width/height.static final int
Maximum cubemap texture width/height.static final int
Peak memory clock frequency in kilohertz.static final int
Number of multiprocessors on device.static final int
PCI bus ID of the device.static final int
PCI device ID of the device.static final int
PCI domain ID of the device.static final int
Device supports stream priorities.static final int
Alignment requirement for surfaces.static final int
Device is using TCC driver model.static final int
Alignment requirement for textures.static final int
Pitch alignment requirement for textures.static final int
Memory available on device for __constant__ variables in a kernel in bytes.static final int
Device shares a unified address space with the host.static final int
Warp size in threads.static final int
Default compute mode (multiple contexts allowed per device).static final int
Compute exclusive process mode (at most one context used by a single process can be present on this device at a time).static final int
Compute prohibited mode (no contexts can be created on this device at this time).static final int
Exclusive thread mode (at most one context, used by a single thread, can be present on this device at a time).static final int
Keep local memory allocation after launch.static final int
Support mapped pinned allocations.static final int
Automatic scheduling.static final int
Set blocking synchronization as default scheduling.static final int
Set spin as default scheduling.static final int
Set yield as default scheduling.static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCallback
(Runnable callback) Queues the givencallback
to be executed when the associated device has completed all previous actions in the default stream.boolean
canAccessPeer
(CudaDevice peerDevice) Returns whether this device can access memory of the specifiedpeerDevice
.void
disablePeerAccess
(CudaDevice peerDevice) Disable access to memory ofpeerDevice
by this device.void
enablePeerAccess
(CudaDevice peerDevice) Enable access to memory ofpeerDevice
by this device.boolean
Does the argument represent the same device as this?int
getAttribute
(int attribute) Returns the value of the specifiedattribute
.Returns the current cache configuration of this device.static int
getCount()
Returns the number of CUDA-capable devices available to the Java host.int
Returns an integer identifying this device (the value provided when this object was constructed).static int
Deprecated.Use Cuda.getDriverVersion() instead.long
Returns the amount of free device memory in bytes.int
Returns the greatest possible priority of a stream on this device.int
Returns the least possible priority of a stream on this device.long
getLimit
(CudaDevice.Limit limit) Returns the value of the specifiedlimit
.getName()
Returns the name of this device.static int
Deprecated.Use Cuda.getRuntimeVersion() instead.Returns the current shared memory configuration of this device.long
Returns the total amount of memory on this device in bytes.void
setCacheConfig
(CudaDevice.CacheConfig config) Configures the cache of this device.void
setLimit
(CudaDevice.Limit limit, long value) Configures the specifiedlimit
.void
Configures the shared memory of this device.void
Synchronizes on this device.
-
Field Details
-
ATTRIBUTE_ASYNC_ENGINE_COUNT
public static final int ATTRIBUTE_ASYNC_ENGINE_COUNTNumber of asynchronous engines.- See Also:
-
ATTRIBUTE_CAN_MAP_HOST_MEMORY
public static final int ATTRIBUTE_CAN_MAP_HOST_MEMORYDevice can map host memory into CUDA address space.- See Also:
-
ATTRIBUTE_CLOCK_RATE
public static final int ATTRIBUTE_CLOCK_RATETypical clock frequency in kilohertz.- See Also:
-
ATTRIBUTE_COMPUTE_CAPABILITY
public static final int ATTRIBUTE_COMPUTE_CAPABILITYCompute 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:
-
ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR
public static final int ATTRIBUTE_COMPUTE_CAPABILITY_MAJORMajor compute capability version number.- See Also:
-
ATTRIBUTE_COMPUTE_CAPABILITY_MINOR
public static final int ATTRIBUTE_COMPUTE_CAPABILITY_MINORMinor compute capability version number.- See Also:
-
ATTRIBUTE_COMPUTE_MODE
public static final int ATTRIBUTE_COMPUTE_MODECompute mode (see COMPUTE_MODE_XXX for details).- See Also:
-
ATTRIBUTE_CONCURRENT_KERNELS
public static final int ATTRIBUTE_CONCURRENT_KERNELSDevice can possibly execute multiple kernels concurrently.- See Also:
-
ATTRIBUTE_ECC_ENABLED
public static final int ATTRIBUTE_ECC_ENABLEDDevice has ECC support enabled.- See Also:
-
ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH
public static final int ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTHGlobal memory bus width in bits.- See Also:
-
ATTRIBUTE_INTEGRATED
public static final int ATTRIBUTE_INTEGRATEDDevice is integrated with host memory.- See Also:
-
ATTRIBUTE_KERNEL_EXEC_TIMEOUT
public static final int ATTRIBUTE_KERNEL_EXEC_TIMEOUTSpecifies whether there is a run time limit on kernels.- See Also:
-
ATTRIBUTE_L2_CACHE_SIZE
public static final int ATTRIBUTE_L2_CACHE_SIZESize of L2 cache in bytes.- See Also:
-
ATTRIBUTE_MAX_BLOCK_DIM_X
public static final int ATTRIBUTE_MAX_BLOCK_DIM_XMaximum block dimension X.- See Also:
-
ATTRIBUTE_MAX_BLOCK_DIM_Y
public static final int ATTRIBUTE_MAX_BLOCK_DIM_YMaximum block dimension Y.- See Also:
-
ATTRIBUTE_MAX_BLOCK_DIM_Z
public static final int ATTRIBUTE_MAX_BLOCK_DIM_ZMaximum block dimension Z.- See Also:
-
ATTRIBUTE_MAX_GRID_DIM_X
public static final int ATTRIBUTE_MAX_GRID_DIM_XMaximum grid dimension X.- See Also:
-
ATTRIBUTE_MAX_GRID_DIM_Y
public static final int ATTRIBUTE_MAX_GRID_DIM_YMaximum grid dimension Y.- See Also:
-
ATTRIBUTE_MAX_GRID_DIM_Z
public static final int ATTRIBUTE_MAX_GRID_DIM_ZMaximum grid dimension Z.- See Also:
-
ATTRIBUTE_MAX_PITCH
public static final int ATTRIBUTE_MAX_PITCHMaximum pitch in bytes allowed by memory copies.- See Also:
-
ATTRIBUTE_MAX_REGISTERS_PER_BLOCK
public static final int ATTRIBUTE_MAX_REGISTERS_PER_BLOCKMaximum number of 32-bit registers available per block.- See Also:
-
ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK
public static final int ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCKMaximum shared memory available per block in bytes.- See Also:
-
ATTRIBUTE_MAX_THREADS_PER_BLOCK
public static final int ATTRIBUTE_MAX_THREADS_PER_BLOCKMaximum number of threads per block.- See Also:
-
ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR
public static final int ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSORMaximum resident threads per multiprocessor.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS
public static final int ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERSMaximum layers in a 1D layered surface.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTHMaximum 1D layered surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTHMaximum 1D surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHTMaximum 2D surface height.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHTMaximum 2D layered surface height.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS
public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERSMaximum layers in a 2D layered surface.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTHMaximum 2D layered surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTHMaximum 2D surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH
public static final int ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTHMaximum 3D surface depth.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHTMaximum 3D surface height.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTHMaximum 3D surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS
public static final int ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERSMaximum layers in a cubemap layered surface.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTHMaximum cubemap layered surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH
public static final int ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTHMaximum cubemap surface width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS
public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERSMaximum layers in a 1D layered texture.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTHMaximum 1D layered texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTHMaximum 1D linear texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTHMaximum mipmapped 1D texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTHMaximum 1D texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHTMaximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTHMaximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHTMaximum 2D texture height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHTMaximum 2D layered texture height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERSMaximum layers in a 2D layered texture.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTHMaximum 2D layered texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHTMaximum 2D linear texture height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCHMaximum 2D linear texture pitch in bytes.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTHMaximum 2D linear texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHTMaximum mipmapped 2D texture height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTHMaximum mipmapped 2D texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTHMaximum 2D texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTHMaximum 3D texture depth.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE
public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATEAlternate maximum 3D texture depth.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT
public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHTMaximum 3D texture height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE
public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATEAlternate maximum 3D texture height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTHMaximum 3D texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE
public static final int ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATEAlternate maximum 3D texture width.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS
public static final int ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERSMaximum layers in a cubemap layered texture.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTHMaximum cubemap layered texture width/height.- See Also:
-
ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH
public static final int ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTHMaximum cubemap texture width/height.- See Also:
-
ATTRIBUTE_MEMORY_CLOCK_RATE
public static final int ATTRIBUTE_MEMORY_CLOCK_RATEPeak memory clock frequency in kilohertz.- See Also:
-
ATTRIBUTE_MULTIPROCESSOR_COUNT
public static final int ATTRIBUTE_MULTIPROCESSOR_COUNTNumber of multiprocessors on device.- See Also:
-
ATTRIBUTE_PCI_BUS_ID
public static final int ATTRIBUTE_PCI_BUS_IDPCI bus ID of the device.- See Also:
-
ATTRIBUTE_PCI_DEVICE_ID
public static final int ATTRIBUTE_PCI_DEVICE_IDPCI device ID of the device.- See Also:
-
ATTRIBUTE_PCI_DOMAIN_ID
public static final int ATTRIBUTE_PCI_DOMAIN_IDPCI domain ID of the device.- See Also:
-
ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED
public static final int ATTRIBUTE_STREAM_PRIORITIES_SUPPORTEDDevice supports stream priorities.- See Also:
-
ATTRIBUTE_SURFACE_ALIGNMENT
public static final int ATTRIBUTE_SURFACE_ALIGNMENTAlignment requirement for surfaces.- See Also:
-
ATTRIBUTE_TCC_DRIVER
public static final int ATTRIBUTE_TCC_DRIVERDevice is using TCC driver model.- See Also:
-
ATTRIBUTE_TEXTURE_ALIGNMENT
public static final int ATTRIBUTE_TEXTURE_ALIGNMENTAlignment requirement for textures.- See Also:
-
ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT
public static final int ATTRIBUTE_TEXTURE_PITCH_ALIGNMENTPitch alignment requirement for textures.- See Also:
-
ATTRIBUTE_TOTAL_CONSTANT_MEMORY
public static final int ATTRIBUTE_TOTAL_CONSTANT_MEMORYMemory available on device for __constant__ variables in a kernel in bytes.- See Also:
-
ATTRIBUTE_UNIFIED_ADDRESSING
public static final int ATTRIBUTE_UNIFIED_ADDRESSINGDevice shares a unified address space with the host.- See Also:
-
ATTRIBUTE_WARP_SIZE
public static final int ATTRIBUTE_WARP_SIZEWarp size in threads.- See Also:
-
COMPUTE_MODE_DEFAULT
public static final int COMPUTE_MODE_DEFAULTDefault compute mode (multiple contexts allowed per device).- See Also:
-
COMPUTE_MODE_PROCESS_EXCLUSIVE
public static final int COMPUTE_MODE_PROCESS_EXCLUSIVECompute exclusive process mode (at most one context used by a single process can be present on this device at a time).- See Also:
-
COMPUTE_MODE_PROHIBITED
public static final int COMPUTE_MODE_PROHIBITEDCompute prohibited mode (no contexts can be created on this device at this time).- See Also:
-
COMPUTE_MODE_THREAD_EXCLUSIVE
public static final int COMPUTE_MODE_THREAD_EXCLUSIVEExclusive thread mode (at most one context, used by a single thread, can be present on this device at a time).- See Also:
-
FLAG_LMEM_RESIZE_TO_MAX
public static final int FLAG_LMEM_RESIZE_TO_MAXKeep local memory allocation after launch.- See Also:
-
FLAG_MAP_HOST
public static final int FLAG_MAP_HOSTSupport mapped pinned allocations.- See Also:
-
FLAG_SCHED_AUTO
public static final int FLAG_SCHED_AUTOAutomatic scheduling.- See Also:
-
FLAG_SCHED_BLOCKING_SYNC
public static final int FLAG_SCHED_BLOCKING_SYNCSet blocking synchronization as default scheduling.- See Also:
-
FLAG_SCHED_SPIN
public static final int FLAG_SCHED_SPINSet spin as default scheduling.- See Also:
-
FLAG_SCHED_YIELD
public static final int FLAG_SCHED_YIELDSet yield as default scheduling.- See Also:
-
MASK_SCHED
public static final int MASK_SCHED- See Also:
-
-
Constructor Details
-
CudaDevice
public CudaDevice(int deviceId) Creates a device handle corresponding todeviceId
.No checking is done on
deviceId
, but it must be non-negative and less than the value returnedgetCount()
to be useful.- Parameters:
deviceId
- an integer identifying the device of interest
-
-
Method Details
-
getCount
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.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.Use Cuda.getRuntimeVersion() instead.Returns a number identifying the runtime version.- Returns:
- the runtime version number
- Throws:
CudaException
- if a CUDA exception occurs
-
addCallback
Queues the givencallback
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
Returns whether this device can access memory of the specifiedpeerDevice
.- 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
Disable access to memory ofpeerDevice
by this device.- Parameters:
peerDevice
- the peer device- Throws:
CudaException
- if a CUDA exception occursSecurityException
- if a security manager exists and the calling thread does not have permission to disable peer access
-
enablePeerAccess
Enable access to memory ofpeerDevice
by this device.- Parameters:
peerDevice
- the peer device- Throws:
CudaException
- if a CUDA exception occursSecurityException
- if a security manager exists and the calling thread does not have permission to enable peer access
-
equals
Does the argument represent the same device as this? -
getAttribute
Returns the value of the specifiedattribute
.- Parameters:
attribute
- the attribute to be queried (see ATTRIBUTE_XXX)- Returns:
- the attribute value
- Throws:
CudaException
- if a CUDA exception occurs
-
getCacheConfig
Returns the current cache configuration of this device.- Returns:
- the current cache configuration
- 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
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
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
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
Returns the value of the specifiedlimit
.- Parameters:
limit
- the limit to be queried- Returns:
- the value of the specified limit
- Throws:
CudaException
- if a CUDA exception occurs
-
getName
Returns the name of this device.- Returns:
- the name of this device
- Throws:
CudaException
- if a CUDA exception occurs
-
getTotalMemory
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
Configures the cache of this device.- Parameters:
config
- the desired cache configuration- Throws:
CudaException
- if a CUDA exception occursSecurityException
- if a security manager exists and the calling thread does not have permission to set device cache configurations
-
setLimit
Configures the specifiedlimit
.- Parameters:
limit
- the limit to be configuredvalue
- the desired limit value- Throws:
CudaException
- if a CUDA exception occursSecurityException
- if a security manager exists and the calling thread does not have permission to set device limits
-
synchronize
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
-