java.lang.Object
com.ibm.cuda.CudaDevice
The
CudaDevice class represents a CUDA-capable device.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCacheConfigidentifies the cache configuration choices for a device.static enumLimitidentifies device limits that may be queried or configured.static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intNumber of asynchronous engines.static final intDevice can map host memory into CUDA address space.static final intTypical clock frequency in kilohertz.static final intCompute capability version number.static final intMajor compute capability version number.static final intMinor compute capability version number.static final intCompute mode (see COMPUTE_MODE_XXX for details).static final intDevice can possibly execute multiple kernels concurrently.static final intDevice has ECC support enabled.static final intGlobal memory bus width in bits.static final intDevice is integrated with host memory.static final intSpecifies whether there is a run time limit on kernels.static final intSize of L2 cache in bytes.static final intMaximum block dimension X.static final intMaximum block dimension Y.static final intMaximum block dimension Z.static final intMaximum grid dimension X.static final intMaximum grid dimension Y.static final intMaximum grid dimension Z.static final intMaximum pitch in bytes allowed by memory copies.static final intMaximum number of 32-bit registers available per block.static final intMaximum shared memory available per block in bytes.static final intMaximum number of threads per block.static final intMaximum resident threads per multiprocessor.static final intMaximum layers in a 1D layered surface.static final intMaximum 1D layered surface width.static final intMaximum 1D surface width.static final intMaximum 2D surface height.static final intMaximum 2D layered surface height.static final intMaximum layers in a 2D layered surface.static final intMaximum 2D layered surface width.static final intMaximum 2D surface width.static final intMaximum 3D surface depth.static final intMaximum 3D surface height.static final intMaximum 3D surface width.static final intMaximum layers in a cubemap layered surface.static final intMaximum cubemap layered surface width.static final intMaximum cubemap surface width.static final intMaximum layers in a 1D layered texture.static final intMaximum 1D layered texture width.static final intMaximum 1D linear texture width.static final intMaximum mipmapped 1D texture width.static final intMaximum 1D texture width.static final intMaximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set.static final intMaximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set.static final intMaximum 2D texture height.static final intMaximum 2D layered texture height.static final intMaximum layers in a 2D layered texture.static final intMaximum 2D layered texture width.static final intMaximum 2D linear texture height.static final intMaximum 2D linear texture pitch in bytes.static final intMaximum 2D linear texture width.static final intMaximum mipmapped 2D texture height.static final intMaximum mipmapped 2D texture width.static final intMaximum 2D texture width.static final intMaximum 3D texture depth.static final intAlternate maximum 3D texture depth.static final intMaximum 3D texture height.static final intAlternate maximum 3D texture height.static final intMaximum 3D texture width.static final intAlternate maximum 3D texture width.static final intMaximum layers in a cubemap layered texture.static final intMaximum cubemap layered texture width/height.static final intMaximum cubemap texture width/height.static final intPeak memory clock frequency in kilohertz.static final intNumber of multiprocessors on device.static final intPCI bus ID of the device.static final intPCI device ID of the device.static final intPCI domain ID of the device.static final intDevice supports stream priorities.static final intAlignment requirement for surfaces.static final intDevice is using TCC driver model.static final intAlignment requirement for textures.static final intPitch alignment requirement for textures.static final intMemory available on device for __constant__ variables in a kernel in bytes.static final intDevice shares a unified address space with the host.static final intWarp size in threads.static final intDefault compute mode (multiple contexts allowed per device).static final intCompute exclusive process mode (at most one context used by a single process can be present on this device at a time).static final intCompute prohibited mode (no contexts can be created on this device at this time).static final intExclusive thread mode (at most one context, used by a single thread, can be present on this device at a time).static final intKeep local memory allocation after launch.static final intSupport mapped pinned allocations.static final intAutomatic scheduling.static final intSet blocking synchronization as default scheduling.static final intSet spin as default scheduling.static final intSet yield as default scheduling.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCallback(Runnable callback) Queues the givencallbackto be executed when the associated device has completed all previous actions in the default stream.booleancanAccessPeer(CudaDevice peerDevice) Returns whether this device can access memory of the specifiedpeerDevice.voiddisablePeerAccess(CudaDevice peerDevice) Disable access to memory ofpeerDeviceby this device.voidenablePeerAccess(CudaDevice peerDevice) Enable access to memory ofpeerDeviceby this device.booleanDoes the argument represent the same device as this?intgetAttribute(int attribute) Returns the value of the specifiedattribute.Returns the current cache configuration of this device.static intgetCount()Returns the number of CUDA-capable devices available to the Java host.intReturns an integer identifying this device (the value provided when this object was constructed).static intDeprecated.Use Cuda.getDriverVersion() instead.longReturns the amount of free device memory in bytes.intReturns the greatest possible priority of a stream on this device.intReturns the least possible priority of a stream on this device.longgetLimit(CudaDevice.Limit limit) Returns the value of the specifiedlimit.getName()Returns the name of this device.static intDeprecated.Use Cuda.getRuntimeVersion() instead.Returns the current shared memory configuration of this device.longReturns the total amount of memory on this device in bytes.voidsetCacheConfig(CudaDevice.CacheConfig config) Configures the cache of this device.voidsetLimit(CudaDevice.Limit limit, long value) Configures the specifiedlimit.voidConfigures the shared memory of this device.voidSynchronizes 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 givencallbackto 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 ofpeerDeviceby 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 ofpeerDeviceby 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
-