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.Driver.Error

Contents

Description

Error handling

Synopsis

CUDA Errors

data Status Source #

Instances

Enum Status Source #

A specially formatted error message

Eq Status Source # 

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Show Status Source # 

describe :: Describe a => a -> String Source #

cudaError :: String -> a Source #

Raise a CUDAException. Exceptions can be thrown from pure code, but can only be caught in the IO monad.

cudaErrorIO :: String -> IO a Source #

Raise a CUDAException in the IO Monad

resultIfOk :: (Status, a) -> IO a Source #

Return the results of a function on successful execution, otherwise throw an exception with an error string associated with the return code

nothingIfOk :: Status -> IO () Source #

Throw an exception with an error string associated with an unsuccessful return code, otherwise return unit.