Copyright | [2009..2014] 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
- | 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
- describe :: Status -> String
- cuGetErrorString :: Status -> IO (Status, String)
- data CUDAException
- cudaError :: String -> IO a
- requireSDK :: Double -> String -> IO a
- resultIfOk :: (Status, a) -> IO a
- nothingIfOk :: Status -> IO ()
- cuGetErrorString'_ :: CInt -> Ptr (Ptr CChar) -> IO CInt
Documentation
describe :: Status -> String Source
Return a descriptive error string associated with a particular error code
data CUDAException Source
requireSDK :: Double -> String -> IO 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.