Copyright | [2009..2018] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
Error handling
Synopsis
- 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
- | JitCompilerNotFound
- | InvalidSource
- | FileNotFound
- | SharedObjectSymbolNotFound
- | SharedObjectInitFailed
- | OperatingSystem
- | InvalidHandle
- | IllegalState
- | NotFound
- | NotReady
- | IllegalAddress
- | LaunchOutOfResources
- | LaunchTimeout
- | LaunchIncompatibleTexturing
- | PeerAccessAlreadyEnabled
- | PeerAccessNotEnabled
- | PrimaryContextActive
- | ContextIsDestroyed
- | Assert
- | TooManyPeers
- | HostMemoryAlreadyRegistered
- | HostMemoryNotRegistered
- | HardwareStackError
- | IllegalInstruction
- | MisalignedAddress
- | InvalidAddressSpace
- | InvalidPC
- | LaunchFailed
- | CooperativeLaunchTooLarge
- | NotPermitted
- | NotSupported
- | SystemNotReady
- | StreamCaptureUnsupported
- | StreamCaptureInvalidated
- | StreamCaptureMerge
- | StreamCaptureUnmatched
- | StreamCaptureUnjoined
- | StreamCaptureIsolation
- | StreamCaptureImplicit
- | CapturedEvent
- | 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 ()
- checkStatus :: CInt -> IO ()
CUDA Errors
data CUDAException Source #
Instances
Show CUDAException Source # | |
Defined in Foreign.CUDA.Driver.Error showsPrec :: Int -> CUDAException -> ShowS # show :: CUDAException -> String # showList :: [CUDAException] -> ShowS # | |
Exception CUDAException Source # | |
Defined in Foreign.CUDA.Driver.Error |
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 #
nothingIfOk :: Status -> IO () Source #
Throw an exception with an error string associated with an unsuccessful return code, otherwise return unit.
checkStatus :: CInt -> IO () Source #