cuda-0.6.5.1: FFI binding to the CUDA interface for programming NVIDIA GPUs

Copyright(c) [2009..2012] Trevor L. McDonell
LicenseBSD
Safe HaskellNone
LanguageHaskell98

Foreign.CUDA.Driver.Device

Contents

Description

Device management for low-level driver interface

Synopsis

Device Management

newtype Device Source

Constructors

Device 

Fields

useDevice :: CInt
 

Instances

data DeviceProperties Source

The properties of a compute device

Constructors

DeviceProperties 

Fields

deviceName :: !String

Identifier

computeCapability :: !Compute

Supported compute capability

totalGlobalMem :: !Int64

Available global memory on the device in bytes

totalConstMem :: !Int64

Available constant memory on the device in bytes

sharedMemPerBlock :: !Int64

Available shared memory per block in bytes

regsPerBlock :: !Int

32-bit registers per block

warpSize :: !Int

Warp size in threads (SIMD width)

maxThreadsPerBlock :: !Int

Max number of threads per block

maxThreadsPerMultiProcessor :: !Int

Max number of threads per multiprocessor

maxBlockSize :: !(Int, Int, Int)

Max size of each dimension of a block

maxGridSize :: !(Int, Int, Int)

Max size of each dimension of a grid

maxTextureDim1D :: !Int

Maximum texture dimensions

maxTextureDim2D :: !(Int, Int)
 
maxTextureDim3D :: !(Int, Int, Int)
 
clockRate :: !Int

Clock frequency in kilohertz

multiProcessorCount :: !Int

Number of multiprocessors on the device

memPitch :: !Int64

Max pitch in bytes allowed by memory copies

memBusWidth :: !Int

Global memory bus width in bits

memClockRate :: !Int

Peak memory clock frequency in kilohertz

textureAlignment :: !Int64

Alignment requirement for textures

computeMode :: !ComputeMode
 
deviceOverlap :: !Bool

Device can concurrently copy memory and execute a kernel

concurrentKernels :: !Bool

Device can possibly execute multiple kernels concurrently

eccEnabled :: !Bool

Device supports and has enabled error correction

asyncEngineCount :: !Int

Number of asynchronous engines

cacheMemL2 :: !Int

Size of the L2 cache in bytes

tccDriverEnabled :: !Bool

Whether this is a Tesla device using the TCC driver

pciInfo :: !PCI

PCI device information for the device

kernelExecTimeoutEnabled :: !Bool

Whether there is a runtime limit on kernels

integrated :: !Bool

As opposed to discrete

canMapHostMemory :: !Bool

Device can use pinned memory

unifiedAddressing :: !Bool

Device shares a unified address space with the host

data DeviceAttribute Source

Device attributes

Constructors

MaxThreadsPerBlock 
MaxBlockDimX 
MaxBlockDimY 
MaxBlockDimZ 
MaxGridDimX 
MaxGridDimY 
MaxGridDimZ 
MaxSharedMemoryPerBlock 
SharedMemoryPerBlock 
TotalConstantMemory 
WarpSize 
MaxPitch 
MaxRegistersPerBlock 
RegistersPerBlock 
ClockRate 
TextureAlignment 
GpuOverlap 
MultiprocessorCount 
KernelExecTimeout 
Integrated 
CanMapHostMemory 
ComputeMode 
MaximumTexture1dWidth 
MaximumTexture2dWidth 
MaximumTexture2dHeight 
MaximumTexture3dWidth 
MaximumTexture3dHeight 
MaximumTexture3dDepth 
MaximumTexture2dLayeredWidth 
MaximumTexture2dLayeredHeight 
MaximumTexture2dLayeredLayers 
MaximumTexture2dArrayWidth 
MaximumTexture2dArrayHeight 
MaximumTexture2dArrayNumslices 
SurfaceAlignment 
ConcurrentKernels 
EccEnabled 
PciBusId 
PciDeviceId 
TccDriver 
MemoryClockRate 
GlobalMemoryBusWidth 
L2CacheSize 
MaxThreadsPerMultiprocessor 
AsyncEngineCount 
UnifiedAddressing 
MaximumTexture1dLayeredWidth 
MaximumTexture1dLayeredLayers 
CanTex2dGather 
MaximumTexture2dGatherWidth 
MaximumTexture2dGatherHeight 
MaximumTexture3dWidthAlternate 
MaximumTexture3dHeightAlternate 
MaximumTexture3dDepthAlternate 
PciDomainId 
TexturePitchAlignment 
MaximumTexturecubemapWidth 
MaximumTexturecubemapLayeredWidth 
MaximumTexturecubemapLayeredLayers 
MaximumSurface1dWidth 
MaximumSurface2dWidth 
MaximumSurface2dHeight 
MaximumSurface3dWidth 
MaximumSurface3dHeight 
MaximumSurface3dDepth 
MaximumSurface1dLayeredWidth 
MaximumSurface1dLayeredLayers 
MaximumSurface2dLayeredWidth 
MaximumSurface2dLayeredHeight 
MaximumSurface2dLayeredLayers 
MaximumSurfacecubemapWidth 
MaximumSurfacecubemapLayeredWidth 
MaximumSurfacecubemapLayeredLayers 
MaximumTexture1dLinearWidth 
MaximumTexture2dLinearWidth 
MaximumTexture2dLinearHeight 
MaximumTexture2dLinearPitch 
MaximumTexture2dMipmappedWidth 
MaximumTexture2dMipmappedHeight 
ComputeCapabilityMajor 
ComputeCapabilityMinor 
MaximumTexture1dMipmappedWidth 
StreamPrioritiesSupported 
GlobalL1CacheSupported 
LocalL1CacheSupported 
MaxSharedMemoryPerMultiprocessor 
MaxRegistersPerMultiprocessor 
ManagedMemory 
MultiGpuBoard 
MultiGpuBoardGroupId 
CU_DEVICE_ATTRIBUTE_MAX 

Instances

Enum DeviceAttribute

Return the compute compatibility revision supported by the device

Eq DeviceAttribute 
Show DeviceAttribute 

data Compute Source

Constructors

Compute !Int !Int 

data ComputeMode Source

The compute mode the device is currently in

Instances

Enum ComputeMode

GPU compute capability, major and minor revision number respectively.

Eq ComputeMode 
Show ComputeMode 

data InitFlag Source

Possible option flags for CUDA initialisation. Dummy instance until the API exports actual option values.

Instances

initialise :: [InitFlag] -> IO () Source

Initialise the CUDA driver API. Must be called before any other driver function.

device :: Int -> IO Device Source

Return a device handle

attribute :: Device -> DeviceAttribute -> IO Int Source

Return the selected attribute for the given device

count :: IO Int Source

Return the number of device with compute capability > 1.0

name :: Device -> IO String Source

Name of the device

props :: Device -> IO DeviceProperties Source

Return the properties of the selected device

totalMem :: Device -> IO Int64 Source

Total memory available on the device (bytes)