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

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




Error handling


CUDA Errors

data 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

requireSDK :: Name -> Double -> a Source #

A specially formatted error message

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.