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 |
Synopsis
- newtype Handle = Handle {}
- create :: IO Handle
- destroy :: Handle -> IO ()
- data PointerMode
- setPointerMode :: Handle -> PointerMode -> IO ()
- getPointerMode :: Handle -> IO PointerMode
Context management
An opaque handle to the cuSPARSE library context, which is passed to all library function calls.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsehandlet
This function initializes the cuSPARSE library and creates a handle on the cuSPARSE context. It must be called before any other cuSPARSE API function is invoked. It allocates hardware resources necessary for accessing the GPU.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsecreate
destroy :: Handle -> IO () Source #
This function releases CPU-side resources used by the cuSPARSE library. The release of GPU-side resources may be deferred until the application shuts down.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsedestroy
Utilities
data PointerMode Source #
For functions which take scalar value arguments, determines whether those values are passed by reference on the host or device.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsepointermode_t
Instances
Enum PointerMode Source # | |
Defined in Foreign.CUDA.BLAS.Sparse.Context succ :: PointerMode -> PointerMode # pred :: PointerMode -> PointerMode # toEnum :: Int -> PointerMode # fromEnum :: PointerMode -> Int # enumFrom :: PointerMode -> [PointerMode] # enumFromThen :: PointerMode -> PointerMode -> [PointerMode] # enumFromTo :: PointerMode -> PointerMode -> [PointerMode] # enumFromThenTo :: PointerMode -> PointerMode -> PointerMode -> [PointerMode] # | |
Eq PointerMode Source # | |
Defined in Foreign.CUDA.BLAS.Sparse.Context (==) :: PointerMode -> PointerMode -> Bool # (/=) :: PointerMode -> PointerMode -> Bool # | |
Show PointerMode Source # | |
Defined in Foreign.CUDA.BLAS.Sparse.Context showsPrec :: Int -> PointerMode -> ShowS # show :: PointerMode -> String # showList :: [PointerMode] -> ShowS # |
setPointerMode :: Handle -> PointerMode -> IO () Source #
Set the pointer mode used by cuSPARSE library functions.
The default mode is for values to be passed by reference from the host.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsesetpointermode
getPointerMode :: Handle -> IO PointerMode Source #
Get the pointer mode used by cuSPARSE library functions to pass scalar arguments.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsegetpointermode