public static int cuDeviceGetAttribute(int pi[], int attrib, CUdevice dev)
    {
        return checkResult(cuDeviceGetAttributeNative(pi, attrib, dev));
    }
public static int cuDeviceGetAttribute ( int pi [ ] , int attrib , CUdevice dev ) { return checkResult ( cuDeviceGetAttributeNative ( pi , attrib , dev ) ) ; }
Returns information about the device.

<pre>
CUresult cuDeviceGetAttribute (
int* pi,
CUdevice_attribute attrib,
CUdevice dev )
</pre>
<div>
<p>Returns information about the device.
Returns in <tt>*pi</tt> the integer value of the attribute <tt>attrib</tt> on device <tt>dev</tt>. The supported attributes are:
<ul>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK: Maximum number of threads
per block;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X:
Maximum x-dimension of a block;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y:
Maximum y-dimension of a block;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z:
Maximum z-dimension of a block;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X:
Maximum x-dimension of a grid;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y:
Maximum y-dimension of a grid;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z:
Maximum z-dimension of a grid;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK: Maximum amount of
shared memory available to a thread block in bytes; this amount is
shared by all thread blocks simultaneously
resident on a multiprocessor;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY: Memory available on device
for __constant__ variables in a CUDA C kernel in bytes;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_WARP_SIZE:
Warp size in threads;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_PITCH:
Maximum pitch in bytes allowed by the memory copy functions that
involve memory regions allocated through cuMemAllocPitch();
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH: Maximum 1D texture
width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH: Maximum width for
a 1D texture bound to linear memory;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH: Maximum
mipmapped 1D texture width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH: Maximum 2D texture
width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT: Maximum 2D texture
height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH: Maximum width for
a 2D texture bound to linear memory;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT: Maximum height
for a 2D texture bound to linear memory;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH: Maximum pitch in
bytes for a 2D texture bound to linear memory;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH: Maximum
mipmapped 2D texture width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT: Maximum
mipmapped 2D texture height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH: Maximum 3D texture
width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT: Maximum 3D texture
height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH: Maximum 3D texture
depth;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE: Alternate
maximum 3D texture width, 0 if no alternate maximum 3D texture size is
supported;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE: Alternate
maximum 3D texture height, 0 if no alternate maximum 3D texture size
is supported;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE: Alternate
maximum 3D texture depth, 0 if no alternate maximum 3D texture size is
supported;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH: Maximum cubemap
texture width or height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH: Maximum 1D
layered texture width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS: Maximum layers
in a 1D layered texture;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH: Maximum 2D
layered texture width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT: Maximum 2D
layered texture height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS: Maximum layers
in a 2D layered texture;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH: Maximum
cubemap layered texture width or height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS: Maximum
layers in a cubemap layered texture;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH: Maximum 1D surface
width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH: Maximum 2D surface
width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT: Maximum 2D surface
height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH: Maximum 3D surface
width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT: Maximum 3D surface
height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH: Maximum 3D surface
depth;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH: Maximum 1D
layered surface width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS: Maximum layers
in a 1D layered surface;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH: Maximum 2D
layered surface width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT: Maximum 2D
layered surface height;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS: Maximum layers
in a 2D layered surface;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH: Maximum cubemap
surface width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH: Maximum
cubemap layered surface width;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS: Maximum
layers in a cubemap layered surface;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK: Maximum number of 32-bit
registers available to a thread block; this number is shared by all
thread blocks simultaneously
resident on a multiprocessor;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_CLOCK_RATE:
Typical clock frequency in kilohertz;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT:
Alignment requirement; texture base addresses aligned to textureAlign
bytes do not need an offset applied to texture fetches;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT: Pitch alignment
requirement for 2D texture references bound to pitched memory;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_GPU_OVERLAP:
1 if the device can concurrently copy memory between host and device
while executing a kernel, or 0 if not;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: Number of multiprocessors
on the device;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT:
1 if there is a run time limit for kernels executed on the device, or
0 if not;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_INTEGRATED:
1 if the device is integrated with the memory subsystem, or 0 if not;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY:
1 if the device can map host memory into the CUDA address space, or 0
if not;
</p>
</li>
<li>
<div>
CU_DEVICE_ATTRIBUTE_COMPUTE_MODE:
Compute mode that device is currently in. Available modes are as
follows:
<ul>
<li>
<p>CU_COMPUTEMODE_DEFAULT:
Default mode - Device is not restricted and can have multiple CUDA
contexts present at a single time.
</p>
</li>
<li>
<p>CU_COMPUTEMODE_EXCLUSIVE:
Compute-exclusive mode - Device can have only one CUDA context present
on it at a time.
</p>
</li>
<li>
<p>CU_COMPUTEMODE_PROHIBITED:
Compute-prohibited mode - Device is prohibited from creating new CUDA
contexts.
</p>
</li>
<li>
<p>CU_COMPUTEMODE_EXCLUSIVE_PROCESS: Compute-exclusive-process mode -
Device can have only one context used by a single process at a time.
</p>
</li>
</ul>
</div>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS:
1 if the device supports executing multiple kernels within the same
context simultaneously, or 0 if not. It is not guaranteed
that multiple kernels will be
resident on the device concurrently so this feature should not be
relied upon for correctness;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_ECC_ENABLED:
1 if error correction is enabled on the device, 0 if error correction
is disabled or not supported by the device;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_PCI_BUS_ID:
PCI bus identifier of the device;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID:
PCI device (also known as slot) identifier of the device;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID:
PCI domain identifier of the device
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_TCC_DRIVER:
1 if the device is using a TCC driver. TCC is only available on Tesla
hardware running Windows Vista or later;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE:
Peak memory clock frequency in kilohertz;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH: Global memory bus width
in bits;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE:
Size of L2 cache in bytes. 0 if the device doesn't have L2 cache;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR: Maximum resident
threads per multiprocessor;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING:
1 if the device shares a unified address space with the host, or 0 if
not;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR: Major compute capability
version number;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR: Minor compute capability
version number;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED: 1 if device supports caching globals
in L1 cache, 0 if caching globals in L1 cache is not supported by the device
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED: 1 if device supports caching locals
in L1 cache, 0 if caching locals in L1 cache is not supported by the device;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR: Maximum amount of
shared memory available to a multiprocessor in bytes; this amount is shared
by all thread blocks simultaneously resident on a multiprocessor;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR: Maximum number of 32-bit
registers available to a multiprocessor; this number is shared by all thread
blocks simultaneously resident on a multiprocessor;
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY:  1 if device supports allocating managed memory
on this system, 0 if allocating managed memory is not supported by the device on this system.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD: 1 if device is on a multi-GPU board, 0 if not.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID: Unique identifier for a group of devices
associated with the same board. Devices on the same multi-GPU board will share the same identifier.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED: 1 if Link between the device and the host
supports native atomic operations.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: Ratio of single precision performance
(in floating-point operations per second) to double precision performance.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS: Device suppports coherently accessing
pageable memory without calling cudaHostRegister on it.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS: Device can coherently access managed memory
concurrently with the CPU.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED: Device supports Compute Preemption.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM: Device can access host registered
memory at the same virtual address as the CPU.
</p>
</li>
<li>
<p>CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN: The maximum per block shared memory size
suported on this device. This is the maximum value that can be opted into when using the cuFuncSetAttribute() call.
For more details see ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES
</p>
</li>
</ul>
</p>
<div>
<span>Note:</span>
<p>Note that this
function may also return error codes from previous, asynchronous
launches.
</p>
</div>
</p>
</div>

@param pi Returned device attribute value
@param attrib Device attribute to query
@param dev Device handle

@return CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED,
CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE,
CUDA_ERROR_INVALID_DEVICE

@see JCudaDriver#cuDeviceGetCount
@see JCudaDriver#cuDeviceGetName
@see JCudaDriver#cuDeviceGet
@see JCudaDriver#cuDeviceTotalMem