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

Copyright[2009..2017] Trevor L. McDonell
LicenseBSD
Safe HaskellNone
LanguageHaskell98

Foreign.CUDA.Runtime.Device

Contents

Description

Device management routines

Synopsis

Device Management

type Device = Int Source #

A device identifier

data DeviceProperties Source #

The properties of a compute device

Constructors

DeviceProperties 

Fields

data Compute Source #

GPU compute capability, major and minor revision number respectively.

Constructors

Compute !Int !Int 

choose :: DeviceProperties -> IO Device Source #

Select the compute device which best matches the given criteria

get :: IO Device Source #

Returns which device is currently being used

count :: IO Int Source #

Returns the number of devices available for execution, with compute capability >= 1.0

props :: Device -> IO DeviceProperties Source #

Return information about the selected compute device

set :: Device -> IO () Source #

Set device to be used for GPU execution

setFlags :: [DeviceFlag] -> IO () Source #

Set flags to be used for device executions

setOrder :: [Device] -> IO () Source #

Set list of devices for CUDA execution in priority order

reset :: IO () Source #

Explicitly destroys and cleans up all runtime resources associated with the current device in the current process. Any subsequent API call will reinitialise the device.

Note that this function will reset the device immediately. It is the caller’s responsibility to ensure that the device is not being accessed by any other host threads from the process when this function is called.

sync :: IO () Source #

Block until the device has completed all preceding requested tasks. Returns an error if one of the tasks fails.

Peer Access

data PeerFlag Source #

Possible option values for direct peer memory access

accessible :: Device -> Device -> IO Bool Source #

Queries if the first device can directly access the memory of the second. If direct access is possible, it can then be enabled with add. Requires cuda-4.0.

add :: Device -> [PeerFlag] -> IO () Source #

If the devices of both the current and supplied contexts support unified addressing, then enable allocations in the supplied context to be accessible by the current context. Requires cuda-4.0.

remove :: Device -> IO () Source #

Disable direct memory access from the current context to the supplied context. Requires cuda-4.0.

Cache Configuration

getLimit :: Limit -> IO Int Source #

Query compute 2.0 call stack limits. Requires cuda-3.1.

setLimit :: Limit -> Int -> IO () Source #

Set compute 2.0 call stack limits. Requires cuda-3.1.

Orphan instances