Copyright | [2009..2017] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
Error handling
- data Status
- = Success
- | InvalidValue
- | OutOfMemory
- | NotInitialized
- | Deinitialized
- | ProfilerDisabled
- | ProfilerNotInitialized
- | ProfilerAlreadyStarted
- | ProfilerAlreadyStopped
- | NoDevice
- | InvalidDevice
- | InvalidImage
- | InvalidContext
- | ContextAlreadyCurrent
- | MapFailed
- | UnmapFailed
- | ArrayIsMapped
- | AlreadyMapped
- | NoBinaryForGPU
- | AlreadyAcquired
- | NotMapped
- | NotMappedAsArray
- | NotMappedAsPointer
- | EccUncorrectable
- | UnsupportedLimit
- | ContextAlreadyInUse
- | PeerAccessUnsupported
- | InvalidPTX
- | InvalidGraphicsContext
- | NvlinkUncorrectable
- | InvalidSource
- | FileNotFound
- | SharedObjectSymbolNotFound
- | SharedObjectInitFailed
- | OperatingSystem
- | InvalidHandle
- | NotFound
- | NotReady
- | IllegalAddress
- | LaunchOutOfResources
- | LaunchTimeout
- | LaunchIncompatibleTexturing
- | PeerAccessAlreadyEnabled
- | PeerAccessNotEnabled
- | PrimaryContextActive
- | ContextIsDestroyed
- | Assert
- | TooManyPeers
- | HostMemoryAlreadyRegistered
- | HostMemoryNotRegistered
- | HardwareStackError
- | IllegalInstruction
- | MisalignedAddress
- | InvalidAddressSpace
- | InvalidPC
- | LaunchFailed
- | NotPermitted
- | NotSupported
- | Unknown
- data CUDAException
- describe :: Describe a => a -> String
- cudaError :: String -> a
- cudaErrorIO :: String -> IO a
- requireSDK :: Name -> Double -> a
- resultIfOk :: (Status, a) -> IO a
- nothingIfOk :: Status -> IO ()
CUDA Errors
data CUDAException 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 #
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.