| Copyright | [2017] Trevor L. McDonell |
|---|---|
| License | BSD3 |
| Maintainer | Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> |
| Stability | experimental |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Foreign.CUDA.BLAS.Sparse.Error
Description
Synopsis
- data Status
- describe :: Status -> String
- data CUSparseException
- cusparseError :: String -> IO a
- resultIfOk :: (Status, a) -> IO a
- nothingIfOk :: Status -> IO ()
- checkStatus :: CInt -> IO ()
Documentation
Error codes used by cuSPARSE library functions
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsestatust
Constructors
| Success | |
| NotInitialized | |
| AllocFailed | |
| InvalidValue | |
| ArchMismatch | |
| MappingError | |
| ExecutionFailed | |
| InternalError | |
| MatrixTypeNotSupported | |
| ZeroPivot | |
| NotSupported |
data CUSparseException Source #
Instances
| Show CUSparseException Source # | |
Defined in Foreign.CUDA.BLAS.Sparse.Error Methods showsPrec :: Int -> CUSparseException -> ShowS # show :: CUSparseException -> String # showList :: [CUSparseException] -> ShowS # | |
| Exception CUSparseException Source # | |
Defined in Foreign.CUDA.BLAS.Sparse.Error Methods toException :: CUSparseException -> SomeException # | |
cusparseError :: String -> IO a Source #
Raise a CUSparseException 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.
checkStatus :: CInt -> IO () Source #
Throw an error if given error code is not CUSPARSE_STATUS_SUCCESS